mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
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. |
||
|---|---|---|
| .. | ||
| collada | ||
| dapinterface | ||
| graphics | ||
| gui | ||
| i18n | ||
| lib | ||
| lobby | ||
| maths | ||
| mocks | ||
| network | ||
| pch | ||
| ps | ||
| renderer | ||
| rlinterface | ||
| scriptinterface | ||
| simulation2 | ||
| soundmanager | ||
| third_party | ||
| tools | ||
| CxxTestRunner.tpl | ||
| main.cpp | ||
| test_setup.cpp | ||