From 729c8f9947f2a63ca9f42577cc780f413d515ba2 Mon Sep 17 00:00:00 2001 From: NepDisk Date: Wed, 17 Dec 2025 15:59:43 -0500 Subject: [PATCH] Add compatmode to mobjinfo --- src/deh_soc.c | 5 +++++ src/info.h | 1 + src/p_map.c | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/deh_soc.c b/src/deh_soc.c index 9cd607677..74029b519 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -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); } diff --git a/src/info.h b/src/info.h index fca10c158..a5727982c 100644 --- a/src/info.h +++ b/src/info.h @@ -135,6 +135,7 @@ struct mobjinfo_t sfxenum_t activesound; UINT32 flags; statenum_t raisestate; + boolean compatmode; }; extern mobjinfo_t mobjinfo[NUMMOBJTYPES]; diff --git a/src/p_map.c b/src/p_map.c index 3839bc2d0..fe06fc5cb 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -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); }