]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Update oldorigin when setting player's new position in a vehicle, fixes falldamage...
authorMario <mario@smbclan.net>
Mon, 17 Apr 2017 01:46:38 +0000 (11:46 +1000)
committerMario <mario@smbclan.net>
Mon, 17 Apr 2017 01:46:38 +0000 (11:46 +1000)
qcsrc/common/vehicles/vehicle/bumblebee.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc

index 69d7dbf8905da2dffb17562a1d32264ae2cd2914..1c9e6e1a41d549166b53d6c9f3ec004438a1dc07 100644 (file)
@@ -99,6 +99,7 @@ bool bumblebee_gunner_frame(entity this, float dt)
                _out = autocvar_g_vehicle_bumblebee_cannon_turnlimit_in;
                setorigin(this, vehic.origin + v_up * -16 + v_forward * -16 + v_right * -128);
        }
+       this.oldorigin = this.origin; // negate fall damage
 
        crosshair_trace(this);
        vector _ct = trace_endpos;
@@ -607,6 +608,7 @@ bool bumblebee_pilot_frame(entity this, float dt)
        makevectors(vehic.angles);
        vehic.angles_x *= -1;
        setorigin(this, vehic.origin + v_up * 48 + v_forward * 160);
+       this.oldorigin = this.origin; // negate fall damage
 
        PHYS_INPUT_BUTTON_ATCK(this) = PHYS_INPUT_BUTTON_ATCK2(this) = PHYS_INPUT_BUTTON_CROUCH(this) = false;
 }
index b972f8aafb8207f33e707122847cf48af8e5565b..b62eac09af0cb173b1de76a1e51595b448f7bdac 100644 (file)
@@ -377,6 +377,7 @@ bool racer_frame(entity this, float dt)
 #endif
 
        setorigin(this, vehic.origin + '0 0 32');
+       this.oldorigin = this.origin; // negate fall damage
        this.velocity = vehic.velocity;
 }
 
index 78fdba5117148f9196ddbec467809503c8f23bfe..269ea5fef9ec8aca41eb5251a1dffc7ed8a4480a 100644 (file)
@@ -254,6 +254,7 @@ bool raptor_frame(entity this, float dt)
        vehic.velocity  += df * dt;
        this.velocity = this.movement  = vehic.velocity;
        setorigin(this, vehic.origin + '0 0 32');
+       this.oldorigin = this.origin; // negate fall damage
 
        this.vehicle_weapon2mode = vehic.vehicle_weapon2mode;
 
index a5411e843474927583544807a07ef7ce58dd151b..164371e131b5274eef7f81c41e7d74f4ffcf9911 100644 (file)
@@ -308,6 +308,7 @@ bool spiderbot_frame(entity this, float dt)
                this.vehicle_reload2 = 100 - ((vehic.gun2.cnt - time) / vehic.attack_finished_single[0]) * 100;
 
        setorigin(this, vehic.origin + '0 0 1' * vehic.maxs_z);
+       this.oldorigin = this.origin; // negate fall damage
        this.velocity = vehic.velocity;
 
        VEHICLE_UPDATE_PLAYER(this, vehic, health, spiderbot);