]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix player not dying from no ammo
authorMario <mario.mario@y7mail.com>
Thu, 7 Mar 2013 06:51:34 +0000 (17:51 +1100)
committerMario <mario.mario@y7mail.com>
Thu, 7 Mar 2013 06:51:34 +0000 (17:51 +1100)
qcsrc/server/mutators/mutator_minstagib.qc

index 49c4a8f57e80417ff7a9aac45feac9584d288b68..2dc001d8542920a306e6097bab63eb05a7011faf 100644 (file)
@@ -182,7 +182,7 @@ MUTATOR_HOOKFUNCTION(minstagib_PlayerPhysics)
 MUTATOR_HOOKFUNCTION(minstagib_SplitHealthArmor)
 {
        damage_save = 0;
-       damage_take = frag_damage;
+       //damage_take = frag_damage; // frag_damage isn't even set here?!
        
        return FALSE;
 }
@@ -203,10 +203,10 @@ MUTATOR_HOOKFUNCTION(minstagib_PlayStrengthSound)
 
 MUTATOR_HOOKFUNCTION(minstagib_PlayerDamage)
 {
-       if(autocvar_g_friendlyfire == 0)
+       if(autocvar_g_friendlyfire == 0 && !IsDifferentTeam(frag_target, frag_attacker) && IS_PLAYER(frag_target))
                frag_damage = 0;
                
-       if(frag_target.classname == "player")
+       if(IS_PLAYER(frag_target))
        {
                if ((frag_deathtype == DEATH_FALL)  ||
                        (frag_deathtype == DEATH_DROWN) ||