diff options
author | Nipun Garg | 2019-07-21 22:54:52 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:26 +0200 |
commit | 8a44ed4a9743c4c0fd14a761a402631f71f21ea3 (patch) | |
tree | 020d3d8c2ee082b611f0a80cb2a02034593dbc1a | |
parent | 1fd53de72a8288b5b44f2c10bc812dbbd6b7d8ef (diff) | |
download | scummvm-rg350-8a44ed4a9743c4c0fd14a761a402631f71f21ea3.tar.gz scummvm-rg350-8a44ed4a9743c4c0fd14a761a402631f71f21ea3.tar.bz2 scummvm-rg350-8a44ed4a9743c4c0fd14a761a402631f71f21ea3.zip |
HDB: Fix findTeleporterDest()
-rw-r--r-- | engines/hdb/ai-lists.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/hdb/ai-lists.cpp b/engines/hdb/ai-lists.cpp index f3b087ecca..0b4b7d3ae2 100644 --- a/engines/hdb/ai-lists.cpp +++ b/engines/hdb/ai-lists.cpp @@ -650,7 +650,7 @@ void AI::addToTeleportList(int teleIndex, int x, int y, int dir, int level, int bool AI::findTeleporterDest(int tileX, int tileY, SingleTele *info) { for (int i = 0; i < _numTeleporters; i++) { - if ((_teleporters[i].x1 == tileX) && (_teleporters[i].x1 == tileY)) { + if ((_teleporters[i].x1 == tileX) && (_teleporters[i].y1 == tileY)) { info->anim = _teleporters[i].anim2; info->x = _teleporters[i].x2; info->y = _teleporters[i].y2; @@ -659,7 +659,7 @@ bool AI::findTeleporterDest(int tileX, int tileY, SingleTele *info) { info->usable = _teleporters[i].usable2; return true; } - if ((_teleporters[i].x1 == tileX) && (_teleporters[i].x1 == tileY)) { + if ((_teleporters[i].x2 == tileX) && (_teleporters[i].y2 == tileY)) { info->anim = _teleporters[i].anim1; info->x = _teleporters[i].x1; info->y = _teleporters[i].y1; |