diff options
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 |