summaryrefslogtreecommitdiffhomepage
path: root/editor/tile-editor.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-22 21:03:49 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-22 21:03:49 +0100
commit2141477c69d379b02ca52e0df9171834b37aadd7 (patch)
tree347f865c403fd86e24ae6f1d2d327554d23f1c33 /editor/tile-editor.cpp
parent4f458fba80cbcbfecf3fa54284e3004852bbc172 (diff)
scenery work
Diffstat (limited to 'editor/tile-editor.cpp')
-rw-r--r--editor/tile-editor.cpp9
1 files changed, 7 insertions, 2 deletions
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;
}
}