0 out complexity on no-respawn waypoints

This commit is contained in:
Sally Coolatta 2023-12-18 14:41:49 -05:00
parent 1ff3706e64
commit 47fdab3bdd

View file

@ -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;