summaryrefslogtreecommitdiffhomepage
path: root/draw
diff options
context:
space:
mode:
Diffstat (limited to 'draw')
-rw-r--r--draw/anim.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/draw/anim.cpp b/draw/anim.cpp
index afdaa344..7f1d5cda 100644
--- a/draw/anim.cpp
+++ b/draw/anim.cpp
@@ -84,8 +84,10 @@ void anim_mesh::draw(tile_shader& shader, chunk& c)
}
if (e.is_dynamic())
{
+ const auto depth = e.depth_offset();
+ const auto depth1 = depth[1]*TILE_MAX_DIM + depth[0];
//Debug{} << "draw-dyn" << e.atlas->name() << e.ordinal() << Vector2i(e.coord.local());
- draw(shader, atlas, e.r, e.frame, e.coord.local(), e.offset, tile_shader::scenery_depth_offset);
+ draw(shader, atlas, e.r, e.frame, e.coord.local(), e.offset, depth1 + tile_shader::scenery_depth_offset);
last = nullptr;
}
else