Skip to content

Commit

Permalink
Merge branch 'master' into flip_levels
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlaux authored Sep 7, 2024
2 parents d3726bc + 52ed754 commit 0485969
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
enabled the former by default, and gave menu items to both
- Autosaves are now prefixed as per the executable's name
- **_Bloodier Gibbing_ setting now adds crushing effects**
- **Freecam speed is now mostly independent of game speed**
- **Made `force_flip_pan` affect the _OpenAL 3D_ sound module** [by @ceski-1]
- **Renamed _ZDoom-like Item Drops_ (`zdoom_item_drops`) to _Toss Items Upon Death_ (`tossdrop`)** [1]
- **Removed _Upward Message Scrolling_ menu item**
Expand All @@ -27,6 +28,7 @@
- **_'FAST'_ cheat not fully toggling fast monsters outside of custom skill**
- **Fallback status-bar Berserk graphic not taking NUGHUD Ammo alignment into account**
- **Tag Finder not highlighting hidden lines**
- **Last-weapon button being affected by _Skip Ammoless Weapons_ setting**
- **Horizontal-autoaim indicators reacting to fuzzy targets regardless of detection setting**
- **_[Crosshair] Translucency_ menu item not being disabled when the crosshair were disabled**

Expand Down
8 changes: 3 additions & 5 deletions src/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -1017,10 +1017,8 @@ void G_BuildTiccmd(ticcmd_t* cmd)
iw_active[7] ? wp_chainsaw :
iw_active[8] && have_ssg ? wp_supershotgun :

// [Nugget] Last weapon key
ilw_active && casual_play &&
WeaponSelectable(players[consoleplayer].lastweapon)
? players[consoleplayer].lastweapon :
// [Nugget] Last-weapon button
CASUALPLAY(ilw_active) ? players[consoleplayer].lastweapon :

wp_nochange;
}
Expand Down Expand Up @@ -3836,7 +3834,7 @@ void G_Ticker(void)
displaymsg("Freecam Speed: %i unit%s", scaledspeed, (scaledspeed == 1) ? "" : "s");
}

fixed_t speed = basespeed * (1 + (autorun ^ INPUT(input_speed)));
fixed_t speed = basespeed * (1 + (autorun ^ INPUT(input_speed))) * 100 / realtic_clock_rate;

fixed_t forwardmove = speed * (INPUT(input_forward) - INPUT(input_backward)),
sidemove = speed * (INPUT(input_straferight) - INPUT(input_strafeleft));
Expand Down
2 changes: 1 addition & 1 deletion src/m_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2728,7 +2728,7 @@ default_t defaults[] = {
{INPUT_JOYB, CONTROLLER_RIGHT_SHOULDER} }
},

{ // [Nugget] Last weapon key
{ // [Nugget] Last-weapon button
"input_lastweapon",
NULL, NULL,
{0}, {UL,UL}, input, ss_keys, wad_no,
Expand Down
3 changes: 2 additions & 1 deletion src/p_inter.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,8 @@ void P_NuggetGib(mobj_t *mo, const boolean crushed)
// so this is done to get rather-decent behavior in vanilla
if (demo_version < DV_BOOM200) { splat->flags |= MF_NOCLIP; }

splat->tics = MAX(1, splat->tics + (Woof_Random() & 3) - (Woof_Random() & 3));
splat->tics += (Woof_Random() & 3) - (Woof_Random() & 3);
splat->tics = MAX(1, splat->tics);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/p_pspr.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ void A_Lower(player_t *player, pspdef_t *psp)
return;
}

player->lastweapon = player->readyweapon; // [Nugget] Last weapon key
player->lastweapon = player->readyweapon; // [Nugget] Last-weapon button
player->readyweapon = player->pendingweapon;

P_BringUpWeapon(player);
Expand Down
9 changes: 4 additions & 5 deletions src/p_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,12 +773,11 @@ void P_PlayerThink (player_t* player)
if (cmd->buttons & BT_SPECIAL)
cmd->buttons = 0;

if (cmd->buttons & BT_CHANGE
|| (casual_play && M_InputGameActive(input_lastweapon))) // [Nugget] Last weapon key
if (cmd->buttons & BT_CHANGE)
{
// [Nugget] Last weapon key
const weapontype_t lastweapon = ((casual_play && M_InputGameActive(input_lastweapon))
? player->lastweapon : wp_nochange);
// [Nugget] Last-weapon button
const weapontype_t lastweapon = CASUALPLAY(M_InputGameActive(input_lastweapon))
? player->lastweapon : wp_nochange;

// The actual changing of the weapon is done
// when the weapon psprite can do it
Expand Down

0 comments on commit 0485969

Please sign in to comment.