diff options
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 6 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index f30baecd..dd228f11 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -22,6 +22,7 @@ #include "net/tmwa/playerhandler.h" #include "net/tmwa/beinghandler.h" +#include "client.h" #include "configuration.h" #include "game.h" #include "localplayer.h" @@ -661,4 +662,9 @@ Vector PlayerHandler::getPixelsPerTickMoveSpeed(const Vector &speed, Map *map) return speedInTicks; } +int PlayerHandler::getKeyboardMoveDelay(const Vector& speed) +{ + return std::min(speed.x, speed.y) * MILLISECONDS_IN_A_TICK; +} + } // namespace TmwAthena diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h index 63812f47..3e22be22 100644 --- a/src/net/tmwa/playerhandler.h +++ b/src/net/tmwa/playerhandler.h @@ -62,6 +62,8 @@ class PlayerHandler : public MessageHandler, public Net::PlayerHandler Vector getPixelsPerTickMoveSpeed(const Vector &speed, Map *map = 0); + int getKeyboardMoveDelay(const Vector& speed); + bool usePixelPrecision() { return false; } }; |