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:
@ -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
|
||||
|
Reference in New Issue
Block a user