From 104fedb573e5033583ed0dbb5de5d783f305b739 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 24 Feb 2015 20:35:08 +1100 Subject: [PATCH] Give players full protection from crushing for a few seconds after leaving a vehicle --- qcsrc/common/vehicles/sv_vehicles.qc | 3 +-- qcsrc/common/vehicles/unit/bumblebee.qc | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index ecc9066398..49d6b3e7db 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -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); } diff --git a/qcsrc/common/vehicles/unit/bumblebee.qc b/qcsrc/common/vehicles/unit/bumblebee.qc index 598fcd7a7d..c77947fd80 100644 --- a/qcsrc/common/vehicles/unit/bumblebee.qc +++ b/qcsrc/common/vehicles/unit/bumblebee.qc @@ -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); -- 2.39.2