mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-13 22:56:28 +00:00
Command_CountMobjs_f: Add mobj names to output
Was essential for debugging the previous commit
This commit is contained in:
parent
874b0683ef
commit
a4ef43442f
1 changed files with 15 additions and 2 deletions
17
src/p_tick.c
17
src/p_tick.c
|
|
@ -255,7 +255,13 @@ void Command_CountMobjs_f(void)
|
|||
count++;
|
||||
}
|
||||
|
||||
CONS_Printf(M_GetText("There are %d objects of type %d currently in the level.\n"), count, i);
|
||||
const char *name;
|
||||
if (i >= MT_FIRSTFREESLOT)
|
||||
name = FREE_MOBJS[i-MT_FIRSTFREESLOT];
|
||||
else
|
||||
name = MOBJTYPE_LIST[i];
|
||||
|
||||
CONS_Printf(M_GetText("There are %d objects of type %d (%s) currently in the level.\n"), count, i, name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -276,7 +282,14 @@ void Command_CountMobjs_f(void)
|
|||
}
|
||||
|
||||
if (count > 0) // Don't bother displaying if there are none of this type!
|
||||
CONS_Printf(" * %d: %d\n", i, count);
|
||||
{
|
||||
const char *name;
|
||||
if (i >= MT_FIRSTFREESLOT)
|
||||
name = FREE_MOBJS[i-MT_FIRSTFREESLOT];
|
||||
else
|
||||
name = MOBJTYPE_LIST[i];
|
||||
CONS_Printf(" * %d (%s): %d\n", i, name, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue