mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-27 07:51:36 +00:00
Merge branch 'cull-debugwaypoints' into 'master'
debugwaypoints: cull debug mobjs outside of drawdist See merge request KartKrew/Kart!1201
This commit is contained in:
commit
9b08ca4c75
4 changed files with 19 additions and 4 deletions
|
|
@ -5273,7 +5273,7 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
|
|||
"MT_SKYBOX",
|
||||
|
||||
// Debris
|
||||
"MT_SPARK", //spark
|
||||
"MT_SPARK", //spark, only used for debugging, actually
|
||||
"MT_EXPLODE", // Robot Explosion
|
||||
"MT_UWEXPLODE", // Underwater Explosion
|
||||
"MT_DUST",
|
||||
|
|
|
|||
|
|
@ -6379,7 +6379,7 @@ typedef enum mobj_type
|
|||
MT_SKYBOX,
|
||||
|
||||
// Debris
|
||||
MT_SPARK, //spark
|
||||
MT_SPARK, //spark, only used for debugging, actually
|
||||
MT_EXPLODE, // Robot Explosion
|
||||
MT_UWEXPLODE, // Underwater Explosion
|
||||
MT_DUST,
|
||||
|
|
|
|||
|
|
@ -650,6 +650,13 @@ void K_DebugWaypointsVisualise(void)
|
|||
// Hunt through the waypointcap so we can show all waypoint mobjs and not just ones that were able to be graphed
|
||||
for (waypointmobj = waypointcap; waypointmobj != NULL; waypointmobj = waypointmobj->tracer)
|
||||
{
|
||||
// If this waypoint is outside of draw distance, don't spawn all the debug crap because it is SLOW
|
||||
if (cv_drawdist.value != 0 &&
|
||||
R_PointToDist(waypointmobj->x, waypointmobj->y) > cv_drawdist.value * mapobjectscale)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
waypoint = K_SearchWaypointHeapForMobj(waypointmobj);
|
||||
|
||||
debugmobj = P_SpawnMobj(waypointmobj->x, waypointmobj->y, waypointmobj->z, MT_SPARK);
|
||||
|
|
|
|||
|
|
@ -2293,6 +2293,10 @@ static void SaveMobjThinker(savebuffer_t *save, const thinker_t *th, const UINT8
|
|||
if (mobj->type == MT_HOOPCENTER && mobj->threshold == 4242)
|
||||
return;
|
||||
|
||||
// MT_SPARK: used for debug stuff
|
||||
if (mobj->type == MT_SPARK)
|
||||
return;
|
||||
|
||||
if (mobj->spawnpoint)
|
||||
{
|
||||
// spawnpoint is not modified but we must save it since it is an identifier
|
||||
|
|
@ -4825,7 +4829,9 @@ static void P_RelinkPointers(void)
|
|||
|
||||
mobj = (mobj_t *)currentthinker;
|
||||
|
||||
if (mobj->type == MT_HOOP || mobj->type == MT_HOOPCOLLIDE || mobj->type == MT_HOOPCENTER)
|
||||
if (mobj->type == MT_HOOP || mobj->type == MT_HOOPCOLLIDE || mobj->type == MT_HOOPCENTER
|
||||
// MT_SPARK: used for debug stuff
|
||||
|| mobj->type == MT_SPARK)
|
||||
continue;
|
||||
|
||||
if (mobj->tracer)
|
||||
|
|
@ -5547,7 +5553,9 @@ void P_SaveNetGame(savebuffer_t *save, boolean resending)
|
|||
continue;
|
||||
|
||||
mobj = (mobj_t *)th;
|
||||
if (mobj->type == MT_HOOP || mobj->type == MT_HOOPCOLLIDE || mobj->type == MT_HOOPCENTER)
|
||||
if (mobj->type == MT_HOOP || mobj->type == MT_HOOPCOLLIDE || mobj->type == MT_HOOPCENTER
|
||||
// MT_SPARK: used for debug stuff
|
||||
|| mobj->type == MT_SPARK)
|
||||
continue;
|
||||
mobj->mobjnum = i++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue