From ab16b95656fbcf719604072263f8375cd80213c2 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 2 Apr 2023 05:31:06 +0200 Subject: a --- main/clickable.hpp | 3 ++- main/draw.cpp | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'main') diff --git a/main/clickable.hpp b/main/clickable.hpp index 0b491a52..7a192fb3 100644 --- a/main/clickable.hpp +++ b/main/clickable.hpp @@ -2,6 +2,7 @@ #include "src/global-coords.hpp" #include #include +#include #include namespace floormat { @@ -13,7 +14,7 @@ struct clickable final { Math::Range2D dest; BitArrayView bitmask; entity* e; - float depth; + float depth, slope; uint32_t stride; bool mirrored; }; diff --git a/main/draw.cpp b/main/draw.cpp index cf8ab20a..37b88e7c 100644 --- a/main/draw.cpp +++ b/main/draw.cpp @@ -134,11 +134,7 @@ void main_impl::draw_world() noexcept continue; const with_shifted_camera_offset o{_shader, pos, {minx, miny}, {maxx, maxy}}; if (check_chunk_visible(_shader.camera_offset(), sz)) - { - _anim_mesh.draw(_shader, c); - for (const auto& e : c.entities()) - _anim_mesh.add_clickable(_shader, window_size(), e, _clickable_scenery); - } + _anim_mesh.draw(_shader, sz, c, _clickable_scenery); } GL::Renderer::setDepthMask(true); -- cgit v1.2.3