1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

int3 now has proper hasher function

This commit is contained in:
Ivan Savenko
2023-04-16 01:48:49 +03:00
parent 4ec32e4dcd
commit 7db67a3101
24 changed files with 60 additions and 67 deletions

View File

@@ -7123,11 +7123,11 @@ void CGameHandler::removeAfterVisit(const CGObjectInstance *object)
void CGameHandler::changeFogOfWar(int3 center, ui32 radius, PlayerColor player, bool hide)
{
std::unordered_set<int3, ShashInt3> tiles;
std::unordered_set<int3> tiles;
getTilesInRange(tiles, center, radius, player, hide? -1 : 1);
if (hide)
{
std::unordered_set<int3, ShashInt3> observedTiles; //do not hide tiles observed by heroes. May lead to disastrous AI problems
std::unordered_set<int3> observedTiles; //do not hide tiles observed by heroes. May lead to disastrous AI problems
auto p = getPlayerState(player);
for (auto h : p->heroes)
{
@@ -7143,7 +7143,7 @@ void CGameHandler::changeFogOfWar(int3 center, ui32 radius, PlayerColor player,
changeFogOfWar(tiles, player, hide);
}
void CGameHandler::changeFogOfWar(std::unordered_set<int3, ShashInt3> &tiles, PlayerColor player, bool hide)
void CGameHandler::changeFogOfWar(std::unordered_set<int3> &tiles, PlayerColor player, bool hide)
{
FoWChange fow;
fow.tiles = tiles;