- Fix a memory leak in AI "payTheManaCost"
- Minor fixes in AI code - Attempt at preventing the AI from interrupting itself while it's selecting targets. I don't know why this happens, and my fix didn't work. I believe it shouldn't be possible to interrupt when there is an active targetChooser, please let me know if this is an incorrect assumption.
This commit is contained in:
@@ -586,6 +586,13 @@ int ActionStack::setIsInterrupting(Player * player)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Is it a valid interruption request, or is uninterruptible stuff going on in the game?
|
||||
if (game->getCurrentTargetChooser())
|
||||
{
|
||||
DebugTrace("ActionStack: WARNING - We were asked to interrupt, but some un-interruptible action is already going on");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int playerId = (player == game->players[1]) ? 1 : 0;
|
||||
interruptDecision[playerId] = -1;
|
||||
game->isInterrupting = player;
|
||||
|
||||
Reference in New Issue
Block a user