Skip to content

Commit

Permalink
add CVar to control footstep volume
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 committed Oct 21, 2024
1 parent d07d08c commit d0e6bce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/common/audio/sound/i_sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ CUSTOM_CVAR(Int, snd_samplerate, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Int, snd_buffersize, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Int, snd_hrtf, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)

CVAR(Float, snd_footstepvolume, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)


#if !defined(NO_OPENAL)
#define DEF_BACKEND "openal"
#else
Expand Down
2 changes: 1 addition & 1 deletion wadsrc/static/zscript/actors/player/player.zs
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ class PlayerPawn : Actor

if(Step)
{
A_StartSound(Step, flags: CHANF_OVERLAP, volume: Ground.StepVolume);
A_StartSound(Step, flags: CHANF_OVERLAP, volume: Ground.StepVolume * snd_footstepvolume);
}

//Steps make splashes regardless.
Expand Down

0 comments on commit d0e6bce

Please sign in to comment.