1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Re-add "long tap to punch" as a client-side setting

This commit is contained in:
Gregor Parzefall 2024-03-24 22:35:55 +01:00 committed by grorp
parent e8a8525bcd
commit 517f1602aa
8 changed files with 54 additions and 19 deletions

View file

@ -3280,8 +3280,10 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud)
if (pointed != runData.pointed_old)
infostream << "Pointing at " << pointed.dump() << std::endl;
if (g_touchscreengui)
g_touchscreengui->applyContextControls(selected_def.touch_interaction.getMode(pointed));
if (g_touchscreengui) {
auto mode = selected_def.touch_interaction.getMode(pointed.type);
g_touchscreengui->applyContextControls(mode);
}
// Note that updating the selection mesh every frame is not particularly efficient,
// but the halo rendering code is already inefficient so there's no point in optimizing it here