]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove minstagib check from vampire mutator (vampire is now disabled if minstagib...
authorMario <mario.mario@y7mail.com>
Thu, 6 Jun 2013 07:15:01 +0000 (17:15 +1000)
committerMario <mario.mario@y7mail.com>
Thu, 6 Jun 2013 07:15:01 +0000 (17:15 +1000)
qcsrc/server/mutators/mutator_vampire.qc

index 1aa293b39ea260efd53f3c7a80cf1325ea749d32..edfcba4398d2da3eff0d465ecb03ef341fe37f75 100644 (file)
@@ -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)