1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00: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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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.