mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Use sight center for fow reveal actions
This commit is contained in:
parent
19f2fbce1e
commit
145cd38025
@ -900,7 +900,7 @@ void CGameHandler::onNewTurn()
|
||||
{
|
||||
if (getPlayerStatus(player.first) == EPlayerStatus::INGAME &&
|
||||
getPlayerRelations(player.first, t->tempOwner) == PlayerRelations::ENEMIES)
|
||||
changeFogOfWar(t->visitablePos(), t->getFirstBonus(Selector::type()(BonusType::DARKNESS))->val, player.first, ETileVisibility::HIDDEN);
|
||||
changeFogOfWar(t->getSightCenter(), t->getFirstBonus(Selector::type()(BonusType::DARKNESS))->val, player.first, ETileVisibility::HIDDEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1550,7 +1550,7 @@ void CGameHandler::giveHero(ObjectInstanceID id, PlayerColor player, ObjectInsta
|
||||
|
||||
//Reveal fow around new hero, especially released from Prison
|
||||
auto h = getHero(id);
|
||||
changeFogOfWar(h->pos, h->getSightRadius(), player, ETileVisibility::REVEALED);
|
||||
changeFogOfWar(h->getSightCenter(), h->getSightRadius(), player, ETileVisibility::REVEALED);
|
||||
}
|
||||
|
||||
void CGameHandler::changeObjPos(ObjectInstanceID objid, int3 newPos, const PlayerColor & initiator)
|
||||
|
Loading…
Reference in New Issue
Block a user