diff options
author | Bertram <bertram@cegetel.net> | 2010-02-09 02:07:14 +0100 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2010-02-09 02:07:14 +0100 |
commit | aa0325fac0f16ced4ac710b5126da5bc5c2af441 (patch) | |
tree | d00a3f3c3d3cf09ea76886938bb47a3bee57f110 /src/net | |
parent | 56f501c8148b1061a02547d37b20eeeeb64029db (diff) | |
download | mana-client-aa0325fac0f16ced4ac710b5126da5bc5c2af441.tar.gz mana-client-aa0325fac0f16ced4ac710b5126da5bc5c2af441.tar.bz2 mana-client-aa0325fac0f16ced4ac710b5126da5bc5c2af441.tar.xz mana-client-aa0325fac0f16ced4ac710b5126da5bc5c2af441.zip |
Separated fallback defaults for tile width and height.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/manaserv/beinghandler.cpp | 17 | ||||
-rw-r--r-- | src/net/manaserv/playerhandler.cpp | 4 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp index 02f136af..d1fff43d 100644 --- a/src/net/manaserv/beinghandler.cpp +++ b/src/net/manaserv/beinghandler.cpp @@ -102,19 +102,22 @@ Vector BeingHandler::giveSpeedInPixelsPerTicks(float speedInTilesPerSeconds) if (map) { speedInTicks.x = speedInTilesPerSeconds - * (float)map->getTileWidth() - / 1000 * (float)MILLISECONDS_IN_A_TICK; + * (float)map->getTileWidth() + / 1000 * (float)MILLISECONDS_IN_A_TICK; speedInTicks.y = speedInTilesPerSeconds - * (float)map->getTileHeight() - / 1000 * (float)MILLISECONDS_IN_A_TICK; + * (float)map->getTileHeight() + / 1000 * (float)MILLISECONDS_IN_A_TICK; } } if (!game || !map) { - speedInTicks.x = speedInTicks.y = speedInTilesPerSeconds - * (float)DEFAULT_TILE_SIDE_LENGTH - / 1000 * (float)MILLISECONDS_IN_A_TICK; + 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; } // 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 007aa93f..042e0284 100644 --- a/src/net/manaserv/playerhandler.cpp +++ b/src/net/manaserv/playerhandler.cpp @@ -54,12 +54,12 @@ extern Window *buySellDialog; extern const int MILLISECONDS_IN_A_TICK; /** @see in map.cpp */ -extern const int DEFAULT_TILE_SIDE_LENGTH; +extern const int DEFAULT_TILE_WIDTH; /* Max. distance we are willing to scroll after a teleport; * everything beyond will reset the port hard. */ -static const int MAP_TELEPORT_SCROLL_DISTANCE = 8 * DEFAULT_TILE_SIDE_LENGTH; +static const int MAP_TELEPORT_SCROLL_DISTANCE = 8 * DEFAULT_TILE_WIDTH; /** * Listener used for handling the overweigth message. |