Skip to content

Commit fca4610

Browse files
committedJul 8, 2013
Fix wallmounted rotations along Y axis for 90 and 270 degree cases
1 parent ce955f3 commit fca4610

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/mapnode.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
3131
static const Rotation wallmounted_to_rot[] = {
3232
ROTATE_0, ROTATE_180, ROTATE_90, ROTATE_270
3333
};
34+
3435
static const u8 rot_to_wallmounted[] = {
3536
2, 4, 3, 5
3637
};
@@ -154,7 +155,7 @@ void MapNode::rotateAlongYAxis(INodeDefManager *nodemgr, Rotation rot) {
154155

155156
Rotation oldrot = wallmounted_to_rot[wmountface - 2];
156157
param2 &= ~7;
157-
param2 |= rot_to_wallmounted[(oldrot + rot) & 3];
158+
param2 |= rot_to_wallmounted[(oldrot - rot) & 3];
158159
}
159160
}
160161

0 commit comments

Comments
 (0)
Please sign in to comment.