mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Return freeslot name instead of MT_FREESLOT (thanks Zwip-Zwap_Zapony)
This commit is contained in:
parent
9013ceeacc
commit
7e8c0d87a2
1 changed files with 12 additions and 13 deletions
25
src/p_tick.c
25
src/p_tick.c
|
@ -226,23 +226,22 @@ void P_AddThinker(const thinklistnum_t n, thinker_t *thinker)
|
|||
#ifdef PARANOIA
|
||||
static const char *MobjTypeName(const mobj_t *mobj)
|
||||
{
|
||||
mobjtype_t type;
|
||||
actionf_p1 p1 = mobj->thinker.function.acp1;
|
||||
|
||||
if (p1 == (actionf_p1)P_MobjThinker)
|
||||
{
|
||||
return MOBJTYPE_LIST[mobj->type];
|
||||
}
|
||||
else if (p1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
{
|
||||
if (mobj->thinker.debug_mobjtype != MT_NULL)
|
||||
{
|
||||
if (mobj->thinker.debug_mobjtype >= MT_FIRSTFREESLOT)
|
||||
return "MT_FREESLOT";
|
||||
return MOBJTYPE_LIST[mobj->thinker.debug_mobjtype];
|
||||
}
|
||||
}
|
||||
type = mobj->type;
|
||||
else if (p1 == (actionf_p1)P_RemoveThinkerDelayed && mobj->thinker.debug_mobjtype != MT_NULL)
|
||||
type = mobj->thinker.debug_mobjtype;
|
||||
else
|
||||
return "<Not a mobj>";
|
||||
|
||||
return "<Not a mobj>";
|
||||
if (type < 0 || type >= NUMMOBJTYPES || (type >= MT_FIRSTFREESLOT && !FREE_MOBJS[type - MT_FIRSTFREESLOT]))
|
||||
return "<Invalid mobj type>";
|
||||
else if (type >= MT_FIRSTFREESLOT)
|
||||
return FREE_MOBJS[type - MT_FIRSTFREESLOT]; // This doesn't include "MT_"...
|
||||
else
|
||||
return MOBJTYPE_LIST[type];
|
||||
}
|
||||
|
||||
static const char *MobjThinkerName(const mobj_t *mobj)
|
||||
|
|
Loading…
Reference in a new issue