diff --git a/src/k_waypoint.cpp b/src/k_waypoint.cpp index e590aa875..a7e7e1617 100644 --- a/src/k_waypoint.cpp +++ b/src/k_waypoint.cpp @@ -2432,6 +2432,15 @@ static INT32 K_CalculateTrackComplexity(void) waypoint_t *const mid = (waypoint_t *)path.array[ i ].nodedata; waypoint_t *const end = (waypoint_t *)path.array[ i + 1 ].nodedata; + // would it be better to just check mid? + if (K_GetWaypointIsSpawnpoint(start) == false + || K_GetWaypointIsSpawnpoint(mid) == false + || K_GetWaypointIsSpawnpoint(end) == false) + { + CONS_Debug(DBG_SETUP, "%s", fmt::format("TURN [{}]: skipped\n", i).c_str()); + continue; + } + const fixed_t start_mid_dist = R_PointToDist2( start->mobj->x, start->mobj->y, mid->mobj->x, mid->mobj->y @@ -2585,7 +2594,7 @@ static INT32 K_CalculateTrackComplexity(void) FixedToFloat(FixedMul(FixedMul(dist_factor, radius_factor), wall_factor)), (delta / FRACUNIT) ); - CONS_Printf("%s", msg.c_str()); + CONS_Debug(DBG_SETUP, "%s", msg.c_str()); trackcomplexity += (delta / FRACUNIT); } @@ -2666,10 +2675,10 @@ static INT32 K_CalculateTrackComplexity(void) } } - CONS_Printf("%s", fmt::format("Num sneaker panel sets: {}\n", sneaker_panels.size()).c_str()); + CONS_Debug(DBG_SETUP, "%s", fmt::format("Num sneaker panel sets: {}\n", sneaker_panels.size()).c_str()); trackcomplexity -= sneaker_panels.size() * 1250; - CONS_Printf(" ** COMPLEXITY: %d\n", trackcomplexity); + CONS_Debug(DBG_SETUP, " ** MAP COMPLEXITY: %d\n", trackcomplexity); } return trackcomplexity;