]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_onslaught.qc
Merge branch 'master' into Mario/classname_checks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_onslaught.qc
index 3801de302d9c80fa2ab8cb0e7e3215d01dbf0ff4..e4be2d7ab4ce2ea2b9422456b2affc7fbec3f2fd 100644 (file)
@@ -584,7 +584,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage,
                {
                        // this is protected by a shield, so ignore the damage
                        if (time > self.pain_finished)
-                               if (attacker.classname == "player")
+                               if (IS_PLAYER(attacker))
                                {
                                        play2(attacker, "onslaught/damageblockedbyshield.wav");
                                        self.pain_finished = time + 1;
@@ -978,7 +978,7 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float
        {
                // this is protected by a shield, so ignore the damage
                if (time > self.pain_finished)
-                       if (attacker.classname == "player")
+                       if (IS_PLAYER(attacker))
                        {
                                play2(attacker, "onslaught/damageblockedbyshield.wav");
                                self.pain_finished = time + 1;
@@ -986,7 +986,7 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float
                return;
        }
 
-       if (attacker.classname == "player")
+       if (IS_PLAYER(attacker))
        {
                nag = FALSE;
                if(self.team == NUM_TEAM_1)
@@ -1271,7 +1271,7 @@ void onslaught_controlpoint_touch()
 {
        entity e;
        float a;
-       if (other.classname != "player")
+       if not(IS_PLAYER(other))
                return;
        a = onslaught_controlpoint_attackable(self, other.team);
        if(a != 2 && a != 4)