1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-24 03:47:18 +02:00

Partial fix for mantiss #2237

This commit is contained in:
AlexVinS 2015-08-22 16:22:10 +03:00
parent 782c8ec40b
commit 40d3bb40c3
2 changed files with 11 additions and 0 deletions

View File

@ -30,6 +30,7 @@
<Add option="-lboost_thread$(#boost.libsuffix)" />
<Add option="-lboost_chrono$(#boost.libsuffix)" />
<Add option="-lboost_locale$(#boost.libsuffix)" />
<Add option="-liconv" />
<Add directory="$(#sdl2.lib)" />
<Add directory="$(#boost.lib32)" />
<Add directory="$(#zlib.lib)" />
@ -57,6 +58,7 @@
<Add option="-lboost_thread$(#boost.libsuffix)" />
<Add option="-lboost_chrono$(#boost.libsuffix)" />
<Add option="-lboost_locale$(#boost.libsuffix)" />
<Add option="-liconv" />
<Add directory="$(#sdl2.lib)" />
<Add directory="$(#boost.lib32)" />
<Add directory="$(#zlib.lib)" />

View File

@ -1605,6 +1605,15 @@ void CGameHandler::run(bool resume)
}
}
}
//additional check that game is not finished
bool activePlayer = false;
for(auto player : playerTurnOrder)
{
if(gs->players[player].status == EPlayerStatus::INGAME)
activePlayer = true;
}
if(!activePlayer)
end2 = true;
}
while(conns.size() && (*conns.begin())->isOpen())
boost::this_thread::sleep(boost::posix_time::milliseconds(5)); //give time client to close socket