[HL25] Weapon hit sounds on players don't work in multiplayer
pierow opened this issue · comments
The bullet hit sounds don't work in HL25 multiplayer regardless if the hitbox or bounding box was hit, and the current SDK code doesn't reflect whatever changes cause this issue. Please correct this and publish any SDK changes needed to make it work.
This is related to the HL25 patch note:
Improved client-side prediction to reduce "ghost shots". Like Counter-Strike, consider hitboxes and not just bounding boxes for hits on the client.
The following behavior is what happens when shooting either at and/or near a player with videos below:
- HL25 Multiplayer: No flesh hit sounds at all.
- HL25 Singleplayer: Correctly plays flesh hit sounds only when the NPC will take damage.
- steam_legacy Multiplayer: Plays flesh hit sounds on hits and missed shots.
- steam_legacy Singleplayer: No flesh hit sounds at all.
- HLSDK Multiplayer on HL25: The same behavior as steam_legacy, regardless if the following line
Line 403 in c7240b9
PM_STUDIO_BOX
orPM_NORMAL
(likely involved in the change in some way). The video demonstration for the SDK behavior uses this code in place of the above line:
if (CVAR_GET_FLOAT("cl_hitsound") == 1.0f)
{
gEngfuncs.pEventAPI->EV_PlayerTrace(vecSrc, vecEnd, PM_NORMAL, -1, &tr);
gEngfuncs.Con_Printf("new hit\n");
}
else
gEngfuncs.pEventAPI->EV_PlayerTrace(vecSrc, vecEnd, PM_STUDIO_BOX, -1, &tr);
- HLSDK Singleplayer is untested.
The issue occurs regardless if it's a listen server or HLDS.