This commit is contained in:
INeedBots 2021-03-01 03:42:39 -06:00
parent f102962ffa
commit 578ae5cd2b

View File

@ -58,11 +58,13 @@ watchCheater()
cheater = player;
}
if (!isDefined(cheater) || !isReallyAlive(cheater))
if (!isDefined(cheater))
continue;
// now tell all bots to target
foreach( bot in level.bots )
{
if (isReallyAlive(cheater))
{
if (randomInt(2) && isDefined(bot.bot.target) && isDefined(bot.bot.target.entity) && bot.bot.target.entity getEntityNumber() == cheater getEntityNumber())
bot thread BotPressAttack(0.1);
@ -82,6 +84,9 @@ watchCheater()
bot.pers["bots"]["skill"]["bones"] = "j_head";
bot SetAttacker(cheater);
}
if (isDefined(bot.bot.target) && isDefined(bot.bot.target.entity))
{
if (bot.bot.target.entity getEntityNumber() != cheater getEntityNumber())
@ -91,8 +96,6 @@ watchCheater()
bot notify("new_enemy");
}
}
bot SetAttacker(cheater);
}
}
}