From: Mario Date: Sun, 30 Aug 2015 11:49:46 +0000 (+1000) Subject: Prevent a potential crash with vehicles and bloodloss X-Git-Tag: xonotic-v0.8.2~1960 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c4d826fdcd84e247ef467865acabf63ada4581c1;p=xonotic%2Fxonotic-data.pk3dir.git Prevent a potential crash with vehicles and bloodloss --- diff --git a/qcsrc/server/mutators/mutator_bloodloss.qc b/qcsrc/server/mutators/mutator_bloodloss.qc index eb179a0c8..d68ff388f 100644 --- a/qcsrc/server/mutators/mutator_bloodloss.qc +++ b/qcsrc/server/mutators/mutator_bloodloss.qc @@ -13,7 +13,10 @@ MUTATOR_HOOKFUNCTION(bloodloss_PlayerThink) if(time >= self.bloodloss_timer) { - self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0'); + if(self.vehicle) + vehicles_exit(VHEF_RELEASE); + if(self.event_damage) + self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0'); self.bloodloss_timer = time + 0.5 + random() * 0.5; } }