Batfoxkid / Freak-Fortress-2-Rewrite

The gamemode that's now also a standalone boss maker.
https://forums.alliedmods.net/forumdisplay.php?f=154
GNU General Public License v3.0
17 stars 7 forks source link

[Bug] rage_cloneattack is missing IsClientSourceTV() checks #202

Closed naydef closed 1 month ago

naydef commented 4 months ago

Description

SourceTV bot becomes spawned by rage_cloneattack, due to missing IsClientSourceTV() checks. (same applies for replay bot)

Diff:

@@ -2610,7 +2610,7 @@ void Rage_CloneAttack(int client, ConfigData cfg)
        {
            for(int target = 1; target <= MaxClients; target++)
            {
-               if(client == target || !IsClientInGame(target) || IsPlayerAlive(target) || GetClientTeam(target) != team)
+               if(client == target || !IsClientInGame(target) || IsPlayerAlive(target) || GetClientTeam(target) != team || IsClientSourceTV(target) || IsClientReplay(target))
                    continue;

                if(FF2R_GetBossData(target))
@@ -2634,7 +2634,7 @@ void Rage_CloneAttack(int client, ConfigData cfg)
        {
            for(int target = 1; target <= MaxClients; target++)
            {
-               if(client == target || !IsClientInGame(target) || IsPlayerAlive(target) || GetClientTeam(target) == team)
+               if(client == target || !IsClientInGame(target) || IsPlayerAlive(target) || GetClientTeam(target) == team || IsClientSourceTV(target) || IsClientReplay(target))
                    continue;

                if(FF2R_GetBossData(target))
@@ -2657,7 +2657,7 @@ void Rage_CloneAttack(int client, ConfigData cfg)
            {
                for(int target = 1; target <= MaxClients; target++)
                {
-                   if(client == target || !IsClientInGame(target) || IsPlayerAlive(target) || GetClientTeam(target) <= view_as<int>(TFTeam_Spectator))
+                   if(client == target || !IsClientInGame(target) || IsPlayerAlive(target) || GetClientTeam(target) <= view_as<int>(TFTeam_Spectator) || IsClientSourceTV(target) || IsClientReplay(target))
                        continue;

                    if(FF2R_GetBossData(target))