Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement over_under with code from DSDA #79

Merged
merged 24 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fb142de
Remove existing `over_under` implementation
MrAlaux Oct 28, 2023
a46e795
New `over_under` implementation, from DSDA
MrAlaux Oct 28, 2023
7eee8a5
Some fixes
MrAlaux Oct 30, 2023
420f7a5
Little cleanup
MrAlaux Oct 30, 2023
44f9b72
Merge branch 'master' into new_over_under
MrAlaux Nov 26, 2023
3f39013
Tweaks
MrAlaux Nov 26, 2023
1e60f24
Add checks in `P_Move()`
MrAlaux Nov 26, 2023
8eb4afb
Don't perform fake movement for `P_Move()` checks
MrAlaux Nov 26, 2023
9798050
`P_Move()`: Do horiz. move if vert. is blocked
MrAlaux Nov 28, 2023
a645004
Allow player-only over/under
MrAlaux Nov 28, 2023
734be5a
The Grand Rework
MrAlaux Dec 7, 2023
352987f
Reformatting
MrAlaux Dec 9, 2023
7ca1b66
Further improve lift logic
MrAlaux Dec 9, 2023
38c6760
Merge branch 'master' into new_over_under
MrAlaux Dec 11, 2023
ae50e21
Merge branch 'master' into new_over_under
MrAlaux Dec 11, 2023
3f0f920
Merge branch 'master' into new_over_under
MrAlaux Dec 14, 2023
b95ce16
Merge branch 'master' into new_over_under
MrAlaux Dec 15, 2023
17e8d9d
Merge branch 'master' into new_over_under
MrAlaux Dec 15, 2023
ef38198
Merge branch 'master' into new_over_under
MrAlaux Dec 15, 2023
12a2447
Fix clipping into things when moving up steps
MrAlaux Dec 15, 2023
8aabad4
Merge branch 'master' into new_over_under
MrAlaux Dec 16, 2023
f227974
Merge branch 'master' into new_over_under
MrAlaux Dec 28, 2023
1f83450
Update documentation
MrAlaux Dec 28, 2023
b4b3d81
Fix excess speed when airborne with noclip
MrAlaux Dec 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@

## Changes

- **Reimplemented _Move Over/Under Things_ feature**¹, making it much less bug-prone
- **Improved Automap line thickening when the window is downscaled**
- **Tweaked zooming effect**

**1\.** Among other changes, the setting itself has been extended: a value of `1` enables the feature only for players,
while a value of `2` enables it for all Things. This differs from the previous implementation, wherein `1` would enable
the feature for all Things.

## Bug Fixes

- **FOV effects not being cleared thoroughly upon loading levels**
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ For these settings, their CVAR names are provided alongside the _CFG-Only_ label
- **Extended _Level Brightness_ range:** [-8, 8]
- **_"Direct + Auto"_ mode for Vertical Aiming**
- **_Direct Vertical Aiming_ for melee attacks**
- **_Things move over/under things_** setting [p.f. Crispy Doom]
- **_Move Over/Under Things_** setting [partially p.f. Crispy Doom, DSDA-Doom]
- **Jumping** (default key: <kbd>Alt</kbd>, must be enabled first) [p.f. Crispy Doom]
- **Crouching/ducking** (default key: <kbd>C</kbd>, must be enabled first) [i.b. ZDoom]
- **_Field of View_** setting [p.f. Doom Retro]
Expand Down
8 changes: 6 additions & 2 deletions src/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4892,6 +4892,10 @@ static void M_ChangeViewHeight(void)
oldviewheight = viewheight_value;
}

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 @@ -4904,8 +4908,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 @@ -721,8 +721,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
36 changes: 33 additions & 3 deletions src/p_enemy.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,14 +407,38 @@ static boolean P_Move(mobj_t *actor, boolean dropoff) // killough 9/12/98

if (actor->flags & MF_FLOAT && floatok)
{
// [Nugget] Over/Under
const fixed_t oldz = actor->z;

if (actor->z < tmfloorz) // must adjust height
actor->z += FLOATSPEED;
{
actor->z += FLOATSPEED;

// [Nugget] Over/Under: don't ascend into other things
if (actor->above_thing
&& (actor->above_thing->z < (actor->z + actor->height)))
{
actor->z = actor->above_thing->z - actor->height;
}
}
else
{
actor->z -= FLOATSPEED;

actor->flags |= MF_INFLOAT;
// [Nugget] Over/Under: don't descend into other things
if (actor->below_thing
&& (actor->z < (actor->below_thing->z + actor->below_thing->height)))
{
actor->z = actor->below_thing->z + actor->below_thing->height;
}
}

return true;
// [Nugget] Conditions: only if we actually moved
if (NOTCASUALPLAY(actor->z != oldz))
{
actor->flags |= MF_INFLOAT;
return true;
}
}

if (!numspechit)
Expand Down Expand Up @@ -460,8 +484,14 @@ static boolean P_Move(mobj_t *actor, boolean dropoff) // killough 9/12/98

// killough 11/98: fall more slowly, under gravity, if felldown==true
if (!(actor->flags & MF_FLOAT) && (!felldown || demo_version < 203))
{
actor->z = actor->floorz;

// [Nugget] Over/Under
if (actor->below_thing)
{ actor->z = MAX(actor->floorz, actor->below_thing->z + actor->below_thing->height); }
}

return true;
}

Expand Down
Loading
Loading