diff options
author | BlockMen <nmuelll@web.de> | 2015-10-24 12:28:35 +0200 |
---|---|---|
committer | BlockMen <nmuelll@web.de> | 2015-11-07 13:23:38 +0100 |
commit | 2a12579fab7803fdee2fac2fa8a6837f131dde7a (patch) | |
tree | fc4229b476b979d52d91d1a2f3f9ed6082f14328 /src/game.cpp | |
parent | 578649bd158a756adc966609f72444dc845355f0 (diff) | |
download | minetest-2a12579fab7803fdee2fac2fa8a6837f131dde7a.tar.gz minetest-2a12579fab7803fdee2fac2fa8a6837f131dde7a.tar.bz2 minetest-2a12579fab7803fdee2fac2fa8a6837f131dde7a.zip |
Add support for audio feedback if placing node failed
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index d74c1fa1d..1738517b5 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -3682,8 +3682,12 @@ void Game::handlePointingAtNode(GameRunData *runData, SimpleSoundSpec(); if (playeritem_def.node_placement_prediction == "" || - nodedef_manager->get(map.getNodeNoEx(nodepos)).rightclickable) + nodedef_manager->get(map.getNodeNoEx(nodepos)).rightclickable) { client->interact(3, pointed); // Report to server + } else { + soundmaker->m_player_rightpunch_sound = + playeritem_def.sound_place_failed; + } } } } |