diff options
Diffstat (limited to 'src/net/manaserv')
-rw-r--r-- | src/net/manaserv/beinghandler.cpp | 9 | ||||
-rw-r--r-- | src/net/manaserv/playerhandler.cpp | 10 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp index d1fff43d..99b01090 100644 --- a/src/net/manaserv/beinghandler.cpp +++ b/src/net/manaserv/beinghandler.cpp @@ -112,12 +112,9 @@ Vector BeingHandler::giveSpeedInPixelsPerTicks(float speedInTilesPerSeconds) if (!game || !map) { - speedInTicks.x = speedInTilesPerSeconds - * (float)DEFAULT_TILE_WIDTH - / 1000 * (float)MILLISECONDS_IN_A_TICK; - speedInTicks.y = speedInTilesPerSeconds - * (float)DEFAULT_TILE_HEIGHT - / 1000 * (float)MILLISECONDS_IN_A_TICK; + speedInTicks.x = speedInTicks.y = 0; + logger->log("Manaserv::BeingHandler: Speed wasn't given back" + " because game/Map not initialized."); } // We don't use z for now. speedInTicks.z = 0; diff --git a/src/net/manaserv/playerhandler.cpp b/src/net/manaserv/playerhandler.cpp index 042e0284..23158cc5 100644 --- a/src/net/manaserv/playerhandler.cpp +++ b/src/net/manaserv/playerhandler.cpp @@ -53,13 +53,13 @@ extern Window *buySellDialog; /** @see in game.cpp */ extern const int MILLISECONDS_IN_A_TICK; -/** @see in map.cpp */ -extern const int DEFAULT_TILE_WIDTH; - -/* Max. distance we are willing to scroll after a teleport; +/** + * Max. distance we are willing to scroll after a teleport; * everything beyond will reset the port hard. + * 32 is the nominal tile width/height. + * @todo: Make this parameter read from config. */ -static const int MAP_TELEPORT_SCROLL_DISTANCE = 8 * DEFAULT_TILE_WIDTH; +static const int MAP_TELEPORT_SCROLL_DISTANCE = 8 * 32; /** * Listener used for handling the overweigth message. |