X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fecs%2Fsystems%2Fsv_physics.qc;h=9e46dcfc57513b42bb6d6e634666a7c30fe6ed80;hp=4973a182973a0f002b77691a8f93ba8133da09da;hb=e0734881271f41a4d7ded04b160a9059d7476f33;hpb=c2914c8898b32a445ccd06318912f993f1a9a7af diff --git a/qcsrc/ecs/systems/sv_physics.qc b/qcsrc/ecs/systems/sv_physics.qc index 4973a1829..9e46dcfc5 100644 --- a/qcsrc/ecs/systems/sv_physics.qc +++ b/qcsrc/ecs/systems/sv_physics.qc @@ -3,14 +3,19 @@ void sys_phys_fix(entity this, float dt) { WarpZone_PlayerPhysics_FixVAngle(this); + STAT(MOVEVARS_HIGHSPEED, this) = autocvar_g_movement_highspeed; + MUTATOR_CALLHOOK(PlayerPhysics_UpdateStats, this); // do it BEFORE the function so we can modify highspeed! Physics_UpdateStats(this, PHYS_HIGHSPEED(this)); } bool sys_phys_override(entity this, float dt) { int buttons = PHYS_INPUT_BUTTON_MASK(this); + float idlesince = this.parm_idlesince; + this.parm_idlesince = time; // in the case that physics are overridden if (PM_check_specialcommand(this, buttons)) { return true; } if (this.PlayerPhysplug && this.PlayerPhysplug(this, dt)) { return true; } + this.parm_idlesince = idlesince; return false; } @@ -37,7 +42,7 @@ void sys_phys_ai(entity this) void sys_phys_pregame_hold(entity this) { if (!IS_PLAYER(this)) { return; } - const bool allowed_to_move = (time >= game_starttime && !gameover); + const bool allowed_to_move = (time >= game_starttime && !game_stopped); if (!allowed_to_move) { this.velocity = '0 0 0'; set_movetype(this, MOVETYPE_NONE);