It's not that it's "all over the place" but rather they are different
components of the entire process.
The majority of the actual movement is handled inside gamemovement.
the in_* (CInput) handles the raw input itself for the local client (and by
default the view angles as manipulated by the mouse) which puts it into
CUserCmd. CUserCmd is then transmitted every frame down to the server which
is used by playermove and finally into CGameMovement for the final step,
and CPrediction also uses it to predict locally.
Once all of that is done, animstate is called from postthink every frame to
take the final result of everything and then decides what animations to
play as well as the final rendering angles of the player.

So to summarize the whole process (from memory here, I might be missing
something):

Input - Create CUserCmd
CUserCmd is sent for each frame to the server, and processed locally with
prediction
CPlayerMove then does:
  some prelimilary copy like eyeangles and buttons
   prethink (calls prethink on the player)
   think (calls think on the player if set)
   setupmove (copy usercmd -> CMoveData)
     gamemovement
   finishmove (update the player origin, angles, etc from gamemovement
(CMoveData)
 postthink (run animstate)

the client-side is slightly different for networked players, but the local
player runs the same process (more or less, through CPrediction instead of
PlayerRunCommand.

and note, that it doesn't happen precisely in that order for every command,
as the client will run and transmit input/CUserCmd as fast as it can.

Gamemovement is where you should be handling your "barrel roll"; why that
it's not working for you, I cannot say as I cannot see your implementation.

-Tony



On Sun, Aug 19, 2012 at 2:07 PM, Michael Kramer <[email protected]>wrote:

> Alright, I was able to modify the angles by adding some code into the
> multiplayer animstate, but I have a question for you.
>
> It seems that gamemovement adjusts only the origin, and not the
> viewangles/player angles at all, so I'm assuming adding anything in there
> would be wrong to do.
> It also seems like the movement code is all over the place, in player,
> gamemovement, in_mouse, playermove, etc is there a reason it is spread all
> over the place?
>
> It seems like ideally all player movement should be controlled in 1 place,
> and not 5 or 6 different areas...
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders

Reply via email to