diff --git a/Source/Contents/TerrainPathSearch.cpp b/Source/Contents/TerrainPathSearch.cpp index 0d360aaef..2c9d05b4b 100644 --- a/Source/Contents/TerrainPathSearch.cpp +++ b/Source/Contents/TerrainPathSearch.cpp @@ -120,7 +120,7 @@ PathNode* CPathFinder::FindOrCreateNode(int x, int y) { node->x = x; node->y = y; node->state = 0; - this->nodeMap[key] = node; + this->nodeMap[y * this->attr->width + x] = node; return node; }