mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-10 00:43:59 +02:00
Fix game not ending on victory of allied human players in hotseat
This commit is contained in:
parent
3d7178dcef
commit
cf08b8bf50
@ -430,9 +430,10 @@ void ApplyClientNetPackVisitor::visitPlayerEndsGame(PlayerEndsGame & pack)
|
||||
{
|
||||
callAllInterfaces(cl, &IGameEventsReceiver::gameOver, pack.player, pack.victoryLossCheckResult);
|
||||
|
||||
bool localHumanWinsGame = vstd::contains(cl.playerint, pack.player) && cl.getPlayerState(pack.player)->human && pack.victoryLossCheckResult.victory();
|
||||
bool lastHumanEndsGame = CSH->howManyPlayerInterfaces() == 1 && vstd::contains(cl.playerint, pack.player) && cl.getPlayerState(pack.player)->human && !settings["session"]["spectate"].Bool();
|
||||
|
||||
if(lastHumanEndsGame)
|
||||
if(lastHumanEndsGame || localHumanWinsGame)
|
||||
{
|
||||
assert(adventureInt);
|
||||
if(adventureInt)
|
||||
|
Loading…
Reference in New Issue
Block a user