]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/ecs/systems/sv_physics.qc
Merge branch 'master' into z411/bai-server
[xonotic/xonotic-data.pk3dir.git] / qcsrc / ecs / systems / sv_physics.qc
index 175c57c4844de5206959de1031ad4adff23577fa..568e19e68e5ceb609b210d4853cf241508524d75 100644 (file)
@@ -1,5 +1,9 @@
 #include "physics.qh"
 
+float autocvar_sv_spectator_speed_multiplier;
+float autocvar_sv_spectator_speed_multiplier_min = 1;
+float autocvar_sv_spectator_speed_multiplier_max = 5;
+
 void sys_phys_fix(entity this, float dt)
 {
        WarpZone_PlayerPhysics_FixVAngle(this);
@@ -22,7 +26,7 @@ void sys_phys_monitor(entity this, float dt)
 {
        int buttons = PHYS_INPUT_BUTTON_MASK(this);
        anticheat_physics(this);
-       if (sv_maxidle > 0) {
+       if (autocvar_sv_maxidle > 0) {
                if (buttons != CS(this).buttons_old
                    || CS(this).movement != CS(this).movement_old
                    || this.v_angle != CS(this).v_angle_old) { CS(this).parm_idlesince = time; }
@@ -40,7 +44,9 @@ 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 && !game_stopped);
+       // z411
+       //const bool allowed_to_move = (time >= game_starttime && !game_stopped);
+       const bool allowed_to_move = (!game_stopped && !game_timeout);
        if (!allowed_to_move) {
                this.velocity = '0 0 0';
                set_movetype(this, MOVETYPE_NONE);