Merge remote branch 'origin/master' into fruitiex/gamemode_freezetag
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index cde87fe..7af3a86 100644 (file)
@@ -528,6 +528,15 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                if (attacker.isbot)
                        damage = damage * bound(0.1, (skill + 5) * 0.1, 1);
 
+               if(g_freezetag)
+               {
+                       if(targ.freezetag_frozen == 1)
+                       {
+                               damage = 0;
+                               force = force * cvar("g_freezetag_frozen_force");
+                       }
+               }
+
                // nullify damage if teamplay is on
                if(deathtype != DEATH_TELEFRAG)
                if(attacker.classname == "player")