Fixed potential player lag issue when "drugged" (bug 5217, r=asherkin).

This commit is contained in:
FlaminSarge 2012-03-04 14:16:58 -05:00
parent a31bb79b78
commit 7f74948e91

View File

@ -43,14 +43,12 @@ KillDrug(client)
{
KillDrugTimer(client);
new Float:pos[3];
GetClientAbsOrigin(client, pos);
new Float:angs[3];
GetClientEyeAngles(client, angs);
angs[2] = 0.0;
TeleportEntity(client, pos, angs, NULL_VECTOR);
TeleportEntity(client, NULL_VECTOR, angs, NULL_VECTOR);
new clients[2];
clients[0] = client;
@ -144,15 +142,12 @@ public Action:Timer_Drug(Handle:timer, any:client)
return Plugin_Handled;
}
new Float:pos[3];
GetClientAbsOrigin(client, pos);
new Float:angs[3];
GetClientEyeAngles(client, angs);
angs[2] = g_DrugAngles[GetRandomInt(0,100) % 20];
TeleportEntity(client, pos, angs, NULL_VECTOR);
TeleportEntity(client, NULL_VECTOR, angs, NULL_VECTOR);
new clients[2];
clients[0] = client;