]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Fix paranthesis
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index ec8333070a905b759d4d4dc9fb56b86169ba6095..6cf371127651927b04cdb7eb165a1203ee21028e 100644 (file)
@@ -115,7 +115,7 @@ void GiveFrags (entity attacker, entity targ, float f, float deathtype)
                else if(!(attacker.weapons & WepSet_FromWeapon(culprit)))
                        culprit = attacker.weapon;
 
-               if(g_weaponarena_random_with_laser && culprit == WEP_BLASTER) // WEAPONTODO: Shouldn't this be in a mutator?
+               if(g_weaponarena_random_with_blaster && culprit == WEP_BLASTER) // WEAPONTODO: Shouldn't this be in a mutator?
                {
                        // no exchange
                }
@@ -826,7 +826,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                        self = oldself;
                }
 
-               if(!g_minstagib)
+               if(!g_instagib)
                {
                        // apply strength multiplier
                        if (attacker.items & IT_STRENGTH)
@@ -854,6 +854,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                // count the damage
                if(attacker)
                if(!targ.deadflag)
+               if(deathtype != DEATH_BUFF_VENGEANCE
                if(targ.takedamage == DAMAGE_AIM)
                if(targ != attacker)
                {
@@ -863,9 +864,9 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                        else
                                victim = targ;
 
-                       if(IS_PLAYER(victim) || victim.turrcaps_flags & TFL_TURRCAPS_ISTURRET || victim.flags & FL_MONSTER)
+                       if(IS_PLAYER(victim) || (victim.turrcaps_flags & TFL_TURRCAPS_ISTURRET) || (victim.flags & FL_MONSTER))
                        {
-                               if(DIFF_TEAM(victim, attacker))
+                               if(DIFF_TEAM(victim, attacker) && !victim.frozen)
                                {
                                        if(damage > 0)
                                        {
@@ -874,7 +875,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                                        if(victim.BUTTON_CHAT)
                                                                attacker.typehitsound += 1;
                                                        else
-                                                               attacker.hitsound += 1;
+                                                               attacker.damage_dealt += damage;
                                                }
 
                                                damage_goodhits += 1;
@@ -1300,12 +1301,12 @@ void Fire_ApplyDamage(entity e)
        t = min(frametime, e.fire_endtime - time);
        d = e.fire_damagepersec * t;
 
-       hi = e.fire_owner.hitsound;
+       hi = e.fire_owner.damage_dealt;
        ty = e.fire_owner.typehitsound;
        Damage(e, e, e.fire_owner, d, e.fire_deathtype, e.origin, '0 0 0');
        if(e.fire_hitsound && e.fire_owner)
        {
-               e.fire_owner.hitsound = hi;
+               e.fire_owner.damage_dealt = hi;
                e.fire_owner.typehitsound = ty;
        }
        e.fire_hitsound = TRUE;