Skip to content

Commit

Permalink
CGAME: Don't play pain sounds if there is no falling damage
Browse files Browse the repository at this point in the history
There is no fall damage in WoP, so why play fall or damage sounds when landing after falling? But we keep the fall events because it is used to decide how much to lower the weapon when landing for more immersion.
  • Loading branch information
kai-li-wop committed Dec 19, 2024
1 parent fcd2fbd commit b16a869
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions code/cgame/cg_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,6 @@ void CG_EntityEvent(centity_t *cent, vec3_t position) {
break;
case EV_FALL_MEDIUM:
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
cg.landChange = -16;
Expand All @@ -662,9 +660,6 @@ 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) {
// smooth landing z changes
cg.landChange = -24;
Expand Down
2 changes: 1 addition & 1 deletion code/cgame/cg_players.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

static const char *cg_customSoundNames[MAX_CUSTOM_SOUNDS] = {
"*death1", "*death2", "*death3", "*jump1", "*pain25_1", "*pain50_1", "*pain75_1", "*pain100_1",
"*falling1", "*gasp", "*drown", "*fall1", "*taunt", "*hehe1", "*hehe2"};
"*falling1", "*gasp", "*drown", "*taunt", "*hehe1", "*hehe2"};

/*
================
Expand Down

0 comments on commit b16a869

Please sign in to comment.