0ad/source
Atrik a19b8b8b50 Prevent targeting unreachable turreted entities
Introduce CanEverReachTarget in the Attack component to check whether
a target is geometrically reachable at all, accounting for height
offsets and turreted units inside buildings.

For non-parabolic attacks (e.g. melee), a simple 3D distance check
from the closest approach point is used.

For parabolic attacks (e.g. ranged), the parabolic range formula
is used to determine if the height difference is surmountable
from the closest horizontal distance to the target.

Add GetClosestApproachDistanceToTurretPoint to TurretHolder
to estimate the minimum horizontal distance to a turret point,
using its local offset and the holder's obstruction size.
Passable buildings are not considered obstacles.

Fixes units on the ground trying to attack unreachable units on walls
or towers when the projectile's arc cannot reach the required height.
2026-06-08 09:43:01 +02:00
..
collada Fix some includes all over the place 2025-08-14 20:15:30 +02:00
dapinterface Remove ScriptTypes and ScriptExtraHeaders headers 2025-09-14 13:17:18 +02:00
graphics Remove IXmppClient.h 2026-04-14 19:38:05 +02:00
gui Remove Engine.SwitchGuiPage 2026-04-26 12:44:41 +02:00
i18n Reduces boost usage for strings 2025-10-16 09:17:05 +02:00
lib Removes dummy GL functions as replaced by core 2026-04-25 17:47:06 +02:00
lobby Remove IXmppClient.h 2026-04-14 19:38:05 +02:00
maths Avoid SIGBUS error in the MD5 implementation on ARMv7 (armhf) 2026-03-23 08:20:10 +01:00
mocks Fix some includes all over the place 2025-08-13 19:38:21 +02:00
network Use std::unique_ptr for stats-table 2026-04-18 14:38:38 +02:00
pch Compute actual size of GUI objects lazily 2026-04-12 00:17:02 +02:00
ps Allow building without lobby 2026-05-01 08:20:38 +02:00
renderer Adds PBR output texture to PostProc 2026-04-29 19:25:14 +02:00
rlinterface Use cpp-httplib instead of mongoose 2026-01-24 10:45:48 +01:00
scriptinterface Remove Script::CreateArray 2026-02-08 19:27:50 +01:00
simulation2 Prevent targeting unreachable turreted entities 2026-06-08 09:43:01 +02:00
soundmanager SoundManager: reintroduce manual memory management 2025-10-13 20:42:32 +02:00
third_party Removes dummy GL functions as replaced by core 2026-04-25 17:47:06 +02:00
tools Persians -> Achaemenids 2026-05-02 02:50:39 +02:00
CxxTestRunner.tpl Use return instead of exit in testrunner 2025-10-15 18:17:24 +02:00
main.cpp Remove IXmppClient.h 2026-04-14 19:38:05 +02:00
test_setup.cpp Remove ScriptContext::CreateContext 2026-01-24 12:03:05 +01:00