Skip to content

Commit

Permalink
Fix wallmounted rotations along Y axis for 90 and 270 degree cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kwolekr committed Jul 8, 2013
1 parent ce955f3 commit fca4610
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mapnode.cpp
Expand Up @@ -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
};
Expand Down Expand Up @@ -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];
}
}

Expand Down

0 comments on commit fca4610

Please sign in to comment.