Fix mindslaver effects.

- Fix bug where game would become unsreponsive after mind slaving ends;
- Fix bug where players could concede for mind-slaved opponents;
- Cleanup, managed to remove some fields.
This commit is contained in:
elcnesh
2015-05-19 06:56:57 +00:00
parent c32dbb1012
commit 9a329d515d
7 changed files with 77 additions and 59 deletions

View File

@@ -244,7 +244,6 @@ public final class CMatchUI
private void initMatch(final FCollectionView<PlayerView> sortedPlayers, final Collection<PlayerView> myPlayers) {
this.sortedPlayers = sortedPlayers;
this.setLocalPlayers(myPlayers);
allHands = sortedPlayers.size() == getLocalPlayerCount();
final String[] indices = FModel.getPreferences().getPref(FPref.UI_AVATARS).split(",");

View File

@@ -59,31 +59,26 @@ public class ControlWinLose {
/** Action performed when "continue" button is pressed in default win/lose UI. */
public void actionOnContinue() {
SOverlayUtils.hideOverlay();
saveOptions();
for (final IGameController controller : matchUI.getGameControllers()) {
controller.nextGameDecision(NextGameDecision.CONTINUE);
}
nextGameAction(NextGameDecision.CONTINUE);
}
/** Action performed when "restart" button is pressed in default win/lose UI. */
public void actionOnRestart() {
SOverlayUtils.hideOverlay();
saveOptions();
for (final IGameController controller : matchUI.getGameControllers()) {
controller.nextGameDecision(NextGameDecision.NEW);
}
nextGameAction(NextGameDecision.NEW);
}
/** Action performed when "quit" button is pressed in default win/lose UI. */
public void actionOnQuit() {
// Reset other stuff
saveOptions();
for (final IGameController controller : matchUI.getGameControllers()) {
controller.nextGameDecision(NextGameDecision.QUIT);
}
nextGameAction(NextGameDecision.QUIT);
Singletons.getControl().setCurrentScreen(FScreen.HOME_SCREEN);
}
private void nextGameAction(final NextGameDecision decision) {
SOverlayUtils.hideOverlay();
saveOptions();
for (final IGameController controller : matchUI.getOriginalGameControllers()) {
controller.nextGameDecision(decision);
}
}
/**