]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_onslaught.qc
I'm a goddamn genius, IT WORKS!
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_onslaught.qc
index 3801de302d9c80fa2ab8cb0e7e3215d01dbf0ff4..d9c1bafab3c460a925292fc0977b57fb091fdc5f 100644 (file)
@@ -576,7 +576,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage,
        float i;
        if (damage <= 0)
                return;
-       if(inWarmupStage)
+       if(warmup_stage)
                return;
        if (attacker != self)
        {
@@ -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;
@@ -614,7 +614,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage,
 #endif
                self.lasthealth = self.health;
        }
-       else if not(inWarmupStage)
+       else if not(warmup_stage)
        {
                if (attacker == self)
                        bprint(Team_ColoredFullName(self.team), " generator spontaneously exploded due to overtime!\n");
@@ -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)