diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-24 15:06:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-24 15:06:37 +0300 |
commit | a1f5338e93e5f8b2bdac2c305824a925fd2e4141 (patch) | |
tree | ca2b0d85f2e026d45ee8b0f66d282333a96f0d83 /src/being/being.cpp | |
parent | 1821dfad294c0d850be326639946b12cdbdcecaf (diff) | |
download | mv-a1f5338e93e5f8b2bdac2c305824a925fd2e4141.tar.gz mv-a1f5338e93e5f8b2bdac2c305824a925fd2e4141.tar.bz2 mv-a1f5338e93e5f8b2bdac2c305824a925fd2e4141.tar.xz mv-a1f5338e93e5f8b2bdac2c305824a925fd2e4141.zip |
add speed parameter for pets.
New pet db option: walkSpeed
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 10 |
1 files changed, 10 insertions, 0 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) |