Skip to content

Commit

Permalink
Merge pull request #486 from jackrjli/sound-cutoff
Browse files Browse the repository at this point in the history
Fix player sounds being cut off by item pickups in vanilla complevels
  • Loading branch information
kraflab authored Mar 21, 2024
2 parents fa1f14d + 3b868b3 commit 356e3d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions prboom2/src/p_inter.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,10 @@ dboolean P_GiveWeapon(player_t *player, weapontype_t weapon, dboolean dropped)
/* cph 20028/10 - for old-school DM addicts, allow old behavior
* where only consoleplayer's pickup sounds are heard */
// displayplayer, not consoleplayer, for viewing multiplayer demos
if (!comp[comp_sound] || player == &players[displayplayer])
if (!comp[comp_sound])
S_StartSound (player->mo, sfx_wpnup|PICKUP_SOUND); // killough 4/25/98
else if (player == &players[displayplayer])
S_StartVoidSound (sfx_wpnup|PICKUP_SOUND);
return false;
}

Expand Down Expand Up @@ -799,8 +801,10 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
/* cph 20028/10 - for old-school DM addicts, allow old behavior
* where only consoleplayer's pickup sounds are heard */
// displayplayer, not consoleplayer, for viewing multiplayer demos
if (!comp[comp_sound] || player == &players[displayplayer])
if (!comp[comp_sound])
S_StartSound (player->mo, sound | PICKUP_SOUND); // killough 4/25/98
else if (player == &players[displayplayer])
S_StartVoidSound (sound | PICKUP_SOUND);
}

//
Expand Down

0 comments on commit 356e3d7

Please sign in to comment.