Skip to content

Commit

Permalink
Fix a demo desync related to switch_on_pickup
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlaux committed Nov 14, 2023
1 parent d3240bf commit 7e527bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@
- **Disabled teleport-to-Automap-pointer during non-Casual Play**
- **Excess speed when airborne with noclip enabled** [thanks @kitchen-ace]
- **Teleporter Zoom affecting all players in multiplayer**
- **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/p_inter.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ boolean P_GiveAmmo(player_t *player, ammotype_t ammo, int num)
return P_GiveAmmoAutoSwitch(player, ammo, oldammo);

// If non zero ammo, don't change up weapons, player was lower on purpose.
if (oldammo || P_AutoswitchWeapon()) // [Nugget]
if (oldammo || !P_AutoswitchWeapon()) // [Nugget]
return true;

// We were down to zero, so select a new weapon.
Expand Down

0 comments on commit 7e527bd

Please sign in to comment.