1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-09 07:13:54 +02:00

Reduce excessive FoW updates

This commit is contained in:
Ivan Savenko 2025-01-08 14:35:14 +00:00
parent 566249a10f
commit 9f56c00336
2 changed files with 5 additions and 5 deletions

View File

@ -4115,12 +4115,10 @@ void CGameHandler::changeFogOfWar(const std::unordered_set<int3> &tiles, PlayerC
for (auto tile : observedTiles)
vstd::erase_if_present (fow.tiles, tile);
if (fow.tiles.empty())
return;
}
sendAndApply(fow);
if (!fow.tiles.empty())
sendAndApply(fow);
}
const CGHeroInstance * CGameHandler::getVisitingHero(const CGObjectInstance *obj)

View File

@ -618,7 +618,9 @@ void PlayerMessageProcessor::cheatMapReveal(PlayerColor player, bool reveal)
fc.tiles.insert(hlp_tab, hlp_tab + lastUnc);
delete [] hlp_tab;
gameHandler->sendAndApply(fc);
if (!fc.tiles.empty())
gameHandler->sendAndApply(fc);
}
void PlayerMessageProcessor::cheatPuzzleReveal(PlayerColor player)