From 1c34872aea8d196708aec8277017b467d01d09b0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 5 Mar 2016 18:33:57 +0300 Subject: Replace in Being speed field from vector to int. --- src/net/ea/beingrecv.cpp | 2 +- src/net/ea/playerhandler.cpp | 9 +++------ src/net/ea/playerhandler.h | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'src/net/ea') diff --git a/src/net/ea/beingrecv.cpp b/src/net/ea/beingrecv.cpp index 21e79a089..364236a08 100644 --- a/src/net/ea/beingrecv.cpp +++ b/src/net/ea/beingrecv.cpp @@ -458,7 +458,7 @@ void BeingRecv::processBeingMove3(Net::MessageIn &msg) return; } const int16_t speed = msg.readInt16("speed"); - dstBeing->setWalkSpeed(Vector(speed, speed, 0)); + dstBeing->setWalkSpeed(speed); int16_t x = msg.readInt16("x"); int16_t y = msg.readInt16("y"); diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 65466ba5e..d6464028e 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -59,11 +59,9 @@ void PlayerHandler::ignoreAll(const bool ignore A_UNUSED) const { } -Vector PlayerHandler::getDefaultWalkSpeed() const +int PlayerHandler::getDefaultWalkSpeed() const { - // Return an normalized speed for any side - // as the offset is calculated elsewhere. - return Vector(150, 150, 0); + return 150; } bool PlayerHandler::canUseMagic() const @@ -85,8 +83,7 @@ void PlayerHandler::setStat(Net::MessageIn &msg, switch (type) { case Ea::WALK_SPEED: - localPlayer->setWalkSpeed(Vector(static_cast( - base), static_cast(base), 0)); + localPlayer->setWalkSpeed(base); PlayerInfo::setStatBase(Attributes::WALK_SPEED, base); PlayerInfo::setStatMod(Attributes::WALK_SPEED, 0); break; diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h index 18e62a2da..e5105dc16 100644 --- a/src/net/ea/playerhandler.h +++ b/src/net/ea/playerhandler.h @@ -52,7 +52,7 @@ class PlayerHandler notfinal : public Net::PlayerHandler bool canUseMagic() const override final; - Vector getDefaultWalkSpeed() const override final A_WARN_UNUSED; + int getDefaultWalkSpeed() const override final A_WARN_UNUSED; void setStat(Net::MessageIn &msg, const int type, -- cgit v1.2.3-70-g09d2