1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Remove unnecessary access to gamestate

This commit is contained in:
Ivan Savenko
2025-05-15 18:15:25 +03:00
parent ed8ba52ed8
commit e79c8b9fe1
6 changed files with 16 additions and 16 deletions

View File

@@ -650,7 +650,7 @@ const CMapHeader * CGameInfoCallback::getMapHeader() const
bool CGameInfoCallback::hasAccess(std::optional<PlayerColor> playerId) const
{
return !getPlayerID() || getPlayerID()->isSpectator() || gameState().getPlayerRelations(*playerId, *getPlayerID()) != PlayerRelations::ENEMIES;
return !getPlayerID() || getPlayerID()->isSpectator() || getPlayerRelations(*playerId, *getPlayerID()) != PlayerRelations::ENEMIES;
}
EPlayerStatus CGameInfoCallback::getPlayerStatus(PlayerColor player, bool verbose) const