mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
0 out complexity on no-respawn waypoints
This commit is contained in:
parent
1ff3706e64
commit
47fdab3bdd
1 changed files with 12 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue