mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
* fixed crash on visiting Sirens
* fixed race condition on the new turn, #729 should be gone * fixed crashes in AI-only game mode
This commit is contained in:
@ -1244,7 +1244,7 @@ void CGameHandler::run(bool resume)
|
||||
{
|
||||
YourTurn yt;
|
||||
yt.player = i->first;
|
||||
sendAndApply(&yt);
|
||||
applyAndSend(&yt);
|
||||
}
|
||||
|
||||
//wait till turn is done
|
||||
@ -1939,13 +1939,18 @@ void CGameHandler::sendToAllClients( CPackForClient * info )
|
||||
}
|
||||
}
|
||||
|
||||
void CGameHandler::sendAndApply( CPackForClient * info )
|
||||
void CGameHandler::sendAndApply(CPackForClient * info)
|
||||
{
|
||||
//TODO? mutex
|
||||
sendToAllClients(info);
|
||||
gs->apply(info);
|
||||
}
|
||||
|
||||
void CGameHandler::applyAndSend(CPackForClient * info)
|
||||
{
|
||||
gs->apply(info);
|
||||
sendToAllClients(info);
|
||||
}
|
||||
|
||||
void CGameHandler::sendAndApply(CGarrisonOperationPack * info)
|
||||
{
|
||||
sendAndApply((CPackForClient*)info);
|
||||
@ -5231,6 +5236,7 @@ void CGameHandler::spawnWanderingMonsters(int creatureID)
|
||||
tiles.erase(tile); //not use it again
|
||||
}
|
||||
}
|
||||
|
||||
CasualtiesAfterBattle::CasualtiesAfterBattle(const CArmedInstance *army, BattleInfo *bat)
|
||||
{
|
||||
int color = army->tempOwner;
|
||||
|
Reference in New Issue
Block a user