From c4d826fdcd84e247ef467865acabf63ada4581c1 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 30 Aug 2015 21:49:46 +1000 Subject: [PATCH] Prevent a potential crash with vehicles and bloodloss --- qcsrc/server/mutators/mutator_bloodloss.qc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } } -- 2.39.2