diff options
author | kwolekr <kwolekr@minetest.net> | 2013-07-08 18:50:29 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2013-07-08 18:50:29 -0400 |
commit | fca4610f11748814b41b068e14a875b4cdeb6bd4 (patch) | |
tree | 4b82e022955ba4d4031b35a8b922b86e4dd2d39c /src | |
parent | ce955f37ba9f431122ca3c46e5a7dac63ffd65ea (diff) | |
download | minetest-fca4610f11748814b41b068e14a875b4cdeb6bd4.tar.gz minetest-fca4610f11748814b41b068e14a875b4cdeb6bd4.tar.bz2 minetest-fca4610f11748814b41b068e14a875b4cdeb6bd4.zip |
Fix wallmounted rotations along Y axis for 90 and 270 degree cases
Diffstat (limited to 'src')
-rw-r--r-- | src/mapnode.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mapnode.cpp b/src/mapnode.cpp index 388818c42..f93231187 100644 --- a/src/mapnode.cpp +++ b/src/mapnode.cpp @@ -31,6 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc., static const Rotation wallmounted_to_rot[] = { ROTATE_0, ROTATE_180, ROTATE_90, ROTATE_270 }; + static const u8 rot_to_wallmounted[] = { 2, 4, 3, 5 }; @@ -154,7 +155,7 @@ void MapNode::rotateAlongYAxis(INodeDefManager *nodemgr, Rotation rot) { Rotation oldrot = wallmounted_to_rot[wmountface - 2]; param2 &= ~7; - param2 |= rot_to_wallmounted[(oldrot + rot) & 3]; + param2 |= rot_to_wallmounted[(oldrot - rot) & 3]; } } |