Fixed a mistake where MapCache was using the wrong range for root depth.

develop
JapaMala 2014-08-02 17:09:59 +05:30
parent bc5e0f6ad6
commit 08da62392e
1 changed files with 2 additions and 2 deletions

@ -762,8 +762,8 @@ void MapExtras::BlockInfo::prepare(Block *mblock)
int z_diff = block->map_pos.z - pp->pos.z;
if (z_diff >= 0)
tile = info->body[z_diff][xx + (yy*info->dim_x)];
else
tile = info->roots[info->roots_depth - 1 - z_diff][xx + (yy*info->dim_x)];
else
tile = info->roots[-1 - z_diff][xx + (yy*info->dim_x)];
if (tile.whole && !(tile.bits.blocked))
{
df::coord pos = pp->pos;