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

More locks to avoid data races on server

This commit is contained in:
Ivan Savenko
2023-08-11 18:50:00 +03:00
parent ad2bd897d0
commit 4b307dc0e4
2 changed files with 8 additions and 0 deletions

View File

@@ -6464,6 +6464,8 @@ void CGameHandler::runBattle()
bool CGameHandler::makeAutomaticAction(const CStack *stack, BattleAction &ba)
{
boost::unique_lock lock(battleActionMutex);
BattleSetActiveStack bsa;
bsa.stack = stack->unitId();
bsa.askPlayerInterface = false;