diff options
author | Wuzzy <wuzzy2@mail.ru> | 2020-07-27 19:40:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-27 19:40:33 +0200 |
commit | ae83edd16581b2b5426b565e703a8766e88dbbf6 (patch) | |
tree | c7a9ee788aec17a1a1224cf7cc6a775af0227ec1 /src/client | |
parent | 808fa5ecb3ddfd5d993000cc6b4c972257e182db (diff) | |
download | minetest-ae83edd16581b2b5426b565e703a8766e88dbbf6.tar.gz minetest-ae83edd16581b2b5426b565e703a8766e88dbbf6.tar.bz2 minetest-ae83edd16581b2b5426b565e703a8766e88dbbf6.zip |
Play place_failed sound if occupied or cannot attach (#9486)
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/game.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp index 42d60b21c..20d2c6f90 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -3379,6 +3379,7 @@ bool Game::nodePlacement(const ItemDefinition &selected_def, } else { node = map.getNode(p, &is_valid_position); if (is_valid_position && !nodedef->get(node).buildable_to) { + soundmaker->m_player_rightpunch_sound = selected_def.sound_place_failed; // Report to server client->interact(INTERACT_PLACE, pointed); return false; @@ -3451,6 +3452,7 @@ bool Game::nodePlacement(const ItemDefinition &selected_def, pp = p + v3s16(0, -1, 0); if (!nodedef->get(map.getNode(pp)).walkable) { + soundmaker->m_player_rightpunch_sound = selected_def.sound_place_failed; // Report to server client->interact(INTERACT_PLACE, pointed); return false; |