diff options
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 15f5b6b2..5eef30e1 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -69,7 +69,7 @@ LocalPlayer::LocalPlayer(Uint32 id, Uint16 job, Map *map): mTarget(NULL), mPickUpTarget(NULL), mTrading(false), mGoingToTarget(false), mTargetTime(-1), mLastAction(-1), - mLastTarget(-1), mWalkingDir(0), + mLastTarget(-1), mWalkingDir(0), mDestX(0), mDestY(0), mInventory(new Inventory(INVENTORY_SIZE)), mStorage(new Inventory(STORAGE_SIZE)) @@ -173,7 +173,7 @@ void LocalPlayer::logic() } void LocalPlayer::setGM() -{ +{ mIsGM = !mIsGM; mNameColor = mIsGM ? 0x009000: 0x202020; setName(getName()); @@ -503,7 +503,7 @@ void LocalPlayer::attack(Being *target, bool keep) int dist_y = target->mY - mY; // Must be standing and be within attack range to continue - if ((mAction != STAND) || (mAttackRange < abs(dist_x)) || + if ((mAction != STAND) || (mAttackRange < abs(dist_x)) || (mAttackRange < abs(dist_y))) return; @@ -690,7 +690,7 @@ void LocalPlayer::loadTargetCursor(std::string filename, int width, int height, mOutRangeImages[size] = currentImageSet; mTargetCursorOutRange[size] = currentCursor; } - else + else { mInRangeImages[size] = currentImageSet; mTargetCursorInRange[size] = currentCursor; @@ -717,7 +717,7 @@ void LocalPlayer::drawTargetCursor(Graphics *graphics, int scrollX, int scrollY) { mTarget->mTargetCursor = mTargetCursorOutRange[cursorSize]->getCurrentImage(); } - else + else { mTarget->mTargetCursor = mTargetCursorInRange[cursorSize]->getCurrentImage(); } |