From: Mario Date: Tue, 24 Feb 2015 09:35:08 +0000 (+1100) Subject: Give players full protection from crushing for a few seconds after leaving a vehicle X-Git-Tag: xonotic-v0.8.2~2059^2~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=104fedb573e5033583ed0dbb5de5d783f305b739;p=xonotic%2Fxonotic-data.pk3dir.git Give players full protection from crushing for a few seconds after leaving a vehicle --- 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);