+#include "../_all.qh"
+
+#include "mutator.qh"
+
.float bloodloss_timer;
MUTATOR_HOOKFUNCTION(bloodloss_PlayerThink)
-{
+{SELFPARAM();
if(IS_PLAYER(self))
if(self.health <= autocvar_g_bloodloss && self.deadflag == DEAD_NO)
{
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;
}
}
}
MUTATOR_HOOKFUNCTION(bloodloss_PlayerJump)
-{
+{SELFPARAM();
if(self.health <= autocvar_g_bloodloss)
return true;