- Moved most of the stuff happening in startGame outside of the swingWorker (to fix the ConcurrentModificationException error).

This commit is contained in:
Sloth
2012-11-23 16:10:40 +00:00
parent 9f157274ee
commit 32b81da2e0

View File

@@ -294,6 +294,15 @@ public class SSubmenuQuestUtil {
qData.setCurrentEvent(event); qData.setCurrentEvent(event);
qData.save(); qData.save();
return null;
}
@Override
public void done() {
SOverlayUtils.hideOverlay();
}
};
worker.execute();
PlayerStartConditions humanStart = new PlayerStartConditions(SSubmenuQuestUtil.getCurrentDeck()); PlayerStartConditions humanStart = new PlayerStartConditions(SSubmenuQuestUtil.getCurrentDeck());
PlayerStartConditions aiStart = new PlayerStartConditions(event.getEventDeck()); PlayerStartConditions aiStart = new PlayerStartConditions(event.getEventDeck());
@@ -327,15 +336,6 @@ public class SSubmenuQuestUtil {
Singletons.getModel().getMatch().initMatch(GameType.Quest, msh.getPlayerMap()); Singletons.getModel().getMatch().initMatch(GameType.Quest, msh.getPlayerMap());
Singletons.getModel().getMatch().startRound(); Singletons.getModel().getMatch().startRound();
return null;
}
@Override
public void done() {
SOverlayUtils.hideOverlay();
}
};
worker.execute();
} }
/** Duplicate in DeckEditorQuestMenu and /** Duplicate in DeckEditorQuestMenu and