IsPlayerModelOK

This commit is contained in:
INeedBots 2020-12-03 20:58:10 -06:00
parent 8ba7d014ea
commit e43ccf77d6
3 changed files with 14 additions and 6 deletions

View File

@ -681,7 +681,7 @@ target()
{
player = level.players[i];
if(!isDefined(player.bot_model_fix))
if(!self IsPlayerModelOK())
continue;
if(player == self)
continue;

View File

@ -138,7 +138,7 @@ bot_cry_for_help( attacker )
if(!isDefined(player.team))
continue;
if(!isDefined(player.bot_model_fix))
if(!self IsPlayerModelOK())
continue;
if ( !IsAlive( player ) )
@ -1454,7 +1454,7 @@ bot_think_follow()
{
player = level.players[i];
if(!isDefined(player.bot_model_fix))
if(!self IsPlayerModelOK())
continue;
if (player == self)
@ -1968,7 +1968,7 @@ bot_listen_to_steps()
{
player = level.players[i];
if(!isDefined(player.bot_model_fix))
if(!self IsPlayerModelOK())
continue;
if(player == self)
@ -2170,7 +2170,7 @@ bot_killstreak_think()
{
player = level.players[i];
if(!isDefined(player.bot_model_fix))
if(!self IsPlayerModelOK())
continue;
if(player == self)
@ -2251,7 +2251,7 @@ bot_uav_think()
{
player = level.players[i];
if(!isDefined(player.bot_model_fix))
if(!self IsPlayerModelOK())
continue;
if(player == self)

View File

@ -161,6 +161,14 @@ IsBotKnifing()
return self.bot.isknifingafter;
}
/*
If the model of the player is good
*/
IsPlayerModelOK()
{
return (isDefined(self.bot_model_fix));
}
/*
Freezes the bot's controls.
*/