diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-10-29 02:02:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-10-29 02:02:04 +0300 |
commit | a6d18b282ab916c6536dc25516affeb9200043b6 (patch) | |
tree | 9980735a47cb2118999fb4f4dceaa52bf9f4fae7 /src/being/localplayer.cpp | |
parent | 98c74738f21d7ae256f1273b6c1614ee64e2a3ad (diff) | |
download | plus-a6d18b282ab916c6536dc25516affeb9200043b6.tar.gz plus-a6d18b282ab916c6536dc25516affeb9200043b6.tar.bz2 plus-a6d18b282ab916c6536dc25516affeb9200043b6.tar.xz plus-a6d18b282ab916c6536dc25516affeb9200043b6.zip |
Fix code style.s20181102
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r-- | src/being/localplayer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 240228068..54c95bd85 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -452,7 +452,7 @@ void LocalPlayer::nextTile() if (mPickUpTarget != nullptr) pickUp(mPickUpTarget); - if (mWalkingDir != 0u) + if (mWalkingDir != 0U) startWalking(mWalkingDir); } else if (mPath.size() == 1) @@ -648,7 +648,7 @@ void LocalPlayer::setWalkingDir(const unsigned char dir) mWalkingDir = dir; // If we're not already walking, start walking. - if (mAction != BeingAction::MOVE && (dir != 0u)) + if (mAction != BeingAction::MOVE && (dir != 0U)) startWalking(dir); } @@ -656,7 +656,7 @@ void LocalPlayer::startWalking(const unsigned char dir) { // This function is called by setWalkingDir(), // but also by nextTile() for TMW-Athena... - if ((mMap == nullptr) || (dir == 0u)) + if ((mMap == nullptr) || (dir == 0U)) return; mPickUpTarget = nullptr; @@ -707,7 +707,7 @@ void LocalPlayer::startWalking(const unsigned char dir) void LocalPlayer::stopWalking(const bool sendToServer) { - if (mAction == BeingAction::MOVE && (mWalkingDir != 0u)) + if (mAction == BeingAction::MOVE && (mWalkingDir != 0U)) { mWalkingDir = 0; mPickUpTarget = nullptr; @@ -1676,10 +1676,10 @@ void LocalPlayer::moveByDirection(const unsigned char dir) void LocalPlayer::specialMove(const unsigned char direction) { - if ((direction != 0u) && ((mNavigateX != 0) || (mNavigateY != 0))) + if ((direction != 0U) && ((mNavigateX != 0) || (mNavigateY != 0))) navigateClean(); - if ((direction != 0u) && (settings.moveType >= 2 + if ((direction != 0U) && (settings.moveType >= 2 && settings.moveType <= 4)) { if (mAction == BeingAction::MOVE) @@ -2635,7 +2635,7 @@ void LocalPlayer::fixAttackTarget() if ((mMap == nullptr) || (mTarget == nullptr)) return; - if (settings.moveToTargetType == 11 || (settings.attackType == 0u) + if (settings.moveToTargetType == 11 || (settings.attackType == 0U) || !config.getBoolValue("autofixPos")) { return; @@ -2676,7 +2676,7 @@ void LocalPlayer::updateNavigateList() if (iter != mHomes.end()) { const Vector &pos = mHomes[(*iter).first]; - if ((pos.x != 0.0f) && (pos.y != 0.0f)) + if ((pos.x != 0.0F) && (pos.y != 0.0F)) { mMap->addPortalTile("home", MapItemType::HOME, CAST_S32(pos.x), CAST_S32(pos.y)); |