Usercmd: Difference between revisions
Jump to navigation
Jump to search
TomEdwards (talk | contribs) (→Code locations: more info; plus that SVN link is horribly outdated) |
TomEdwards (talk | contribs) |
||
Line 5: | Line 5: | ||
These need confirming. | These need confirming. | ||
#Input packaged in <code>client/c_baseplayer.cpp</code> and <code>client/c_basehlplayer.cpp</code> - look for <code>[[CreateMove()]]</code> | #Input packaged in <code>client/c_baseplayer.cpp</code> and <code>client/c_basehlplayer.cpp</code> - look for <code>[[CreateMove()]]</code>. | ||
#Class definition and data serialisation in <code>shared/usercmd.cpp</code> | #Class definition and data serialisation in <code>shared/usercmd.cpp</code>. | ||
# | #Server execution performed from the various <code>[[RunCommand()]]</code> and <code>[[PlayerRunCommand()]]</code> functions. | ||
== See also == | == See also == |
Revision as of 14:15, 14 June 2008
Usercmd (user command) is the player's input, for example the current keys pressed and current viewangle, which is sent to the server. By default it's sent 30 times per second (cl_cmdrate). It uses booleans to tell the server whether or not a specific variable has changed; if there has been no change, it doesn't send the new data.
Code locations
These need confirming.
- Input packaged in
client/c_baseplayer.cpp
andclient/c_basehlplayer.cpp
- look forCreateMove()
. - Class definition and data serialisation in
shared/usercmd.cpp
. - Server execution performed from the various
RunCommand()
andPlayerRunCommand()
functions.