From 3d035402ebffd2da05421125501d2ef4990d5bd7 Mon Sep 17 00:00:00 2001 From: Bertram Date: Fri, 9 Oct 2009 17:34:25 +0200 Subject: Mostly synced the client and server code for path finding. --- src/game-server/being.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/game-server/being.cpp') diff --git a/src/game-server/being.cpp b/src/game-server/being.cpp index 7b934a61..634d566a 100644 --- a/src/game-server/being.cpp +++ b/src/game-server/being.cpp @@ -126,7 +126,7 @@ void Being::setDestination(const Point &dst) mPath.clear(); } -std::list Being::findPath() +Path Being::findPath() { mOld = getPosition(); int startX = mOld.x / 32, startY = mOld.y / 32; @@ -165,7 +165,7 @@ void Being::move() * class has been used, because that seems to be the most logical * place extra functionality will be added. */ - for (std::list::iterator pathIterator = mPath.begin(); + for (PathIterator pathIterator = mPath.begin(); pathIterator != mPath.end(); pathIterator++) { if (!map->getWalk(pathIterator->x, pathIterator->y, getWalkMask())) @@ -190,11 +190,11 @@ void Being::move() return; } - PATH_NODE prev(tileSX, tileSY); + Position prev(tileSX, tileSY); Point pos; do { - PATH_NODE next = mPath.front(); + Position next = mPath.front(); mPath.pop_front(); // 362 / 256 is square root of 2, used for walking diagonally mActionTime += (prev.x != next.x && prev.y != next.y) -- cgit v1.2.3-70-g09d2