Skip to content

Commit

Permalink
Apply "View Height" increments instantly, and more
Browse files Browse the repository at this point in the history
Also fixed view snapping when teleporting to Automap pointer while crouching.

Fixes #81.
  • Loading branch information
MrAlaux committed Dec 5, 2023
1 parent 7cf49f1 commit 5f1e609
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@

## Bug Fixes

- **_View Height_ increments not being applied immediately**
- **Further corrected view pitch as FOV changes**
- **Disabled teleport-to-Automap-pointer during non-Casual Play**
- **Excess speed when airborne with noclip enabled** [thanks @kitchen-ace]
- **Blazing door sound fix not applying to Boom doors**
- **Teleporter Zoom and BFG "explosion" shake affecting all players in multiplayer**
- **Explosion shake being stopped by the menu during demo playback and netgames**
- **View snapping when teleporting to Automap pointer while crouching**
- **Fixed a demo desync** caused by a failed weapon autoswitch when picking up ammo
- **Tweaked dark menu background and Automap overlay algorithm** (fixes very low values)
2 changes: 1 addition & 1 deletion src/am_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ boolean AM_Responder

P_TeleportMove(mo, (m_x+m_w/2)<<FRACTOMAPBITS, (m_y+m_h/2)<<FRACTOMAPBITS, false);
mo->z = mo->floorz;
plr->viewz = mo->z + plr->viewheight;
plr->viewz = mo->z + plr->viewheight - plr->crouchoffset;

if (fancy_teleport) {
R_SetFOVFX(FOVFX_TELEPORT); // Teleporter zoom
Expand Down
13 changes: 12 additions & 1 deletion src/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4880,6 +4880,17 @@ setup_menu_t gen_settings5[] = { // General Settings screen5

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

static void M_ChangeViewHeight(void)
{
static int oldviewheight = 0;

for (int i = 0; i < MAXPLAYERS; i++)
if (playeringame[i] && players[i].playerstate == PST_LIVE)
{ players[i].viewheight += (viewheight_value - oldviewheight) * FRACUNIT; }

oldviewheight = viewheight_value;
}

static const char *impact_pitch_str[] = {
"Off", "Fall", "Damage", "Both", NULL
};
Expand All @@ -4899,7 +4910,7 @@ setup_menu_t gen_settings6[] = {
{"Nugget - View", S_SKIP|S_TITLE, m_null, M_X, M_Y + gen6_title2 * M_SPC},

{"Field of View", S_NUM |S_STRICT, m_null, M_X, M_Y + gen6_fov * M_SPC, {"fov"}, 0, M_SetFOV},
{"View Height", S_NUM |S_STRICT, m_null, M_X, M_Y + gen6_viewheight * M_SPC, {"viewheight_value"}},
{"View Height", S_NUM |S_STRICT, m_null, M_X, M_Y + gen6_viewheight * M_SPC, {"viewheight_value"}, 0, M_ChangeViewHeight},
{"View Bobbing Percentage", S_NUM, m_null, M_X, M_Y + gen6_viewbobbing * M_SPC, {"view_bobbing_percentage"}},
{"Impact Pitch", S_CHOICE|S_STRICT, m_null, M_X, M_Y + gen6_impactpitch * M_SPC, {"impact_pitch"}, 0, NULL, impact_pitch_str},
{"Explosion Shake Effect", S_YESNO |S_STRICT, m_null, M_X, M_Y + gen6_expshake * M_SPC, {"explosion_shake"}},
Expand Down

0 comments on commit 5f1e609

Please sign in to comment.