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/localplayer.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/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index d9eb3f1f..f941dd5f 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -213,12 +213,12 @@ Position LocalPlayer::getNextWalkPosition(unsigned char dir) if (!mMap || (!dx && !dy)) return Position((int)pos.x, (int)pos.y); - int tileW = mMap->getTileWidth(); - int tileH = mMap->getTileHeight(); + const int tileW = mMap->getTileWidth(); + const int tileH = mMap->getTileHeight(); // Get the current tile pos and its offset - int tileX = (int)pos.x / tileW; - int tileY = (int)pos.y / tileH; + const int tileX = (int)pos.x / tileW; + const int tileY = (int)pos.y / tileH; int offsetX = (int)pos.x % tileW; int offsetY = (int)pos.y % tileH; |