From 6b894220f3c029d256f7f15f41ecb2f635d25bde Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 13 May 2011 22:14:56 +0300 Subject: Add more MANASERV_SUPPORT defines to disable server type checks, if manaserv disabled. Fix some compilation warnings. --- src/localplayer.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/localplayer.cpp') diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 0dea8ddac..ebd28e43c 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -769,9 +769,11 @@ Position LocalPlayer::getNextWalkPosition(unsigned char dir) return Position(static_cast(pos.x), static_cast(pos.y)); } -void LocalPlayer::nextTile(unsigned char dir = 0) +void LocalPlayer::nextTile(unsigned char dir _UNUSED_ = 0) { +#ifdef MANASERV_SUPPORT if (Net::getNetworkType() == ServerInfo::TMWATHENA) +#endif { // updatePos(); @@ -818,6 +820,7 @@ void LocalPlayer::nextTile(unsigned char dir = 0) Being::nextTile(); } +#ifdef MANASERV_SUPPORT else { if (!mMap || !dir) @@ -842,6 +845,7 @@ void LocalPlayer::nextTile(unsigned char dir = 0) setDirection(dir); } } +#endif } bool LocalPlayer::checkInviteRights(const std::string &guildName) @@ -1118,7 +1122,9 @@ void LocalPlayer::startWalking(unsigned char dir) if (dir & RIGHT) dx++; +#ifdef MANASERV_SUPPORT if (Net::getNetworkType() == ServerInfo::TMWATHENA) +#endif { // Prevent skipping corners over colliding tiles if (dx && !mMap->getWalk(getTileX() + dx, getTileY(), getWalkMask())) @@ -1150,10 +1156,12 @@ void LocalPlayer::startWalking(unsigned char dir) } } } +#ifdef MANASERV_SUPPORT else { nextTile(dir); } +#endif } void LocalPlayer::stopWalking(bool sendToServer) @@ -1189,9 +1197,12 @@ bool LocalPlayer::toggleSit() Being::Action newAction; switch (mAction) { - case STAND: newAction = SIT; + case STAND: + case SPAWN: + newAction = SIT; break; - case SIT: newAction = STAND; + case SIT: + newAction = STAND; break; case MOVE: case ATTACK: -- cgit v1.2.3-60-g2f50