summaryrefslogtreecommitdiff
path: root/src/object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object.cpp')
-rw-r--r--src/object.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/object.cpp b/src/object.cpp
index f6863cd4..b20fa7dc 100644
--- a/src/object.cpp
+++ b/src/object.cpp
@@ -59,19 +59,19 @@ void MovingObject::move()
mNewY = mDstY = mSrcY;
return;
}
+ path.pop_back();
}
int tileCX = tileSX, tileCY = tileSY, fracCX = fracSX, fracCY = fracSY;
- int tileNX = tileDX, tileNY = tileDY, left = mSpeed;
+ int left = mSpeed;
int vecX = 0, vecY = 0, cost = 0;
for (std::list<PATH_NODE>::const_iterator it = path.begin(),
it_end = path.end(); it != it_end; ++it) {
- tileNX = it->x;
- tileNY = it->y;
- assert(tileNX != tileCX && tileNY != tileCY &&
- tileNX != tileDX && tileNY != tileDY);
+ int tileNX = it->x, tileNY = it->y;
+ assert((tileNX != tileCX || tileNY != tileCY) &&
+ (tileNX != tileDX || tileNY != tileDY));
if (fracCX != 0 || fracCY != 0) {
// not at the tile center, move toward the next tile center