had not noticed the client indexerror until now
This commit is contained in:
parent
6465427290
commit
32d2d21794
@ -124,16 +124,19 @@ public MRESReturn OnGetRunCmdPre(int entity, Handle hReturn)
|
||||
|
||||
public void get_new_angles(int client, int target, float angles[3])
|
||||
{
|
||||
float TargetPos[3];
|
||||
float ClientPos[3];
|
||||
float Result[3];
|
||||
GetClientEyePosition(target, TargetPos);
|
||||
GetClientEyePosition(client, ClientPos);
|
||||
MakeVectorFromPoints(ClientPos, TargetPos, Result);
|
||||
GetVectorAngles(Result, Result);
|
||||
angles[0] = Result[0];
|
||||
angles[1] = Result[1];
|
||||
angles[2] = Result[2];
|
||||
if (IsValidClient(target))
|
||||
{
|
||||
float TargetPos[3];
|
||||
float ClientPos[3];
|
||||
float Result[3];
|
||||
GetClientEyePosition(target, TargetPos);
|
||||
GetClientEyePosition(client, ClientPos);
|
||||
MakeVectorFromPoints(ClientPos, TargetPos, Result);
|
||||
GetVectorAngles(Result, Result);
|
||||
angles[0] = Result[0];
|
||||
angles[1] = Result[1];
|
||||
angles[2] = Result[2];
|
||||
}
|
||||
}
|
||||
|
||||
public Action OnPlayerRunCmd(int client, int& buttons, int& impulse, float vel[3], float angles[3], int& weapon, int& subtype, int& cmdnum, int& tickcount, int& seed, int mouse[2])
|
||||
|
Loading…
Reference in New Issue
Block a user