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/being.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/being.cpp') diff --git a/src/being.cpp b/src/being.cpp index 5e5fd3bdc..383d392f8 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -351,7 +351,9 @@ void Being::setPosition(const Vector &pos) void Being::setDestination(int dstX, int dstY) { +#ifdef MANASERV_SUPPORT if (Net::getNetworkType() == ServerInfo::TMWATHENA) +#endif { if (mMap) setPath(mMap->findPath(mX, mY, dstX, dstY, getWalkMask())); @@ -411,8 +413,12 @@ void Being::setPath(const Path &path) if (mPath.empty()) return; +#ifdef MANASERV_SUPPORT if ((Net::getNetworkType() == ServerInfo::TMWATHENA) && mAction != MOVE && mAction != DEAD) +#else + if (mAction != MOVE && mAction != DEAD) +#endif { nextTile(); mActionTime = tick_time; @@ -655,7 +661,9 @@ void Being::handleAttack(Being *victim, int damage, else if (mInfo->getAttack(mAttackType)) fireMissile(victim, mInfo->getAttack(mAttackType)->missileParticle); +#ifdef MANASERV_SUPPORT if (Net::getNetworkType() == ServerInfo::TMWATHENA) +#endif { reset(); mActionTime = tick_time; @@ -1194,8 +1202,8 @@ void Being::logic() } } else -#endif if (Net::getNetworkType() == ServerInfo::TMWATHENA) +#endif { switch (mAction) { @@ -1203,6 +1211,7 @@ void Being::logic() case SIT: case DEAD: case HURT: + case SPAWN: default: break; -- cgit v1.2.3-60-g2f50