diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp index 9715c6676..1dcda043e 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2250,10 +2250,18 @@ void the_game( params = getDigParams(nodedef->get(n).groups, tp); } - if(params.main_group != ""){ - soundmaker.m_player_leftpunch_sound.gain = 0.5; - soundmaker.m_player_leftpunch_sound.name = - std::string("default_dig_") + params.main_group; + SimpleSoundSpec sound_dig = nodedef->get(n).sound_dig; + if(sound_dig.exists()){ + if(sound_dig.name == "__group"){ + if(params.main_group != ""){ + soundmaker.m_player_leftpunch_sound.gain = 0.5; + soundmaker.m_player_leftpunch_sound.name = + std::string("default_dig_") + + params.main_group; + } + } else{ + soundmaker.m_player_leftpunch_sound = sound_dig; + } } float dig_time_complete = 0.0; |