Skip to content

Conversation

pivotman319-owo
Copy link

Description

This PR properly fixes melee weapon hit sounds in Half-Life 2 and derivative mods by adding a missing WeaponSound( MELEE_HIT ) call at the end of the hit target entity check in CBaseHLBludgeonWeapon::Hit(), and changes the ordering of the swing WeaponSound call in CBaseHLBludgeonWeapon::Swing() to be placed within the miss conditional block.

  • Original, unfixed codepath in live Half-Life 2 and Team Fortress 2 SDK (for reference):
hl2_2025-08-18_11-51-14.mp4
  • Fix in PR:
mod_episodic_win64_2025-08-18_11-48-23.mp4

Note

This exact hitsound fix is only partially present in live HL2 exclusively for the player stunstick ent (weapon_stunstick_player). The regular stunstick (weapon_stunstick) and crowbar/mattpipe (weapon_crowbar) do not have this change, because the fix that's included is in the wrong place!

hl2_2025-08-18_12-03-59.mp4

…play melee hitsound in CBaseHLBludgeonWeapon::Hit()

This commit properly fixes melee weapon hitsounds in Half-Life 2 and derivative mods by adding a `WeaponSound( MELEE_HIT )`/`WeaponSound( MELEE_HIT_WORLD )` call at the end of the during the hit target entity check in `CBaseHLBludgeonWeapon::Hit()`, and changes the ordering of the swing `WeaponSound` call in `CBaseHLBludgeonWeapon::Swing()` to be placed just before the hit or miss conditional blocks.

This exact hitsound fix is only PARTIALLY present in HL20 exclusively for the player stunstick ent (regular stunstick and crowbar don't work), because the fix that's included is quite literally in the wrong place!
@pivotman319-owo pivotman319-owo changed the title [General] Fix ordering of hitsound calls in CBaseHLBludgeonWeapon::Swing() and play melee hitsound in CBaseHLBludgeonWeapon::Hit() [Audio] Fix ordering of hitsound calls in CBaseHLBludgeonWeapon::Swing() and play melee hitsound in CBaseHLBludgeonWeapon::Hit() Aug 18, 2025
Bitl added a commit to BitlDevelopmentStudios/source-sdk-2013-bds-base that referenced this pull request Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant