aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mapnode.cpp3
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];
}
}