From 455b56f0a3aa89fec063696ef86aa39986b21a5f Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Sat, 1 Aug 2009 13:14:45 -0400 Subject: Remove some unused movement methods --- src/being.cpp | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) (limited to 'src/being.cpp') diff --git a/src/being.cpp b/src/being.cpp index b915e797..5395f064 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -148,37 +148,21 @@ void Being::setDestination(Uint16 destX, Uint16 destY) #endif #ifdef TMWSERV_SUPPORT - -void Being::adjustCourse(int srcX, int srcY) -{ - setDestination(srcX, srcY, mDest.x, mDest.y); -} - void Being::setDestination(int dstX, int dstY) { - setDestination(mPos.x, mPos.y, dstX, dstY); -} + mDest.x = dstX; + mDest.y = dstY; + int srcX = mPos.x; + int srcY = mPos.y; -Path Being::findPath() -{ - Path path; + Path thisPath; if (mMap) { - path = mMap->findPath(mPos.x / 32, mPos.y / 32, - mDest.x / 32, mDest.y / 32, getWalkMask()); + thisPath = mMap->findPath(mPos.x / 32, mPos.y / 32, + mDest.x / 32, mDest.y / 32, getWalkMask()); } - return path; -} - -void Being::setDestination(int srcX, int srcY, int dstX, int dstY) -{ - mDest.x = dstX; - mDest.y = dstY; - - Path thisPath = findPath(); - if (thisPath.empty()) { setPath(Path()); @@ -228,7 +212,7 @@ void Being::setPath(const Path &path) { mPath = path; #ifdef TMWSERV_SUPPORT -// std::cout << this << " New path: " << path << std::endl; + std::cout << this << " New path: " << path << std::endl; #else if (mAction != WALK && mAction != DEAD) { -- cgit v1.2.3-70-g09d2