summaryrefslogtreecommitdiff
path: root/src/net/manaserv/beinghandler.cpp
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2010-02-09 02:07:14 +0100
committerBertram <bertram@cegetel.net>2010-02-09 02:07:14 +0100
commitaa0325fac0f16ced4ac710b5126da5bc5c2af441 (patch)
treed00a3f3c3d3cf09ea76886938bb47a3bee57f110 /src/net/manaserv/beinghandler.cpp
parent56f501c8148b1061a02547d37b20eeeeb64029db (diff)
downloadmana-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/manaserv/beinghandler.cpp')
-rw-r--r--src/net/manaserv/beinghandler.cpp17
1 files changed, 10 insertions, 7 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;