diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-13 22:14:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-13 22:14:56 +0300 |
commit | 6b894220f3c029d256f7f15f41ecb2f635d25bde (patch) | |
tree | a8c9b891f3f0df44440def2ea755fcf7454ddb32 /src/localplayer.cpp | |
parent | b4cd8029339cac3c577b67bd161b4dd3ab4f1530 (diff) | |
download | plus-6b894220f3c029d256f7f15f41ecb2f635d25bde.tar.gz plus-6b894220f3c029d256f7f15f41ecb2f635d25bde.tar.bz2 plus-6b894220f3c029d256f7f15f41ecb2f635d25bde.tar.xz plus-6b894220f3c029d256f7f15f41ecb2f635d25bde.zip |
Add more MANASERV_SUPPORT defines to disable server type checks, if manaserv disabled.
Fix some compilation warnings.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
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<int>(pos.x), static_cast<int>(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: |