mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
add "Walk Under Solid Hanging Bodies" from PrBoom+ (#786)
This commit is contained in:
parent
a1cc6c6be3
commit
c2f9c62179
@ -3864,6 +3864,7 @@ enum {
|
||||
general_end5,
|
||||
|
||||
general_title6,
|
||||
general_hangsolid,
|
||||
general_blockmapfix,
|
||||
general_pistolstart,
|
||||
general_end6,
|
||||
@ -4044,6 +4045,9 @@ setup_menu_t gen_settings3[] = { // General Settings screen3
|
||||
{"Compatibility-breaking Features" ,S_SKIP|S_TITLE, m_null, M_X,
|
||||
M_Y + general_title6*M_SPC},
|
||||
|
||||
{"Walk Under Solid Hanging Bodies", S_YESNO, m_null, M_X,
|
||||
M_Y + general_hangsolid*M_SPC, {"hangsolid"}},
|
||||
|
||||
{"Improved Hit Detection", S_YESNO, m_null, M_X,
|
||||
M_Y + general_blockmapfix*M_SPC, {"blockmapfix"}},
|
||||
|
||||
@ -6950,6 +6954,8 @@ void M_ResetSetupMenu(void)
|
||||
|
||||
void M_UpdateCriticalItems(void)
|
||||
{
|
||||
DISABLE_CRITICAL(gen_settings3[general_hangsolid]);
|
||||
|
||||
if (demo_compatibility && overflow[emu_intercepts].enabled)
|
||||
gen_settings3[general_blockmapfix].m_flags |= S_DISABLE;
|
||||
else
|
||||
|
@ -105,6 +105,7 @@ extern boolean r_swirl;
|
||||
extern int death_use_action;
|
||||
extern boolean palette_changes;
|
||||
extern boolean screen_melt;
|
||||
extern boolean hangsolid;
|
||||
extern boolean blockmapfix;
|
||||
extern int extra_level_brightness;
|
||||
extern int menu_background;
|
||||
@ -463,6 +464,13 @@ default_t defaults[] = {
|
||||
"1 to enable \"ghost monsters\" (resurrected pools of gore are translucent)"
|
||||
},
|
||||
|
||||
{
|
||||
"hangsolid",
|
||||
(config_t *) &hangsolid, NULL,
|
||||
{0}, {0,1}, number, ss_enem, wad_no,
|
||||
"1 to walk under solid hanging bodies"
|
||||
},
|
||||
|
||||
{
|
||||
"blockmapfix",
|
||||
(config_t *) &blockmapfix, NULL,
|
||||
|
15
src/p_map.c
15
src/p_map.c
@ -477,6 +477,8 @@ static boolean PIT_CheckLine(line_t *ld) // killough 3/26/98: make static
|
||||
// PIT_CheckThing
|
||||
//
|
||||
|
||||
boolean hangsolid;
|
||||
|
||||
// mbf21: dehacked projectile groups
|
||||
static boolean P_ProjectileImmune(mobj_t *target, mobj_t *source)
|
||||
{
|
||||
@ -645,6 +647,19 @@ static boolean PIT_CheckThing(mobj_t *thing) // killough 3/26/98: make static
|
||||
return !solid;
|
||||
}
|
||||
|
||||
// RjY
|
||||
// comperr_hangsolid, an attempt to handle blocking hanging bodies
|
||||
// A solid hanging body will allow sufficiently small things underneath it.
|
||||
if (CRITICAL(hangsolid) &&
|
||||
!((~thing->flags) & (MF_SOLID | MF_SPAWNCEILING)) // solid and hanging
|
||||
// invert everything, then both bits should be clear
|
||||
&& tmthing->z + tmthing->height <= thing->z) // head height <= base
|
||||
// top of thing trying to move under the body <= bottom of body
|
||||
{
|
||||
tmceilingz = thing->z; // pretend ceiling height is at body's base
|
||||
return true;
|
||||
}
|
||||
|
||||
// killough 3/16/98: Allow non-solid moving objects to move through solid
|
||||
// ones, by allowing the moving thing (tmthing) to move if it's non-solid,
|
||||
// despite another solid thing being in the way.
|
||||
|
Loading…
x
Reference in New Issue
Block a user