1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

* minor changes

This commit is contained in:
mateuszb
2009-07-31 11:20:53 +00:00
parent 8e63c73cf8
commit 586957b749
4 changed files with 17 additions and 62 deletions

View File

@ -1756,11 +1756,15 @@ bool CGameState::getPath(int3 src, int3 dest, const CGHeroInstance * hero, CPath
bool CGameState::isVisible(int3 pos, int player)
{
if(player == 255) //neutral player
return false;
return players[player].fogOfWarMap[pos.x][pos.y][pos.z];
}
bool CGameState::isVisible( const CGObjectInstance *obj, int player )
{
if(player == 255) //neutral player
return false;
//object is visible when at least one blocked tile is visible
for(int fx=0; fx<8; ++fx)
{