← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1766672-multiplayer-closed-slots into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1766672-multiplayer-closed-slots into lp:widelands.

Commit message:
Closed slots in multiplayer savegames now stay closed

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1766672 in widelands: "Broken game state when loading multiplayer game with spectators"
  https://bugs.launchpad.net/widelands/+bug/1766672

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1766672-multiplayer-closed-slots/+merge/345337
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1766672-multiplayer-closed-slots into lp:widelands.
=== modified file 'src/logic/game_settings.cc'
--- src/logic/game_settings.cc	2018-04-07 16:59:00 +0000
+++ src/logic/game_settings.cc	2018-05-10 06:40:50 +0000
@@ -34,5 +34,5 @@
 }
 
 bool GameSettings::uncloseable(PlayerSlot slot) const {
-	return (scenario && !players.at(slot).closeable) || savegame;
+	return (scenario && !players.at(slot).closeable) || (savegame && players.at(slot).state != PlayerSettings::State::kClosed);
 }


Follow ups