bot: stop shoot breakable task in case enemy exists
manager: fix crash due miss-swap of max and min difficulty levels on bot adding (thx @stalin_alex)
This commit is contained in:
parent
cd02ca3a23
commit
113cb5e916
5 changed files with 123 additions and 20 deletions
|
|
@ -1469,9 +1469,10 @@ void Bot::escapeFromBomb_ () {
|
|||
}
|
||||
|
||||
void Bot::shootBreakable_ () {
|
||||
const bool hasEnemy = !game.isNullEntity (m_enemy);
|
||||
|
||||
// breakable destroyed?
|
||||
if (!game.isBreakableEntity (m_breakableEntity)) {
|
||||
if (hasEnemy || !game.isBreakableEntity (m_breakableEntity)) {
|
||||
completeTask ();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue