VectorCopy(PRVM_clientedictvector(ent, velocity), s.velocity);
VectorCopy(PRVM_clientglobalvector(pmove_mins), s.mins);
VectorCopy(PRVM_clientglobalvector(pmove_maxs), s.maxs);
- s.crouched = 0; // FIXME we need the current crouched status
+ s.crouched = ((int)PRVM_clientedictfloat(ent, pmove_flags) & 1) != 0; // FIXME which flag?
s.waterjumptime = 0; // FIXME where do we get this from?
VectorCopy(PRVM_clientglobalvector(input_angles), s.cmd.viewangles);
s.cmd.forwardmove = PRVM_clientglobalvector(input_movevalues)[0];
s.cmd.upmove = PRVM_clientglobalvector(input_movevalues)[2];
s.cmd.buttons = PRVM_clientglobalfloat(input_buttons);
s.cmd.frametime = PRVM_clientglobalfloat(input_timelength);
- s.cmd.canjump = 1; // FIXME we need the current canjump status
+ s.cmd.canjump = ((int)PRVM_clientedictfloat(ent, pmove_flags) & 2) != 0; // FIXME which flag?
s.cmd.jump = (s.cmd.buttons & 2) != 0;
s.cmd.crouch = (s.cmd.buttons & 16) != 0;
VectorCopy(s.origin, PRVM_clientedictvector(ent, origin));
VectorCopy(s.velocity, PRVM_clientedictvector(ent, velocity));
+ PRVM_clientedictfloat(ent, pmove_flags) =
+ (s.crouched ? 1 : 0) |
+ (s.cmd.canjump ? 2 : 0);
}
//#348 string(float playernum, string keyname) getplayerkeyvalue (EXT_CSQC)
PRVM_DECLARE_clientfieldfloat(movetype)
PRVM_DECLARE_clientfieldfloat(nextthink)
PRVM_DECLARE_clientfieldfloat(pitch_speed)
+PRVM_DECLARE_clientfieldfloat(pmove_flags)
PRVM_DECLARE_clientfieldfloat(renderflags)
PRVM_DECLARE_clientfieldfloat(scale)
PRVM_DECLARE_clientfieldfloat(shadertime)
PRVM_DECLARE_field(playermodel)
PRVM_DECLARE_field(playerskin)
PRVM_DECLARE_field(pmodel)
+PRVM_DECLARE_field(pmove_flags)
PRVM_DECLARE_field(predraw)
PRVM_DECLARE_field(punchangle)
PRVM_DECLARE_field(punchvector)
PRVM_DECLARE_serverglobalvector(trace_plane_normal)
PRVM_DECLARE_serverglobalvector(v_forward)
PRVM_DECLARE_serverglobalvector(v_right)
-PRVM_DECLARE_serverglobalvector(v_up)
\ No newline at end of file
+PRVM_DECLARE_serverglobalvector(v_up)