0ad/binaries/data/mods/public/simulation/components
Atrik a373c0e4ef 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-08-12 16:26:22 +02:00
..
interfaces Add a 'team population' gamesetting 2025-03-06 13:25:43 +01:00
tests Prevent targeting unreachable turreted entities 2026-08-12 16:26:22 +02:00
AIInterface.js Call GetFullRepresentation only internally 2026-05-10 14:18:49 +02:00
AIProxy.js Serialize the isIdleConfirmed for the AI 2026-05-10 14:18:51 +02:00
AlertRaiser.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
Attack.js Prevent targeting unreachable turreted entities 2026-08-12 16:26:22 +02:00
AttackDetection.js Fix eslint rule 'prefer-const' in components/[A-B]* 2025-05-11 10:40:23 +02:00
Auras.js Handle empty Auras reference in checkrefs 2026-04-17 12:32:08 +02:00
AutoBuildable.js Fix eslint rule 'prefer-const' in components/[A-B]* 2025-05-11 10:40:23 +02:00
Barter.js Fix market exploit by basing the price change on the amount purchased. 2025-10-29 15:29:28 +01:00
BattleDetection.js Fix issues with the component documentation. 2023-05-10 15:55:51 +00:00
Builder.js Persians -> Achaemenids 2026-05-02 02:50:39 +02:00
BuildingAI.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
BuildRestrictions.js Add context and comment attributes where useful 2025-11-18 11:34:10 +01:00
Capturable.js Fix eslint rule 'prefer-const' in components/[C-F]* 2025-05-11 14:27:12 +02:00
CeasefireManager.js Fix eslint rule 'prefer-const' in components/[C-F]* 2025-05-11 14:27:12 +02:00
Cost.js Fix eslint rule 'prefer-const' in components/[C-F]* 2025-05-11 14:27:12 +02:00
DeathDamage.js Fix eslint rule 'prefer-const' in components/[C-F]* 2025-05-11 14:27:12 +02:00
DelayedDamage.js Fix eslint rule 'prefer-const' in components/[C-F]* 2025-05-11 14:27:12 +02:00
Diplomacy.js Enable eslint rule 'no-prototype-builtins' 2025-06-17 13:47:11 +02:00
EndGameManager.js Fix eslint rule 'prefer-const' in components/[C-F]* 2025-05-11 14:27:12 +02:00
EntityLimits.js Enable eslint rule 'no-redeclare' 2025-06-14 14:53:10 +02:00
Fogging.js Reveal and notify Wonders being constructed 2026-07-29 18:02:37 +02:00
Formation.js Fix oversight from 832501fc9b and b93634fb28 2026-03-23 14:50:12 +01:00
FormationAttack.js Fix cosmetic ESLint warnings in JS components (and their tests). 2021-03-20 09:02:22 +00:00
Foundation.js Fix eslint rule 'prefer-const' in components/[C-F]* 2025-05-11 14:27:12 +02:00
Garrisonable.js Fix eslint rule 'prefer-const' in components/G* 2025-05-11 17:53:23 +02:00
GarrisonHolder.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
Gate.js Fix eslint rule 'prefer-const' in components/G* 2025-05-11 17:53:23 +02:00
Guard.js Fix eslint rule 'prefer-const' in components/G* 2025-05-11 17:53:23 +02:00
GuiInterface.js Add projectile count to template viewer & tooltips 2026-07-09 09:25:37 +02:00
Heal.js Fix eslint rule 'prefer-const' in components/[H-P]* 2025-05-11 19:24:03 +02:00
Health.js RecomputeActorName when required 2025-10-13 18:15:06 +02:00
Identity.js Persians -> Achaemenids 2026-05-02 02:50:39 +02:00
Loot.js Fix eslint rule 'prefer-const' in components/[H-P]* 2025-05-11 19:24:03 +02:00
Looter.js Fix eslint rule 'prefer-const' in components/[H-P]* 2025-05-11 19:24:03 +02:00
Market.js Fix eslint rule 'prefer-const' in components/[H-P]* 2025-05-11 19:24:03 +02:00
Mirage.js Fix eslint rule 'prefer-const' in components/[H-P]* 2025-05-11 19:24:03 +02:00
ModifiersManager.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
MotionBall.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
Pack.js Fix eslint rule 'prefer-const' in components/[H-P]* 2025-05-11 19:24:03 +02:00
Player.js LosRevealAll -> LosRevealWholeMap 2026-03-03 11:25:52 +01:00
PlayerManager.js Add a 'team population' gamesetting 2025-03-06 13:25:43 +01:00
Population.js Fix eslint rule 'prefer-const' in components/[H-P]* 2025-05-11 19:24:03 +02:00
PopulationCapManager.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
ProductionQueue.js Don't set animation for production with UnitAi 2025-10-07 19:25:21 +02:00
Promotion.js Fix eslint rule 'prefer-const' in components/[H-P]* 2025-05-11 19:24:03 +02:00
RallyPoint.js Allow players to set rally points on allied buildings 2026-06-10 00:09:48 +02:00
RangeOverlayManager.js Fix eslint rule 'prefer-const' in components/[R-S]* 2025-05-12 08:02:53 +02:00
Repairable.js Fix eslint rule 'prefer-const' in components/[R-S]* 2025-05-12 08:02:53 +02:00
Researcher.js Define technology pairs in an array 2026-07-06 05:01:12 +02:00
Resistance.js Fix eslint rule 'prefer-const' in components/[R-S]* 2025-05-12 08:02:53 +02:00
ResourceDropsite.js Fix eslint rule 'prefer-const' in components/[R-S]* 2025-05-12 08:02:53 +02:00
ResourceGatherer.js Fix eslint rule 'no-irregular-whitespace' 2025-05-14 13:52:12 +02:00
ResourceSupply.js Fix eslint rule 'prefer-const' in components/[R-S]* 2025-05-12 08:02:53 +02:00
ResourceTrickle.js Fix eslint rule 'prefer-const' in components/[R-S]* 2025-05-12 08:02:53 +02:00
Settlement.js
SkirmishReplacer.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
Sound.js Fix eslint rule 'prefer-const' in components/[R-S]* 2025-05-12 08:02:53 +02:00
StatisticsTracker.js Gendered Civilians 2025-09-02 10:23:44 +02:00
StatusBars.js Fix eslint rule 'prefer-const' in components/[R-S]* 2025-05-12 08:02:53 +02:00
StatusEffectsReceiver.js Enable eslint rule 'no-extra-boolean-cast' 2025-06-14 12:03:06 +02:00
TechnologyManager.js Define technology pairs in an array 2026-07-06 05:01:12 +02:00
TerritoryDecay.js Fix eslint rule 'prefer-const' in components/[T-V]* 2025-05-12 13:12:45 +02:00
TerritoryDecayManager.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
Timer.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
Trader.js Fix eslint rule 'prefer-const' in components/[T-V]* 2025-05-12 13:12:45 +02:00
Trainer.js Allow players to set rally points on allied buildings 2026-06-10 00:09:48 +02:00
TrainingRestrictions.js docs: update entity classes and categories 2025-07-02 07:23:03 +02:00
Treasure.js Fix eslint rule 'prefer-const' in components/[T-V]* 2025-05-12 13:12:45 +02:00
TreasureCollector.js Fix eslint rule 'prefer-const' in components/[T-V]* 2025-05-12 13:12:45 +02:00
Trigger.js Improve the ending of tutorials 2026-07-22 23:51:49 +02:00
TriggerPoint.js Allow registering custom data for triggers 2021-05-09 16:55:36 +00:00
Turretable.js Fix renamed entities on TurretPoint 2026-02-04 11:05:07 +01:00
TurretHolder.js Prevent targeting unreachable turreted entities 2026-08-12 16:26:22 +02:00
UnitAI.js Add GetEffectiveAttackRange wrapper 2026-08-12 16:26:22 +02:00
UnitMotionFlying.js Fix eslint rule 'prefer-const' in components/[T-V]* 2025-05-12 13:12:45 +02:00
Upgrade.js Fix eslint rule 'prefer-const' in components/[T-V]* 2025-05-12 13:12:45 +02:00
Upkeep.js Fix eslint rule 'prefer-const' in components/[T-V]* 2025-05-12 13:12:45 +02:00
ValueModificationManager.js Actually remove trailing whitespace for non-header files as well. 2016-11-23 13:02:58 +00:00
Visibility.js Fix eslint rule 'prefer-const' in components/[T-V]* 2025-05-12 13:12:45 +02:00
VisionSharing.js Fix eslint rule 'prefer-const' in components/[T-V]* 2025-05-12 13:12:45 +02:00
WallPiece.js Correct WallPiece schema help comments 2020-05-21 19:11:00 +00:00
WallSet.js Add help comments to WallPiece component schema 2020-05-21 04:34:13 +00:00
Wonder.js Fix documentation of non system component. 2017-03-24 07:09:28 +00:00