From 2141477c69d379b02ca52e0df9171834b37aadd7 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 22 Nov 2022 21:03:49 +0100 Subject: scenery work --- editor/tile-editor.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'editor/tile-editor.cpp') diff --git a/editor/tile-editor.cpp b/editor/tile-editor.cpp index 9f9b6571..4ae54d86 100644 --- a/editor/tile-editor.cpp +++ b/editor/tile-editor.cpp @@ -172,7 +172,9 @@ void tile_editor::place_tile(world& world, global_coords pos, const tile_image_p void tile_editor::toggle_rotation() { - if (_rotation == editor_wall_rotation::W) + if (_mode != editor_mode::walls) + _rotation = editor_wall_rotation::N; + else if (_rotation == editor_wall_rotation::W) _rotation = editor_wall_rotation::N; else _rotation = editor_wall_rotation::W; @@ -187,7 +189,10 @@ void tile_editor::set_rotation(editor_wall_rotation r) return; case editor_wall_rotation::W: case editor_wall_rotation::N: - _rotation = r; + if (_mode == editor_mode::walls) + _rotation = r; + else + _rotation = editor_wall_rotation::N; break; } } -- cgit v1.2.3