]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_rocketlauncher.qc
Replace all player/bot/spectator classname checks with macros
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_rocketlauncher.qc
index add0207d12b57c8fd1ec90abd776143407bef84a..456d24907986c1cb442e53a8886e6565b707607d 100644 (file)
@@ -19,7 +19,7 @@ void W_Rocket_Explode ()
        W_Rocket_Unregister();
 
        if(other.takedamage == DAMAGE_AIM)
        W_Rocket_Unregister();
 
        if(other.takedamage == DAMAGE_AIM)
-               if(other.classname == "player")
+               if(IS_PLAYER(other))
                        if(IsDifferentTeam(self.realowner, other))
                                if(other.deadflag == DEAD_NO)
                                        if(IsFlying(other))
                        if(IsDifferentTeam(self.realowner, other))
                                if(other.deadflag == DEAD_NO)
                                        if(IsFlying(other))
@@ -348,7 +348,7 @@ float w_rlauncher(float req)
                                        //As the distance gets larger, a correct detonation gets near imposible
                                        //Bots are assumed to use the rocket spawnfunc_light to see if the rocket gets near a player
                                        if(v_forward * normalize(missile.origin - self.enemy.origin)< 0.1)
                                        //As the distance gets larger, a correct detonation gets near imposible
                                        //Bots are assumed to use the rocket spawnfunc_light to see if the rocket gets near a player
                                        if(v_forward * normalize(missile.origin - self.enemy.origin)< 0.1)
-                                               if(self.enemy.classname == "player")
+                                               if(IS_PLAYER(self.enemy))
                                                        if(desirabledamage >= 0.1*coredamage)
                                                                if(random()/distance*300 > frametime*bound(0,(10-skill)*0.2,1))
                                                                        self.BUTTON_ATCK2 = TRUE;
                                                        if(desirabledamage >= 0.1*coredamage)
                                                                if(random()/distance*300 > frametime*bound(0,(10-skill)*0.2,1))
                                                                        self.BUTTON_ATCK2 = TRUE;