diff options
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index d44e28c0..0c5bde22 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -102,10 +102,10 @@ LocalPlayer::LocalPlayer(int id, int job, Map *map): mStatsPointsToAttribute(0), mEquipment(new Equipment), mXp(0), - mInStorage(false), mTargetTime(-1), - mLastTarget(-1), #endif + mLastTarget(-1), + mInStorage(false), mLevel(1), mMoney(0), mTotalWeight(1), mMaxWeight(1), @@ -118,10 +118,9 @@ LocalPlayer::LocalPlayer(int id, int job, Map *map): mInventory(new Inventory(INVENTORY_SIZE)), #ifdef TMWSERV_SUPPORT mLocalWalkTime(-1), - mExpMessageTime(0) -#else - mStorage(new Inventory(STORAGE_SIZE)) + mExpMessageTime(0), #endif + mStorage(new Inventory(STORAGE_SIZE)) { // Variable to keep the local player from doing certain actions before a map // is initialized. e.g. drawing a player's name using the TextManager, since @@ -789,6 +788,8 @@ void LocalPlayer::attack(Being *target, bool keep) stopAttack(); } +#endif // no TMWSERV_SUPPORT + void LocalPlayer::stopAttack() { if (mTarget) @@ -800,8 +801,6 @@ void LocalPlayer::stopAttack() mLastTarget = -1; } -#endif // no TMWSERV_SUPPORT - void LocalPlayer::revive() { Net::getPlayerHandler()->respawn(); @@ -949,20 +948,19 @@ bool LocalPlayer::withinAttackRange(Being *target) void LocalPlayer::setGotoTarget(Being *target) { + mLastTarget = -1; #ifdef TMWSERV_SUPPORT mTarget = target; mGoingToTarget = true; const Vector &targetPos = target->getPosition(); setDestination(targetPos.x, targetPos.y); #else - mLastTarget = -1; setTarget(target); mGoingToTarget = true; setDestination(target->mX, target->mY); #endif } - extern MiniStatusWindow *miniStatusWindow; void LocalPlayer::handleStatusEffect(StatusEffect *effect, int effectId) |