add goal prio

This commit is contained in:
ineed bots
2023-11-30 03:19:54 -06:00
parent a114e724fd
commit 90eec289a1
3 changed files with 31 additions and 3 deletions

View File

@@ -468,6 +468,32 @@ HasThreat()
return ( isDefined( self GetThreat() ) );
}
/*
Returns whether the bot has a priority objective
*/
HasPriorityObjective()
{
return self.bot.prio_objective;
}
/*
Sets the bot to prioritize the objective over targeting enemies
*/
SetPriorityObjective()
{
self.bot.prio_objective = true;
self notify( "kill_goal" );
}
/*
Clears the bot's priority objective to allow the bot to target enemies automatically again
*/
ClearPriorityObjective()
{
self.bot.prio_objective = false;
self notify( "kill_goal" );
}
/*
If the player is defusing
*/