mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix Android node selection distance (#6187)
This commit is contained in:
parent
397a701f98
commit
01c319d778
2 changed files with 17 additions and 0 deletions
|
@ -3544,6 +3544,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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue