Fix (now really, I hope) ai vs ai matches in quest tournament mode.

This commit is contained in:
elcnesh
2015-02-23 10:03:41 +00:00
parent 14a80531a1
commit eedb76c31e
3 changed files with 11 additions and 26 deletions

View File

@@ -223,9 +223,13 @@ public class HostedMatch {
match.startGame(game);
// After game is over...
if (match.isMatchOver() && humanCount == 0) {
if (humanCount == 0) {
// ... if no human players, let AI decide next game
addNextGameDecision(null, NextGameDecision.CONTINUE);
if (match.isMatchOver()) {
addNextGameDecision(null, NextGameDecision.QUIT);
} else {
addNextGameDecision(null, NextGameDecision.CONTINUE);
}
}
}
});

View File

@@ -196,7 +196,7 @@ public class QuestDraftUtils {
rules.canCloneUseTargetsImage = FModel.getPreferences().getPrefBoolean(FPref.UI_CLONE_MODE_SOURCE);
final HostedMatch newMatch = GuiBase.getInterface().hostMatch();
newMatch.startMatch(rules, null, nextMatch.matchStarter, nextMatch.humanPlayer, gui);
newMatch.startMatch(rules, null, nextMatch.matchStarter, nextMatch.humanPlayer, GuiBase.getInterface().getNewGuiGame());
}
public static void continueMatches(final IGuiGame gui) {