mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
More waypoint debug visualizations
- Shortcut waypoints are pink now instead of blue. (barkley's ran into the issue of a shortcut waypoint on the main path too many times) - Waypoint debug uses a shaded blue sphere sprite instead of a thok sprite, because it makes the color easier to see on different backgrounds. - Use 1 splat for waypoint radius instead of shittons of orbs
This commit is contained in:
parent
69aa74b9bf
commit
a3592da4f1
4 changed files with 29 additions and 19 deletions
|
|
@ -4415,6 +4415,8 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
|
|||
"S_BATTLECAPSULE_SUPPORT",
|
||||
"S_BATTLECAPSULE_SUPPORTFLY",
|
||||
|
||||
"S_WAYPOINTORB",
|
||||
"S_WAYPOINTSPLAT",
|
||||
"S_EGOORB",
|
||||
|
||||
"S_WATERTRAIL1",
|
||||
|
|
|
|||
|
|
@ -742,6 +742,7 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
|
||||
"DBOS", // Drift boost flame
|
||||
|
||||
"WAYP",
|
||||
"EGOO",
|
||||
|
||||
"WTRL", // Water Trail
|
||||
|
|
@ -4996,6 +4997,8 @@ state_t states[NUMSTATES] =
|
|||
{SPR_CAPS, 4, -1, {NULL}, 0, 0, S_NULL}, // S_BATTLECAPSULE_SUPPORT
|
||||
{SPR_CAPS, FF_ANIMATE|5, -1, {NULL}, 3, 1, S_NULL}, // S_BATTLECAPSULE_SUPPORTFLY
|
||||
|
||||
{SPR_WAYP, 0, 1, {NULL}, 0, 0, S_NULL}, // S_WAYPOINTORB
|
||||
{SPR_WAYP, 1|FF_FLOORSPRITE, 1, {NULL}, 0, 0, S_NULL}, // S_WAYPOINTSPLAT
|
||||
{SPR_EGOO, 0, 1, {NULL}, 0, 0, S_NULL}, // S_EGOORB
|
||||
|
||||
// Water Trail
|
||||
|
|
|
|||
|
|
@ -1288,6 +1288,7 @@ typedef enum sprite
|
|||
|
||||
SPR_DBOS, // Drift boost flame
|
||||
|
||||
SPR_WAYP,
|
||||
SPR_EGOO,
|
||||
|
||||
SPR_WTRL, // Water Trail
|
||||
|
|
@ -5420,6 +5421,8 @@ typedef enum state
|
|||
S_BATTLECAPSULE_SUPPORT,
|
||||
S_BATTLECAPSULE_SUPPORTFLY,
|
||||
|
||||
S_WAYPOINTORB,
|
||||
S_WAYPOINTSPLAT,
|
||||
S_EGOORB,
|
||||
|
||||
S_WATERTRAIL1,
|
||||
|
|
|
|||
|
|
@ -558,11 +558,9 @@ static void K_DebugWaypointsSpawnLine(waypoint_t *const waypoint1, waypoint_t *c
|
|||
--------------------------------------------------*/
|
||||
static void K_DebugWaypointDrawRadius(waypoint_t *const waypoint)
|
||||
{
|
||||
const fixed_t spriteRadius = 96*FRACUNIT;
|
||||
mobj_t *radiusOrb;
|
||||
mobj_t *waypointmobj;
|
||||
const INT32 numRadiusMobjs = 64;
|
||||
INT32 i = 0;
|
||||
angle_t spawnAngle = 0U;
|
||||
fixed_t spawnX= 0;
|
||||
fixed_t spawnY= 0;
|
||||
fixed_t spawnZ= 0;
|
||||
|
|
@ -572,22 +570,21 @@ static void K_DebugWaypointDrawRadius(waypoint_t *const waypoint)
|
|||
|
||||
waypointmobj = waypoint->mobj;
|
||||
|
||||
for (i = 0; i < numRadiusMobjs; i++)
|
||||
{
|
||||
spawnAngle = (ANGLE_MAX / numRadiusMobjs) * i;
|
||||
spawnX = waypointmobj->x;
|
||||
spawnY = waypointmobj->y;
|
||||
spawnZ = waypointmobj->z + 16*mapobjectscale;
|
||||
|
||||
spawnZ = waypointmobj->z;
|
||||
spawnX = waypointmobj->x + P_ReturnThrustX(waypointmobj, spawnAngle, waypointmobj->radius);
|
||||
spawnY = waypointmobj->y + P_ReturnThrustY(waypointmobj, spawnAngle, waypointmobj->radius);
|
||||
radiusOrb = P_SpawnMobj(spawnX, spawnY, spawnZ, MT_SPARK);
|
||||
|
||||
radiusOrb = P_SpawnMobj(spawnX, spawnY, spawnZ, MT_SPARK);
|
||||
P_SetMobjState(radiusOrb, S_THOK);
|
||||
radiusOrb->tics = 1;
|
||||
radiusOrb->frame &= ~FF_TRANSMASK;
|
||||
radiusOrb->frame |= FF_FULLBRIGHT;
|
||||
radiusOrb->color = SKINCOLOR_PURPLE;
|
||||
radiusOrb->scale = radiusOrb->scale / 4;
|
||||
}
|
||||
P_SetMobjState(radiusOrb, S_WAYPOINTSPLAT);
|
||||
radiusOrb->tics = 1;
|
||||
|
||||
radiusOrb->frame &= ~FF_TRANSMASK;
|
||||
radiusOrb->frame |= FF_FULLBRIGHT;
|
||||
radiusOrb->color = SKINCOLOR_PURPLE;
|
||||
|
||||
radiusOrb->destscale = FixedDiv(waypointmobj->radius, spriteRadius);
|
||||
P_SetScale(radiusOrb, radiusOrb->destscale);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
|
|
@ -620,10 +617,10 @@ void K_DebugWaypointsVisualise(void)
|
|||
waypoint = K_SearchWaypointHeapForMobj(waypointmobj);
|
||||
|
||||
debugmobj = P_SpawnMobj(waypointmobj->x, waypointmobj->y, waypointmobj->z, MT_SPARK);
|
||||
P_SetMobjState(debugmobj, S_THOK);
|
||||
P_SetMobjState(debugmobj, S_WAYPOINTORB);
|
||||
|
||||
debugmobj->frame &= ~FF_TRANSMASK;
|
||||
debugmobj->frame |= FF_TRANS20|FF_FULLBRIGHT;
|
||||
debugmobj->frame |= FF_FULLBRIGHT; //FF_TRANS20
|
||||
|
||||
// There's a waypoint setup for this mobj! So draw that it's a valid waypoint and draw lines to its connections
|
||||
if (waypoint != NULL)
|
||||
|
|
@ -648,6 +645,11 @@ void K_DebugWaypointsVisualise(void)
|
|||
else
|
||||
{
|
||||
debugmobj->color = SKINCOLOR_BLUE;
|
||||
|
||||
if (K_GetWaypointIsShortcut(waypoint))
|
||||
{
|
||||
debugmobj->color = SKINCOLOR_PINK;
|
||||
}
|
||||
}
|
||||
|
||||
if (!K_GetWaypointIsEnabled(waypoint))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue