+void sys_phys_fixspeed(entity this, float maxspeed_mod)
+{
+ float spd = max(PHYS_MAXSPEED(this), PHYS_MAXAIRSPEED(this)) * maxspeed_mod;
+ if (this.speed != spd) {
+ this.speed = spd;
+ string temps = ftos(spd);
+ cvar_set("cl_forwardspeed", temps);
+ cvar_set("cl_backspeed", temps);
+ cvar_set("cl_sidespeed", temps);
+ cvar_set("cl_upspeed", temps);
+ }
+}