1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

1.Support for Skyship - revealing entire map

2.Reorganization of visible tiles processing
3.Turned off revealing the map at build structure as it caused odd conflict
This commit is contained in:
DjWarmonger
2009-11-11 17:45:03 +00:00
parent 2b1f395c70
commit e1c793068d
5 changed files with 39 additions and 20 deletions

View File

@ -1394,9 +1394,11 @@ void CGameState::init(StartInfo * si, Mapa * map, int Seed)
BOOST_FOREACH(CGObjectInstance *obj, map->objects)
{
if(obj->tempOwner != k->first) continue; //not a flagged object
/*
int3 objCenter = obj->getSightCenter();
int radious = obj->getSightRadious();
if (radious == -1) //maybe better handle it via getTilesInRange as below?
radious = map->width + map->height;
for (int xd = std::max<int>(objCenter.x - radious , 0); xd <= std::min<int>(objCenter.x + radious, map->width - 1); xd++)
{
@ -1407,6 +1409,13 @@ void CGameState::init(StartInfo * si, Mapa * map, int Seed)
k->second.fogOfWarMap[xd][yd][objCenter.z] = 1;
}
}
*/
std::set<int3> tiles;
obj->getSightTiles(tiles);
BOOST_FOREACH(int3 tile, tiles)
{
k->second.fogOfWarMap[tile.x][tile.y][tile.z] = 1;
}
}
//for(int xd=0; xd<map->width; ++xd) //revealing part of map around heroes