summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-11 23:44:22 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-11 23:44:22 +0300
commit4b2c8bdc668289d8ca8ab3e3c3fa2ececbd7419c (patch)
treee53f2bcda374d132de9fe51a9170ed1f2a58a53e /src/being/being.cpp
parent16cc2e4a4204ee95e8256f3d7eacaada99f53309 (diff)
downloadplus-4b2c8bdc668289d8ca8ab3e3c3fa2ececbd7419c.tar.gz
plus-4b2c8bdc668289d8ca8ab3e3c3fa2ececbd7419c.tar.bz2
plus-4b2c8bdc668289d8ca8ab3e3c3fa2ececbd7419c.tar.xz
plus-4b2c8bdc668289d8ca8ab3e3c3fa2ececbd7419c.zip
Fix code style.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp7
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 &&