diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-08-27 08:57:25 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-08-27 08:57:25 +0000 |
commit | 76b768222f5f9e9ccea25ebea6acf5140e948fa9 (patch) | |
tree | 9cf28394835d1526d9a271bfb30f6f7fd6170adc /src | |
parent | c8104aa3b53448a047a0ee01835a6f68ac62f23c (diff) | |
download | manaserv-76b768222f5f9e9ccea25ebea6acf5140e948fa9.tar.gz manaserv-76b768222f5f9e9ccea25ebea6acf5140e948fa9.tar.bz2 manaserv-76b768222f5f9e9ccea25ebea6acf5140e948fa9.tar.xz manaserv-76b768222f5f9e9ccea25ebea6acf5140e948fa9.zip |
Fixed assertion failure on being movements.
Diffstat (limited to 'src')
-rw-r--r-- | src/object.cpp | 10 |
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 |