0ad/source/simulation2
Atrik 427682563d 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-07-23 10:08:24 +02:00
..
components Prevent targeting unreachable turreted entities 2026-07-23 10:08:24 +02:00
docs Move Script* classes to Script namespace 2026-06-20 17:43:00 +02:00
helpers Makes GameView returning reference on camera 2026-06-28 17:57:16 +02:00
scripting Remove global g_xres and x_yres 2026-07-08 11:35:46 +02:00
serialization Move Script* classes to Script namespace 2026-06-20 17:43:00 +02:00
system Move Script* classes to Script namespace 2026-06-20 17:43:00 +02:00
tests Move Script* classes to Script namespace 2026-06-20 17:43:00 +02:00
MessageTypes.h Move Script* classes to Script namespace 2026-06-20 17:43:00 +02:00
Simulation2.cpp Move Script* classes to Script namespace 2026-06-20 17:43:00 +02:00
Simulation2.h Move Script* classes to Script namespace 2026-06-20 17:43:00 +02:00
TypeList.h Store whether a player is activ in C++ 2025-01-05 19:57:12 +01:00