pmove_state_t

This structure needs to be communicated bit-accurate from the server to the client to guarantee that prediction stays in sync, so no floats are used. Floats are multiplied by 8 before entered into this structure. If any part of the game code modifies this struct, it will result in a prediction error of some degree. This structure is sent with delta movement information to the client each client frame. This is how the client predicts where the player is and thus how to render the world.

Name

Type

Notes

delta_angles

short[3]

add to command angles to get view direction. Changed by spawns, rotating objects and teleporters

gravity

short

set according to global sv_gravity value in each call to ClientThink.

origin

short[3]

Set according to spawn point when putting client in server. Also set to enity_state_t .origin each ClientEndServerFrame.

pm_flags

byte

ducked, or teleporting

pm_time

byte

8ms units

pm_type

pmtype_t

movement type:

  • PM_NORMAL

  • PM_SPECTATOR
  • PM_DEAD, // no acceleration or turning
  • PM_GIB,// different bounding box
  • PM_FREEZE

velocity

short[3]

set each ClientEndServerFrame to the entitys s.velocity