Hi,
I'm recording a player's view vectors and importing them into another application for analysis. Currently I update a list of all the view vectors each server_frame, and when the fire button has been pressed and released, I save it to a file. Although it works, the results are very choppy. Is this an coding error or just how the HL1 engine works?
Also included is a screenshot of vertical viewvec recording's plot. Notice how choppy it is.
Here's my server_frame. recordAngles records the angles to disk.
Code:
//anges stuff
new Float:angles[100][3];
new angleCurrent = 0;
//player stuff
new Players[32]
new playerCount
new inAttack=0;
public server_frame()
{
get_players(Players, playerCount, "c")
if(playerCount>0)
{
//a human player is in the game
new playerID = Players[0];
pev(playerID, pev_v_angle, angles[angleCurrent])
if(get_user_button(playerID) & IN_ATTACK)
{
inAttack=1;
}
else if(inAttack ==1)
{
//here the attack button has been clicked and released
//record the data
recordAngles();
inAttack=0;
client_print(playerID, print_chat, "Recorded Aim Vectors");
}
angleCurrent++;
if(angleCurrent > 99)
angleCurrent=0;
}
}
Thanks,
James