Skip to content

Commit

Permalink
Merging cl_enhanced_footsteps with cl_footsteps behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
darkshade9 committed Aug 27, 2024
1 parent 6e24103 commit 3b1ade3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/client/entities.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static void parse_entity_event(int number)
CL_PlayFootstepSfx(FOOTSTEP_ID_LADDER, number, 0.5f, ATTN_IDLE);
break;
case EV_FALLSHORT:
if (!cl_enhanced_footsteps->value) {
if (cl_footsteps->integer >= 2) {
S_StartSound(NULL, number, CHAN_AUTO, cl_sfx_landing[0], 1, ATTN_NORM, 0);
} else {
S_StartSound(NULL, number, CHAN_BODY, cl_sfx_landing[Q_rand() % 8], 1, ATTN_NORM, 0);
Expand Down
4 changes: 2 additions & 2 deletions src/client/tent.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ void CL_PlayFootstepSfx(int step_id, int entnum, float volume, float attenuation
return; // no footsteps, not even fallbacks

// bAron's additional footsteps
// check if cl_enhanced_footsteps->string is "0" and sfx->num_sfx has more than four items
if (!cl_enhanced_footsteps->value && sfx->num_sfx > 4) {
// check if cl_footsteps is >= 2 and sfx->num_sfx has more than four items
if (cl_footsteps->integer >= 2 && sfx->num_sfx > 4) {
// pick a random footstep sound from the first four items, important for compatibility with players using the old four stepsounds
sfx_num = Q_rand_uniform(4);
} else {
Expand Down

0 comments on commit 3b1ade3

Please sign in to comment.