Closed GoogleCodeExporter closed 9 years ago
Original comment by lowerlo...@gmail.com
on 12 Dec 2009 at 3:10
It looks like creep unsets all mini-tile flags except for walkable, so we will
need
to find a different way to read ground height information.
Original comment by lowerlo...@gmail.com
on 12 Dec 2009 at 4:51
this looks like it gives the mostly correct ground height in build tile
resolution
(not affected by zerg creep):
int Map::getGroundHeight(int x, int y) const
{
if ((unsigned int)x>=buildability.getWidth() || (unsigned
int)y>=buildability.getHeight())
return false;
u32 value = (*this->fogOfWar)[y][x];
value = value >> 16;
int h=0;
if ((value & (0x200))!=0)
{
h=1;
}
if ((value & (0x400))!=0)
{
h=2;
}
return h;
}
Original comment by lowerlo...@gmail.com
on 12 Dec 2009 at 6:49
this is interesting (though unrelated): it appears value & 0x800 !=0 if and
only if
some building is on the given build tile. Could be used to make a non-static
Game::isBuildable function that takes into account buildings (but not
infantry/vehicles):
isNowBuildable(x,y) := isBuildable(x,y) && ((value & 0x800) == 0)
Original comment by lowerlo...@gmail.com
on 12 Dec 2009 at 6:59
Original comment by lowerlo...@gmail.com
on 20 Dec 2009 at 11:03
Original comment by lowerlo...@gmail.com
on 7 Mar 2010 at 5:59
Fixed in r2436.
Original comment by lowerlo...@gmail.com
on 13 Jun 2010 at 4:35
Original issue reported on code.google.com by
danielst...@gmail.com
on 11 Dec 2009 at 12:23