Add compatmode to mobjinfo

This commit is contained in:
NepDisk 2025-12-17 15:59:43 -05:00
parent c0adfe0e0a
commit 729c8f9947
3 changed files with 8 additions and 2 deletions

View file

@ -393,6 +393,11 @@ void readthing(MYFILE *f, INT32 num)
}
} while (!myfeof(f)); // finish when the line is empty
if (wadfiles[f->wad]->compatmode)
mobjinfo[num].compatmode = true;
else
mobjinfo[num].compatmode = false;
Z_Free(s);
}

View file

@ -135,6 +135,7 @@ struct mobjinfo_t
sfxenum_t activesound;
UINT32 flags;
statenum_t raisestate;
boolean compatmode;
};
extern mobjinfo_t mobjinfo[NUMMOBJTYPES];

View file

@ -675,7 +675,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
if (g_tm.thing->player && g_tm.thing->flags & MF_SHOOTABLE && thing->health > 0)
{
UINT32 damagetype = (thing->info->mass & DMG_TYPEMASK);
if (mapnamespace == MNS_SRB2KART || !damagetype) // OWWWWW!
if (thing->info->compatmode || !damagetype) // OWWWWW!
damagetype = DMG_NORMAL;
P_DamageMobj(g_tm.thing, thing, thing, 1, damagetype);
}
@ -691,7 +691,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
if (thing->player && thing->flags & MF_SHOOTABLE && g_tm.thing->health > 0)
{
UINT32 damagetype = (g_tm.thing->info->mass & DMG_TYPEMASK);
if (mapnamespace == MNS_SRB2KART || !damagetype) // OWWWWW!
if (g_tm.thing->info->compatmode || !damagetype) // OWWWWW!
damagetype = DMG_NORMAL;
P_DamageMobj(thing, g_tm.thing, g_tm.thing, 1, damagetype);
}