]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/ecs/systems/physics.qc
Merge branch 'issue-1618-Add-Disconnect-button' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / ecs / systems / physics.qc
index e6c2f7ccd8617e0087b19d0224d5e0760174cf3f..8896b5a442ba42d78c4420ee3c0332dacb2956c6 100644 (file)
@@ -43,12 +43,12 @@ void sys_phys_update(entity this, float dt)
        float maxspeed_mod = (!this.in_swamp) ? 1 : this.swamp_slowdown;  // cvar("g_balance_swamp_moverate");
 
 // conveyors: first fix velocity
-       if (this.conveyor.state) { this.velocity -= this.conveyor.movedir; }
+       if (this.conveyor.active) { this.velocity -= this.conveyor.movedir; }
        MUTATOR_CALLHOOK(PlayerPhysics, this, dt);
 
        if (!IS_PLAYER(this)) {
                sys_phys_spectator_control(this);
-               maxspeed_mod = this.spectatorspeed;
+               maxspeed_mod = STAT(SPECTATORSPEED, this);
        }
        sys_phys_fixspeed(this, maxspeed_mod);
 
@@ -108,6 +108,7 @@ void sys_phys_update(entity this, float dt)
                this.com_phys_water = true;
                sys_phys_simulate(this, dt);
                this.com_phys_water = false;
+               this.jumppadcount = 0;
        } else if (time < this.ladder_time) {
                this.com_phys_friction = PHYS_FRICTION(this);
                this.com_phys_vel_max = PHYS_MAXSPEED(this) * maxspeed_mod;
@@ -155,7 +156,7 @@ void sys_phys_update(entity this, float dt)
        LABEL(end)
        if (IS_ONGROUND(this)) { this.lastground = time; }
 // conveyors: then break velocity again
-       if (this.conveyor.state) { this.velocity += this.conveyor.movedir; }
+       if (this.conveyor.active) { this.velocity += this.conveyor.movedir; }
        this.lastflags = this.flags;
 
        this.lastclassname = this.classname;