Skip to content

Commit

Permalink
HL Classic crowbar swing sound
Browse files Browse the repository at this point in the history
  • Loading branch information
sabianroberts committed Oct 21, 2024
1 parent f41a4da commit e62b8cb
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion cl_dll/ev_hldm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,19 @@ void EV_Crowbar( event_args_t *args )
VectorCopy( args->origin, origin );

//Play Swing sound
gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_AUTO, "weapons/cbar_miss1.wav", 1, ATTN_NORM, 0, PITCH_NORM);
switch (gEngfuncs.pfnRandomLong(0, 2))
{
case 0:
gEngfuncs.pEventAPI->EV_PlaySound(idx, origin, CHAN_WEP1, "weapons/cbar_miss1.wav", 1, ATTN_NORM, 0, PITCH_NORM);
break;
case 1:
gEngfuncs.pEventAPI->EV_PlaySound(idx, origin, CHAN_WEP2, "weapons/cbar_miss1.wav", 1, ATTN_NORM, 0, 95);
break;
case 2:
gEngfuncs.pEventAPI->EV_PlaySound(idx, origin, CHAN_WEP3, "weapons/cbar_miss1.wav", 1, ATTN_NORM, 0, 105);
break;
}


if ( EV_IsLocal( idx ) )
{
Expand Down

0 comments on commit e62b8cb

Please sign in to comment.