From 7efe868c9999d61e471d1542f4889ca4d7b2bb2d Mon Sep 17 00:00:00 2001 From: Sryder Date: Sun, 9 Jun 2019 21:49:48 +0100 Subject: [PATCH] Loop through all the waypoint mobjs when setting up waypoints always This means all the mobjs have waypoints setup and debugvisualise can work better. --- src/k_waypoint.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/k_waypoint.c b/src/k_waypoint.c index ae7823cb7..13a203c07 100644 --- a/src/k_waypoint.c +++ b/src/k_waypoint.c @@ -1739,8 +1739,13 @@ boolean K_SetupWaypointList(void) { if (K_AllocateWaypointHeap() == true) { - // The waypoint in the waypointcap is going to be considered our first waypoint - K_SetupWaypoint(waypointcap); + mobj_t *waypointmobj = NULL; + + // Loop through the waypointcap here so that all waypoints are added to the heap, and allow easier debugging + for (waypointmobj = waypointcap; waypointmobj; waypointmobj = waypointmobj->tracer) + { + K_SetupWaypoint(waypointmobj); + } if (!firstwaypoint) {