diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-11 23:44:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-11 23:44:22 +0300 |
commit | 4b2c8bdc668289d8ca8ab3e3c3fa2ececbd7419c (patch) | |
tree | e53f2bcda374d132de9fe51a9170ed1f2a58a53e /src/being/being.cpp | |
parent | 16cc2e4a4204ee95e8256f3d7eacaada99f53309 (diff) | |
download | ManaVerse-4b2c8bdc668289d8ca8ab3e3c3fa2ececbd7419c.tar.gz ManaVerse-4b2c8bdc668289d8ca8ab3e3c3fa2ececbd7419c.tar.bz2 ManaVerse-4b2c8bdc668289d8ca8ab3e3c3fa2ececbd7419c.tar.xz ManaVerse-4b2c8bdc668289d8ca8ab3e3c3fa2ececbd7419c.zip |
Fix code style.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index c058380c1..f1617e64e 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -35,6 +35,7 @@ #include "being/beingcacheentry.h" #include "being/beingflag.h" #include "being/beingspeech.h" +#include "being/localplayer.h" #include "being/playerinfo.h" #include "being/playerrelations.h" @@ -187,7 +188,7 @@ Being::Being(const BeingId id, mType(type), mSpeechBubble(nullptr), mWalkSpeed(playerHandler ? playerHandler->getDefaultWalkSpeed() : 1), - mSpeed(playerHandler ? playerHandler->getDefaultWalkSpeed() : 0), + mSpeed(playerHandler ? playerHandler->getDefaultWalkSpeed() : 1), mIp(), mSpriteRemap(new int[20]), mSpriteHide(new int[20]), @@ -2164,12 +2165,12 @@ int Being::getOffset(const signed char pos, const signed char neg) const restrict2 { // Check whether we're walking in the requested direction - if (mAction != BeingAction::MOVE || !(mDirection & (pos | neg))) + if (mAction != BeingAction::MOVE || !(mDirection & (pos | neg))) return 0; int offset = 0; - if (mMap) + if (mMap && mSpeed) { const int time = get_elapsed_time(mActionTime); offset = (pos == BeingDirection::LEFT && |