0ad/source/simulation2
Atrik d795347a40 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-05-18 13:29:48 +02:00
..
components Prevent targeting unreachable turreted entities 2026-05-18 13:29:48 +02:00
docs Remove UNUSED 2025-06-26 17:25:05 +02:00
helpers Small optimisation for VertexPathfinder edge handling. 2026-03-11 18:45:23 +01:00
scripting Remove Script::CreateArray 2026-02-08 19:27:50 +01:00
serialization Remove ScriptTypes and ScriptExtraHeaders headers 2025-09-14 13:17:18 +02:00
system Remove g_GUI usage in simulation2/* 2026-01-23 21:05:18 +01:00
tests Remove LoadScripts from CSimualation2 2026-01-01 17:27:54 +01:00
MessageTypes.h Fix includes in source/simulation2 2025-08-08 07:10:11 +02:00
Simulation2.cpp Use std::optional for m_RejoinTestTurn 2026-02-08 19:56:01 +01:00
Simulation2.h Remove LoadScripts from CSimualation2 2026-01-01 17:27:54 +01:00
TypeList.h Store whether a player is activ in C++ 2025-01-05 19:57:12 +01:00