diff options
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 2 | ||||
-rw-r--r-- | src/being/localplayer.cpp | 6 | ||||
-rw-r--r-- | src/being/localplayer.h | 1 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 471adedf9..4d45d19bd 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1445,7 +1445,7 @@ void Being::logic() const int yOffset2 = yOffset - mSortOffsetY - mFixedOffsetY * mapTileSize / 2; */ const int halfTile = mapTileSize / 2; - const float offset2 = mOffsetY * abs(offset) / 2; + const float offset2 = static_cast<float>(mOffsetY * abs(offset)) / 2; mSortOffsetY = (mOldHeight - mFixedOffsetY + mOffsetY) * halfTile - offset2; const float yOffset3 = (mY + 1) * mapTileSize + yOffset diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index ba0467bfb..e81daf267 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -1223,8 +1223,12 @@ void LocalPlayer::moveToHome() void LocalPlayer::changeEquipmentBeforeAttack(const Being *const target) const { - if (settings.attackWeaponType == 1 || !target || !PlayerInfo::getInventory()) + if (settings.attackWeaponType == 1 + || !target + || !PlayerInfo::getInventory()) + { return; + } bool allowSword = false; const int dx = target->getTileX() - mX; diff --git a/src/being/localplayer.h b/src/being/localplayer.h index d8a0d5e0f..341b9f8b0 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -443,7 +443,6 @@ class LocalPlayer final : public Being, unsigned int mCrazyMoveState; // move state. used if mMoveType == 2 unsigned int mMoveState; - unsigned int mImitationMode; int mLastTargetX; int mLastTargetY; |