1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Blocked most of incoming network packs during turns of other players

This commit is contained in:
Ivan Savenko
2024-04-27 12:36:24 +03:00
parent 3749439702
commit ac11a0e639
3 changed files with 48 additions and 1 deletions

View File

@ -1748,6 +1748,12 @@ void CGameHandler::throwIfWrongOwner(CPackForServer * pack, ObjectInstanceID id)
}
}
void CGameHandler::throwIfPlayerNotActive(CPackForServer * pack)
{
if (!turnOrder->isPlayerMakingTurn(pack->player))
throwNotAllowedAction(pack);
}
void CGameHandler::throwIfWrongPlayer(CPackForServer * pack)
{
throwIfWrongPlayer(pack, pack->player);