1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 00:25:19 +02:00

Only apply "touch_punch_gesture" when wielded item has no on_use callback (#15098)

This commit is contained in:
grorp
2024-09-12 23:41:47 +02:00
committed by GitHub
parent 8617993386
commit af67353f7a
4 changed files with 17 additions and 5 deletions

View File

@@ -3357,7 +3357,7 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud)
infostream << "Pointing at " << pointed.dump() << std::endl;
if (g_touchcontrols) {
auto mode = selected_def.touch_interaction.getMode(pointed.type);
auto mode = selected_def.touch_interaction.getMode(selected_def, pointed.type);
g_touchcontrols->applyContextControls(mode);
// applyContextControls may change dig/place input.
// Update again so that TOSERVER_INTERACT packets have the correct controls set.