summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-11 08:58:32 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-11 08:58:52 -0600
commit14a6e6a4bc5d39ddf8f31efc07a5e2493a6f6d0a (patch)
treeda62e5694614e55df1c1a0fc5d5676ac7415daa6 /src/localplayer.cpp
parent78cab005ab427e64ccdf8ba8f6ca7d4c6f6bd4b4 (diff)
downloadMana-14a6e6a4bc5d39ddf8f31efc07a5e2493a6f6d0a.tar.gz
Mana-14a6e6a4bc5d39ddf8f31efc07a5e2493a6f6d0a.tar.bz2
Mana-14a6e6a4bc5d39ddf8f31efc07a5e2493a6f6d0a.tar.xz
Mana-14a6e6a4bc5d39ddf8f31efc07a5e2493a6f6d0a.zip
Remove more support #ifdefs
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp16
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)