mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
More work on static variable desyncs
This commit is contained in:
@@ -735,8 +735,12 @@ int3 CPlayerSpecificInfoCallback::getGrailPos( double *outKnownRatio )
|
||||
}
|
||||
else
|
||||
{
|
||||
*outKnownRatio = static_cast<double>(CGObelisk::visited[gs->getPlayerTeam(*player)->id])
|
||||
/ CGObelisk::obeliskCount;
|
||||
TeamID t = gs->getPlayerTeam(*player)->id;
|
||||
double visited = 0.0;
|
||||
if(CGObelisk::visited.count(t))
|
||||
visited = static_cast<double>(CGObelisk::visited[t]);
|
||||
|
||||
*outKnownRatio = visited / CGObelisk::obeliskCount;
|
||||
}
|
||||
return gs->map->grailPos;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user