mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add support for audio feedback if placing node failed
This commit is contained in:
parent
578649bd15
commit
2a12579fab
5 changed files with 19 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue