all_or_nothings bots fix

Fixed the infinite loop when using giveLoadout on a bot preventing us from giving a throwing knife and the scavenger specialist bonus on bots
This commit is contained in:
Resxt
2022-09-08 09:01:37 +02:00
parent 4356563fd9
commit 61f14dab32
2 changed files with 11 additions and 2 deletions

View File

@@ -110,10 +110,19 @@ ReplaceKillstreaks()
self.pers["gamemodeLoadout"]["loadoutKillstreak2"] = "none";
self.pers["gamemodeLoadout"]["loadoutKillstreak3"] = "none";
if (!isDefined(self.pers["isBot"]) || !self.pers["isBot"])
if (self IsBot())
{
self maps\mp\bots\_bot_utility::botGiveLoadout(self.team, "gamemode", false, true);
}
else
{
self maps\mp\gametypes\_class::giveLoadout(self.team, "gamemode", false, true);
}
maps\mp\killstreaks\_killstreaks::clearKillstreaks();
}
IsBot()
{
return IsDefined(self.pers["isBot"]) && self.pers["isBot"];
}