1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

basic multiplayer support

This commit is contained in:
Laserlicht
2025-10-25 17:55:25 +02:00
parent c6730a2dcc
commit 134017a7cd
5 changed files with 12 additions and 8 deletions

View File

@@ -3480,10 +3480,13 @@ void CGameHandler::checkVictoryLossConditionsForPlayer(PlayerColor player)
if(gameState().getMap().battleOnly)
{
PlayerEndsGame peg;
peg.player = player;
peg.silentEnd = true;
sendAndApply(peg);
for(const auto & playerIt : gameState().players)
{
PlayerEndsGame peg;
peg.player = playerIt.first;
peg.silentEnd = true;
sendAndApply(peg);
}
gameServer().setState(EServerState::SHUTDOWN);
return;
}