1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Merge remote-tracking branch 'vcmi/master' into develop

This commit is contained in:
Ivan Savenko
2024-07-11 15:59:55 +00:00
96 changed files with 4648 additions and 4084 deletions

View File

@ -441,6 +441,11 @@ void CGameHandler::changeSecSkill(const CGHeroInstance * hero, SecondarySkill wh
if (hero->visitedTown)
giveSpells(hero->visitedTown, hero);
// Our scouting range may have changed - update it
if (hero->getOwner().isValidPlayer())
changeFogOfWar(hero->getSightCenter(), hero->getSightRadius(), hero->getOwner(), ETileVisibility::REVEALED);
}
void CGameHandler::handleClientDisconnection(std::shared_ptr<CConnection> c)
@ -4299,6 +4304,9 @@ void CGameHandler::changeFogOfWar(int3 center, ui32 radius, PlayerColor player,
void CGameHandler::changeFogOfWar(std::unordered_set<int3> &tiles, PlayerColor player, ETileVisibility mode)
{
if (tiles.empty())
return;
FoWChange fow;
fow.tiles = tiles;
fow.player = player;