diff --git a/BBGE/RenderObject.cpp b/BBGE/RenderObject.cpp index cdf96af..aebd0d6 100644 --- a/BBGE/RenderObject.cpp +++ b/BBGE/RenderObject.cpp @@ -448,18 +448,6 @@ void RenderObject::renderCall(const RenderState& rs, const Vector& renderAt, flo Vector pos = getFollowCameraPosition(); glTranslatef(pos.x, pos.y, pos.z); } - - // FIXME: this is the reason why flipped tiles on parallax layers rotate in the wrong direction! - // Unfortunately the maps were built with this in mind, so before this can be taken out - // and replaced with the correct version (below), the rotation needs to be fixed up somehow. - // Not sure yet how to do this. Fix maps on load? - // Add a map flag "hasCorrectParallaxRotation" and an editor feature to rotate tiles and set this flag? - // Probably want editor compatibility with old versions so the incorrect behavior - // needs to be the default if nothing is specified. - // What a mess. Sigh. -- FG - if (isfh()) - glRotatef(180, 0, 1, 0); - glRotatef(renderRotation, 0, 0, 1); } else { @@ -470,13 +458,13 @@ nofollow: if (RenderObject::renderPaths) // TODO: move this to debug render debugRenderPaths(); - - // This is the correct way to rotate things. - glRotatef(renderRotation, 0, 0, 1); - if (isfh()) - glRotatef(180, 0, 1, 0); } + // Apply rotation and flip + glRotatef(renderRotation, 0, 0, 1); + if (isfh()) + glRotatef(180, 0, 1, 0); + glTranslatef(beforeScaleOffset.x, beforeScaleOffset.y, beforeScaleOffset.z); const Vector renderScale = scale * rs.scale; glScalef(renderScale.x, renderScale.y, 1);