diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-06-22 18:51:36 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-06-22 18:51:36 +0200 |
commit | ec3c689c64922baf4a9f99bc6e9345e0a80403e8 (patch) | |
tree | 7d8a17271650f199e7f90b47a4f40532b28de25d /src/net/manaserv/playerhandler.cpp | |
parent | 2e08f723375023e203654381b2a49d63c9565824 (diff) | |
download | mana-ec3c689c64922baf4a9f99bc6e9345e0a80403e8.tar.gz mana-ec3c689c64922baf4a9f99bc6e9345e0a80403e8.tar.bz2 mana-ec3c689c64922baf4a9f99bc6e9345e0a80403e8.tar.xz mana-ec3c689c64922baf4a9f99bc6e9345e0a80403e8.zip |
Applied fixes requested by cody.
- Made the map teleport distance fixed for manaserv.
- Small cleanups.
The branch is considered reviewed by: Cody.
Resolves Mana-Mantis: #74.
Diffstat (limited to 'src/net/manaserv/playerhandler.cpp')
-rw-r--r-- | src/net/manaserv/playerhandler.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/net/manaserv/playerhandler.cpp b/src/net/manaserv/playerhandler.cpp index ec71143f..a114da3d 100644 --- a/src/net/manaserv/playerhandler.cpp +++ b/src/net/manaserv/playerhandler.cpp @@ -50,7 +50,7 @@ * everything beyond will reset the port hard. * @todo: Make this parameter read from config. */ -static const int MAP_TELEPORT_SCROLL_DISTANCE = 8; +const int MAP_TELEPORT_SCROLL_DISTANCE = 256; extern Net::PlayerHandler *playerHandler; @@ -297,10 +297,8 @@ void PlayerHandler::handleMapChangeMessage(Net::MessageIn &msg) /* Scroll if neccessary */ if (!sameMap - || (abs(x - (int) playerPos.x) > MAP_TELEPORT_SCROLL_DISTANCE - * game->getCurrentTileWidth()) - || (abs(y - (int) playerPos.y) > MAP_TELEPORT_SCROLL_DISTANCE - * game->getCurrentTileHeight())) + || (abs(x - (int) playerPos.x) > MAP_TELEPORT_SCROLL_DISTANCE) + || (abs(y - (int) playerPos.y) > MAP_TELEPORT_SCROLL_DISTANCE)) { scrollOffsetX = x - (int) playerPos.x; scrollOffsetY = y - (int) playerPos.y; |