Fixed prone shooting

This commit is contained in:
INeedGames 2020-11-08 20:30:33 -06:00
parent 23a682decd
commit f1de7e695a
2 changed files with 13 additions and 1 deletions

View File

@ -335,6 +335,10 @@ stance()
toStance = "stand";
if(self.bot.next_wp != -1)
toStance = level.waypoints[self.bot.next_wp].type;
if(toStance == "climb")
toStance = "stand";
if(toStance != "stand" && toStance != "crouch" && toStance != "prone")
toStance = "crouch";
@ -1203,7 +1207,7 @@ walk()
{
curweap = self getCurrentWeapon();
if(self.bot.target.entity.classname == "script_vehicle" || self.bot.isfraggingafter || self.bot.issmokingafter)
if(self.bot.target.entity.classname == "script_vehicle" || self.bot.isfraggingafter || self.bot.issmokingafter || self InLastStand() || self GetStance() == "prone")
{
continue;
}

View File

@ -130,6 +130,14 @@ IsBotReloading()
return self.bot.isreloading;
}
/*
Is bot knifing
*/
IsBotKnifing()
{
return self.bot.isknifingafter;
}
/*
Freezes the bot's controls.
*/