-
-
Notifications
You must be signed in to change notification settings - Fork 53
User commands
Saul Rennison edited this page Feb 12, 2022
·
1 revision
A user command (usercmd) contains information about the player's inputs: which keys are pressed and any movement of the mouse. The game client sends a user command to the game server many times per second (defined by the cl_cmdrate
convar). This information is only recorded in POV demos - it is not available in GOTV demos. More technical details can be found on Usercmd.
You can observe each user command with:
demoFile.on("usercmd", cmd => {
if (cmd.buttons.includes("jump") && cmd.buttons.includes("back")) {
console.log("player jumped backwards!");
}
});