mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-23 12:08:45 +02:00
Reduce excessive FoW updates
This commit is contained in:
parent
566249a10f
commit
9f56c00336
@ -4115,11 +4115,9 @@ void CGameHandler::changeFogOfWar(const std::unordered_set<int3> &tiles, PlayerC
|
|||||||
|
|
||||||
for (auto tile : observedTiles)
|
for (auto tile : observedTiles)
|
||||||
vstd::erase_if_present (fow.tiles, tile);
|
vstd::erase_if_present (fow.tiles, tile);
|
||||||
|
|
||||||
if (fow.tiles.empty())
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!fow.tiles.empty())
|
||||||
sendAndApply(fow);
|
sendAndApply(fow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -618,6 +618,8 @@ void PlayerMessageProcessor::cheatMapReveal(PlayerColor player, bool reveal)
|
|||||||
|
|
||||||
fc.tiles.insert(hlp_tab, hlp_tab + lastUnc);
|
fc.tiles.insert(hlp_tab, hlp_tab + lastUnc);
|
||||||
delete [] hlp_tab;
|
delete [] hlp_tab;
|
||||||
|
|
||||||
|
if (!fc.tiles.empty())
|
||||||
gameHandler->sendAndApply(fc);
|
gameHandler->sendAndApply(fc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user