summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 68b5fed3..9a631581 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -116,22 +116,12 @@ void Viewport::draw(gcn::Graphics *gcnGraphics)
}
// Calculate viewpoint
-#ifdef TMWSERV_SUPPORT
int midTileX = (graphics->getWidth() + mScrollCenterOffsetX) / 2;
int midTileY = (graphics->getHeight() + mScrollCenterOffsetX) / 2;
const Vector &playerPos = player_node->getPosition();
const int player_x = (int) playerPos.x - midTileX;
const int player_y = (int) playerPos.y - midTileY;
-#else
- int midTileX = (graphics->getWidth() + mScrollCenterOffsetX) / 32 / 2;
- int midTileY = (graphics->getHeight() + mScrollCenterOffsetY) / 32 / 2;
-
- int player_x = (player_node->mX - midTileX) * 32 +
- player_node->getXOffset();
- int player_y = (player_node->mY - midTileY) * 32 +
- player_node->getYOffset();
-#endif
if (mScrollLaziness < 1)
mScrollLaziness = 1; // Avoids division by zero