From 964097513a2d37bc994b35677a80d17ced6c3582 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 6 Jun 2013 17:15:01 +1000 Subject: [PATCH] Remove minstagib check from vampire mutator (vampire is now disabled if minstagib is enabled, so it is useless) --- qcsrc/server/mutators/mutator_vampire.qc | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/qcsrc/server/mutators/mutator_vampire.qc b/qcsrc/server/mutators/mutator_vampire.qc index 1aa293b39..edfcba439 100644 --- a/qcsrc/server/mutators/mutator_vampire.qc +++ b/qcsrc/server/mutators/mutator_vampire.qc @@ -1,19 +1,14 @@ MUTATOR_HOOKFUNCTION(vampire_PlayerDamage) { - if(time < self.spawnshieldtime) - return 0; - if(g_minstagib) + if(time >= frag_target.spawnshieldtime) + if(frag_target != frag_attacker) + if(frag_target.deadflag == DEAD_NO) { - // minstagib: each hit means +1 ammo - if(frag_attacker != frag_target) - frag_attacker.ammo_cells += 2; // note: 1 cell was deducted for the shot + frag_attacker.health += bound(0, damage_take, frag_target.health); + frag_attacker.health = bound(0, frag_attacker.health, autocvar_g_balance_health_limit); } - else - { - // otherwise: each hit gets damage back - frag_attacker.health = frag_attacker.health + bound(0, damage_take, self.health); - } - return 0; + + return FALSE; } MUTATOR_HOOKFUNCTION(vampire_BuildMutatorsString) -- 2.39.2