]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Give players full protection from crushing for a few seconds after leaving a vehicle
authorMario <zacjardine@y7mail.com>
Tue, 24 Feb 2015 09:35:08 +0000 (20:35 +1100)
committerMario <zacjardine@y7mail.com>
Tue, 24 Feb 2015 09:35:08 +0000 (20:35 +1100)
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/unit/bumblebee.qc

index ecc9066398394a7e77ebe5dcbe811ab9df1f3249..49d6b3e7db842916f1a9d5804094e3e37e8b8e6f 100644 (file)
@@ -705,7 +705,7 @@ void vehicles_damage(entity inflictor, entity attacker, float damage, float deat
 
 bool vehicles_crushable(entity e)
 {
-       if(IS_PLAYER(e))
+       if(IS_PLAYER(e) && time >= e.vehicle_enter_delay)
                return true;
 
        if(e.flags & FL_MONSTER)
@@ -847,7 +847,6 @@ void vehicles_exit(float eject)
                _player.switchweapon    = _vehicle.switchweapon;
                _player.last_vehiclecheck = time + 3;
                _player.vehicle_enter_delay = time + 2;
-               _player.spawnshieldtime = time + 0.5; // protect them long enough to escape the deadly vehicle
 
                CSQCVehicleSetup(_player, HUD_NORMAL);
        }
index 598fcd7a7d18e452eb469138db802cbeb832b3f0..c77947fd80d5bf87cc2b11a0d8d36717cbc49783 100644 (file)
@@ -268,7 +268,6 @@ void bumblebee_gunner_exit(int _exitflag)
        player.teleportable       = TELEPORT_NORMAL;
        player.switchweapon   = gunner.switchweapon;
        player.vehicle_enter_delay = time + 2;
-       player.spawnshieldtime = time + 0.5;
 
        fixedmakevectors(vehic.angles);