Просмотр исходного кода

Fix wrong savefiles shown while playing Hotseat Mode (#585)

* Fix wrong save files shown in HotSeat mode

Previous condition only checked for players' connection ID. HotSeat mode does not use multiple connection IDs, so getLoadMode() thought it was SPMode.
Now checking number of interfaces to cover offline-multiplayer.
Ewilhan 6 лет назад
Родитель
Сommit
b5243602ca
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      client/CServerHandler.cpp

+ 2 - 0
client/CServerHandler.cpp

@@ -541,6 +541,8 @@ ui8 CServerHandler::getLoadMode()
 			if(pn.second.connection != c->connectionID)
 			if(pn.second.connection != c->connectionID)
 				return ELoadMode::MULTI;
 				return ELoadMode::MULTI;
 		}
 		}
+		if(howManyPlayerInterfaces() > 1)  //this condition will work for hotseat mode OR multiplayer with allowed more than 1 color per player to control
+			return ELoadMode::MULTI;
 
 
 		return ELoadMode::SINGLE;
 		return ELoadMode::SINGLE;
 	}
 	}