Raised This Month: $ Target: $400
 0% 

Why is pev_v_angle so choppy?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
jameszhao00
Junior Member
Join Date: Jan 2008
Old 01-05-2008 , 22:26   Why is pev_v_angle so choppy?
Reply With Quote #1

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
Attached Thumbnails
Click image for larger version

Name:	screenshot.jpg
Views:	152
Size:	13.3 KB
ID:	22760  

Last edited by jameszhao00; 01-05-2008 at 22:29.
jameszhao00 is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode