stop move

This commit is contained in:
Your Name 2020-09-11 21:06:37 -06:00
parent 557bdfefd1
commit 246cbd24cb
2 changed files with 10 additions and 1 deletions

View File

@ -120,6 +120,7 @@ resetBotVars()
self.bot.second_next_wp = -1;
self.bot.towards_goal = undefined;
self.bot.astar = [];
self.bot.stop_move = false;
self.bot.isfrozen = false;
self.bot.sprintendtime = -1;
@ -1074,7 +1075,7 @@ walk()
self botMoveTo(self.origin);
if(level.inPrematchPeriod || level.gameEnded || self.bot.isfrozen)
if(level.inPrematchPeriod || level.gameEnded || self.bot.isfrozen || self.bot.stop_move)
continue;
if(self maps\mp\_flashgrenades::isFlashbanged())

View File

@ -204,6 +204,14 @@ WeaponIsFullAuto(weap)
return isDefined(weaptoks[0]) && isString(weaptoks[0]) && isdefined(level.bots_fullautoguns[weaptoks[0]]);
}
BotStopMoving(what)
{
self.bot.stop_move = what;
if(what)
self notify("kill_goal");
}
/*
Returns if the bot has a script enemy.
*/