From: Mario Date: Tue, 10 Sep 2013 06:04:26 +0000 (+1000) Subject: Eject the player from their vehicle before killing them (fixes a crash when shuffling... X-Git-Tag: xonotic-v0.8.0~333^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0bb9018103768a084c314d848178899af1c9ef0a;p=xonotic%2Fxonotic-data.pk3dir.git Eject the player from their vehicle before killing them (fixes a crash when shuffling teams) --- diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 61b5add2b..6686fb695 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -588,6 +588,10 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float if(deathtype == DEATH_KILL || deathtype == DEATH_TEAMCHANGE || deathtype == DEATH_AUTOTEAMCHANGE) { + // exit the vehicle before killing (fixes a crash) + if(IS_PLAYER(targ) && targ.vehicle) + vehicles_exit(VHEF_RELESE); + // These are ALWAYS lethal // No damage modification here // Instead, prepare the victim for his death...