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 | |
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')
-rw-r--r-- | src/being/being.cpp | 7 | ||||
-rw-r--r-- | src/being/being.h | 1 |
2 files changed, 5 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 && diff --git a/src/being/being.h b/src/being/being.h index efac91bd4..585b59a43 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -1121,6 +1121,7 @@ class Being notfinal : public ActorSprite, int mX; // position in tiles int mY; // position in tiles int mSortOffsetY; // caculated offset in pixels based on mOffsetY + // +++ need change name for fix conflict with CompoundSprite::mOffsetY int mOffsetY; // tile height offset in pixels // calculated between tiles int mFixedOffsetY; // fixed tile height offset in pixels for tile |