1
0
Fork 0
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:
BlockMen 2015-10-24 12:28:35 +02:00
parent 578649bd15
commit 2a12579fab
5 changed files with 19 additions and 4 deletions

View file

@ -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;
}
}
}
}