diff options
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 10 | ||||
-rw-r--r-- | src/being/being.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 39cf09741..2da3c644f 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -292,6 +292,16 @@ void Being::setSubtype(const uint16_t subtype, const uint8_t look) { setupSpriteDisplay(mInfo->getDisplay(), false); mYDiff = mInfo->getSortOffsetY(); + const int speed = mInfo->getWalkSpeed(); + if (!speed) + { + setWalkSpeed(Net::getPlayerHandler() + ->getDefaultWalkSpeed()); + } + else + { + setWalkSpeed(Vector(speed, speed, 0)); + } } } else if (mType == PLAYER) diff --git a/src/being/being.h b/src/being/being.h index e20db69f4..6722e5d4c 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -478,7 +478,7 @@ class Being : public ActorSprite, public ConfigListener * in pixels per second for eAthena, * in tiles per second for Manaserv. */ - void setWalkSpeed(const Vector &speed) + void setWalkSpeed(Vector speed) { mWalkSpeed = speed; mSpeed = speed.x; } /** |