Skip to content

Commit

Permalink
CGAME: Add land sound to all fall event cases
Browse files Browse the repository at this point in the history
Players in WoP don't die when they fall, so they will always fall on their feed. So add the landing sound to all fall event cases. See #338.
  • Loading branch information
kai-li-wop committed Dec 18, 2024
1 parent 1603715 commit fcd2fbd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/cgame/cg_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,8 @@ void CG_EntityEvent(centity_t *cent, vec3_t position) {
}
break;
case EV_FALL_MEDIUM:
// use normal pain sound
trap_S_StartSound(NULL, es->number, CHAN_AUTO, cgs.media.landSound);
// add pain sound
trap_S_StartSound(NULL, es->number, CHAN_VOICE, CG_CustomSound(es->number, "*pain100_1"));
if (clientNum == cg.predictedPlayerState.clientNum) {
// smooth landing z changes
Expand All @@ -660,6 +661,8 @@ void CG_EntityEvent(centity_t *cent, vec3_t position) {
}
break;
case EV_FALL_FAR:
trap_S_StartSound(NULL, es->number, CHAN_AUTO, cgs.media.landSound);
// add fall sound
trap_S_StartSound(NULL, es->number, CHAN_AUTO, CG_CustomSound(es->number, "*fall1"));
cent->pe.painTime = cg.time; // don't play a pain sound right after this
if (clientNum == cg.predictedPlayerState.clientNum) {
Expand Down

0 comments on commit fcd2fbd

Please sign in to comment.