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

Hold timer client counter

This commit is contained in:
nordsoft
2023-08-28 05:06:43 +04:00
parent 21af69e0b7
commit b5417c667c
3 changed files with 14 additions and 2 deletions

View File

@@ -140,7 +140,7 @@ CPlayerInterface::CPlayerInterface(PlayerColor Player):
firstCall = 1; //if loading will be overwritten in serialize
autosaveCount = 0;
isAutoFightOn = false;
timerEnabled = true;
duringMovement = false;
ignoreEvents = false;
numOfMovedArts = 0;
@@ -272,6 +272,8 @@ void CPlayerInterface::yourTurn(QueryID queryID)
makingTurn = true;
adventureInt->onPlayerTurnStarted(playerID);
}
timerEnabled = false;
}
acceptTurn(queryID);
}
@@ -324,6 +326,7 @@ void CPlayerInterface::acceptTurn(QueryID queryID)
}
cb->selectionMade(0, queryID);
timerEnabled = true;
}
void CPlayerInterface::heroMoved(const TryMoveHero & details, bool verbose)
@@ -2124,3 +2127,8 @@ std::optional<BattleAction> CPlayerInterface::makeSurrenderRetreatDecision(const
{
return std::nullopt;
}
bool CPlayerInterface::isTimerEnabled() const
{
return timerEnabled;
}