Skip to content

Commit

Permalink
Allow player-only over/under
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlaux committed Nov 28, 2023
1 parent 9798050 commit a645004
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4840,6 +4840,10 @@ setup_menu_t gen_settings5[] = { // General Settings screen5

// [Nugget] /-----------------------------------------------------------------

static const char *over_under_str[] = {
"Off", "Player Only", "All Things", NULL
};

static const char *impact_pitch_str[] = {
"Off", "Fall", "Damage", "Both", NULL
};
Expand All @@ -4852,8 +4856,8 @@ setup_menu_t gen_settings6[] = {

{"Nugget - Gameplay", S_SKIP|S_TITLE, m_null, M_X, M_Y + gen6_title1 * M_SPC},

{"Things Move Over/Under Things", S_YESNO|S_STRICT|S_CRITICAL, m_null, M_X, M_Y + gen6_overunder * M_SPC, {"over_under"}},
{"Allow Jumping/Crouching", S_YESNO|S_STRICT|S_CRITICAL, m_null, M_X, M_Y + gen6_jump_crouch * M_SPC, {"jump_crouch"}},
{"Move Over/Under Things", S_CHOICE|S_STRICT|S_CRITICAL, m_null, M_X, M_Y + gen6_overunder * M_SPC, {"over_under"}, 0, NULL, over_under_str},
{"Allow Jumping/Crouching", S_YESNO |S_STRICT|S_CRITICAL, m_null, M_X, M_Y + gen6_jump_crouch * M_SPC, {"jump_crouch"}},

{"", S_SKIP, m_null, M_X, M_Y + gen6_stub1 * M_SPC},
{"Nugget - View", S_SKIP|S_TITLE, m_null, M_X, M_Y + gen6_title2 * M_SPC},
Expand Down
4 changes: 2 additions & 2 deletions src/m_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,8 @@ default_t defaults[] = {
{
"over_under",
(config_t *) &over_under, NULL,
{0}, {0,1}, number, ss_gen, wad_yes,
"1 to allow things to move over/under other things"
{0}, {0,2}, number, ss_gen, wad_yes,
"Allow movement over/under things (1 = Player only, 2 = All things)"
},

{
Expand Down
1 change: 1 addition & 0 deletions src/p_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ static boolean PIT_CheckThing(mobj_t *thing) // killough 3/26/98: make static
// [Nugget]: [DSDA] check if a mobj passed over/under another object
if (casual_play && over_under
&& (tmthing->flags & MF_SOLID) && !(thing->flags & MF_SPECIAL)
&& ((over_under == 2) || tmthing->player || thing->player)
&& ( ( thing->z + thing->height <= tmthing->z) // Over
|| (tmthing->z + tmthing->height <= thing->z))) // Under
{
Expand Down

0 comments on commit a645004

Please sign in to comment.