+extern cvar_t slowmo;
+void CL_UpdateMoveVars(void)
+{
+ if (cls.protocol == PROTOCOL_QUAKEWORLD)
+ cl.movevars_ticrate = 1.0 / bound(1, cl_netinputpacketspersecond.value, 100);
+ else if (cl.stats[STAT_MOVEVARS_TICRATE])
+ {
+ cl.movevars_ticrate = cl.statsf[STAT_MOVEVARS_TICRATE];
+ cl.movevars_slowmo = cl.statsf[STAT_MOVEVARS_TIMESCALE];
+ cl.movevars_gravity = cl.statsf[STAT_MOVEVARS_GRAVITY];
+ cl.movevars_stopspeed = cl.statsf[STAT_MOVEVARS_STOPSPEED] ;
+ cl.movevars_maxspeed = cl.statsf[STAT_MOVEVARS_MAXSPEED];
+ cl.movevars_spectatormaxspeed = cl.statsf[STAT_MOVEVARS_SPECTATORMAXSPEED];
+ cl.movevars_accelerate = cl.statsf[STAT_MOVEVARS_ACCELERATE];
+ cl.movevars_airaccelerate = cl.statsf[STAT_MOVEVARS_AIRACCELERATE];
+ cl.movevars_wateraccelerate = cl.statsf[STAT_MOVEVARS_WATERACCELERATE];
+ cl.movevars_entgravity = cl.statsf[STAT_MOVEVARS_ENTGRAVITY];
+ cl.movevars_jumpvelocity = cl.statsf[STAT_MOVEVARS_JUMPVELOCITY];
+ cl.movevars_edgefriction = cl.statsf[STAT_MOVEVARS_EDGEFRICTION];
+ cl.movevars_maxairspeed = cl.statsf[STAT_MOVEVARS_MAXAIRSPEED];
+ cl.movevars_stepheight = cl.statsf[STAT_MOVEVARS_STEPHEIGHT];
+ cl.movevars_airaccel_qw = cl.statsf[STAT_MOVEVARS_AIRACCEL_QW];
+ cl.movevars_airaccel_sideways_friction = cl.statsf[STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION];
+ }
+ else
+ {
+ cl.movevars_ticrate = 1.0 / bound(1, cl_netinputpacketspersecond.value, 100);
+ cl.movevars_slowmo = slowmo.value;
+ cl.movevars_gravity = sv_gravity.value;
+ cl.movevars_stopspeed = cl_movement_stopspeed.value;
+ cl.movevars_maxspeed = cl_movement_maxspeed.value;
+ cl.movevars_spectatormaxspeed = cl_movement_maxspeed.value;
+ cl.movevars_accelerate = cl_movement_accelerate.value;
+ cl.movevars_airaccelerate = cl_movement_airaccelerate.value < 0 ? cl_movement_accelerate.value : cl_movement_airaccelerate.value;
+ cl.movevars_wateraccelerate = cl_movement_wateraccelerate.value < 0 ? cl_movement_accelerate.value : cl_movement_wateraccelerate.value;
+ cl.movevars_friction = cl_movement_friction.value;
+ cl.movevars_waterfriction = cl_movement_waterfriction.value < 0 ? cl_movement_friction.value : cl_movement_waterfriction.value;
+ cl.movevars_entgravity = 1;
+ cl.movevars_jumpvelocity = cl_movement_jumpvelocity.value;
+ cl.movevars_edgefriction = cl_movement_edgefriction.value;
+ cl.movevars_maxairspeed = cl_movement_maxairspeed.value;
+ cl.movevars_stepheight = cl_movement_stepheight.value;
+ cl.movevars_airaccel_qw = cl_movement_airaccel_qw.value;
+ cl.movevars_airaccel_sideways_friction = cl_movement_airaccel_sideways_friction.value;
+ }
+}
+