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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user