1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

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.
This commit is contained in:
Ewilhan 2019-05-04 15:56:17 +02:00 committed by Alexander Shishkin
parent cffd763bb5
commit b5243602ca

View File

@ -541,6 +541,8 @@ ui8 CServerHandler::getLoadMode()
if(pn.second.connection != c->connectionID)
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;
}