X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fecs%2Fsystems%2Fcl_physics.qc;h=4d38c574d9cdac5345bdf9782989aed40b694f7d;hp=624e0a9126e8a497272cf0ad2a9c98ec6b26b2eb;hb=06a08d0c6b573f2562297147171aff3d990fa42d;hpb=93e98e9d0187a81935aee4a2dfde8cb9410af67a diff --git a/qcsrc/ecs/systems/cl_physics.qc b/qcsrc/ecs/systems/cl_physics.qc index 624e0a9126..4d38c574d9 100644 --- a/qcsrc/ecs/systems/cl_physics.qc +++ b/qcsrc/ecs/systems/cl_physics.qc @@ -24,4 +24,15 @@ void sys_phys_pregame_hold(entity this) {} void sys_phys_spectator_control(entity this) {} -void sys_phys_fixspeed(entity this, float maxspeed_mod) {} +void sys_phys_fixspeed(entity this, float maxspeed_mod) +{ + float spd = STAT(MOVEVARS_SPEED, this); + 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); + } +}