From eff6b90e959d31b636d34ff94f59a2efe482f916 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 21 Mar 2023 10:54:41 +0100 Subject: editor: apply offset to placeable ghosts --- editor/draw.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'editor') diff --git a/editor/draw.cpp b/editor/draw.cpp index 611e77fc..39f1b9fe 100644 --- a/editor/draw.cpp +++ b/editor/draw.cpp @@ -8,6 +8,7 @@ #include "src/camera-offset.hpp" #include "src/world.hpp" #include "character.hpp" +#include "rotation.inl" #include #include #include @@ -53,7 +54,8 @@ void app::draw_cursor() { shader.set_tint({1, 1, 1, 0.75f}); auto [_f, _w, anim_mesh] = M->meshes(); - const auto pos = cursor.tile->to_signed3()*iTILE_SIZE; + const auto offset = Vector3i(Vector2i(sel.offset), 0); + const auto pos = cursor.tile->to_signed3()*iTILE_SIZE + offset; anim_mesh.draw(shader, *sel.atlas, sel.r, sel.frame, Vector3(pos), 1); } } -- cgit v1.2.3