mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add sound.dig
This commit is contained in:
parent
74780134f2
commit
06e93f8d95
5 changed files with 28 additions and 9 deletions
16
src/game.cpp
16
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue