diff --git a/src/pathfinder/aystar.cpp b/src/pathfinder/aystar.cpp index 31cdd13de1..5246731300 100644 --- a/src/pathfinder/aystar.cpp +++ b/src/pathfinder/aystar.cpp @@ -130,17 +130,12 @@ void AyStar::CheckTile(AyStarNode *current, OpenListNode *parent) /* Check if this item is already in the OpenList */ check = this->OpenListIsInList(current); if (check != nullptr) { - uint i; /* Yes, check if this g value is lower.. */ if (new_g > check->g) return; this->openlist_queue.Delete(check, 0); /* It is lower, so change it to this item */ check->g = new_g; check->path.parent = closedlist_parent; - /* Copy user data, will probably have changed */ - for (i = 0; i < lengthof(current->user_data); i++) { - check->path.node.user_data[i] = current->user_data[i]; - } /* Re-add it in the openlist_queue. */ this->openlist_queue.Push(check, new_f); } else { diff --git a/src/pathfinder/aystar.h b/src/pathfinder/aystar.h index 98d4c17d14..c157259a3e 100644 --- a/src/pathfinder/aystar.h +++ b/src/pathfinder/aystar.h @@ -38,7 +38,6 @@ static const int AYSTAR_INVALID_NODE = -1; ///< Item is not valid (for example, struct AyStarNode { TileIndex tile; Trackdir direction; - uint user_data[2]; }; /** A path of nodes. */ @@ -115,7 +114,7 @@ typedef void AyStar_FoundEndNode(AyStar *aystar, OpenListNode *current); */ struct AyStar { /* These fields should be filled before initing the AyStar, but not changed - * afterwards (except for user_data and user_path)! (free and init again to change them) */ + * afterwards (except for user_data)! (free and init again to change them) */ /* These should point to the application specific routines that do the * actual work */ @@ -131,7 +130,6 @@ struct AyStar { * afterwards, user_target should typically contain information about * what you where looking for, and user_data can contain just about * everything */ - void *user_path; void *user_target; void *user_data;