From 2c450ed93f0217d4950bcd4d2be3d5d1b92d7a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Juh=C3=A1sz?= Date: Thu, 24 Aug 2017 06:31:33 +0000 Subject: Fix Android node selection distance (#6187) --- src/game.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 68acc81b7..facc68aea 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -3550,6 +3550,9 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud, bool show_debug) if ((g_settings->getBool("touchtarget")) && (g_touchscreengui)) { shootline = g_touchscreengui->getShootline(); + // Scale shootline to the acual distance the player can reach + shootline.end = shootline.start + + shootline.getVector().normalize() * BS * d; shootline.start += intToFloat(camera_offset, BS); shootline.end += intToFloat(camera_offset, BS); } -- cgit v1.2.3