mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-24 04:05:22 +00:00
93a352ad16
Units sometimes ignored targets that entered their LoS. The cause isd0fc8ff67d: range queries returned units farther away, and those units might actually be out of range if distance is computed center-to-center, which both UnitAI and LOS do. This meant that code relying on range query updates was possibly broken, and indeed units missed things (see ticket). This introduces a boolean to switch between pre-d0fc8ff67d behaviour (entity-as-point, center-to-center range queries) and post-d0fc8ff67d (entities-as-circumscribing-circle, edge-to-edge range queries). The former is used for UnitAI (where the new behaviour bugged), auras (where varying structure sizes made it awkward) and build restrictions(which simply did not really need it). Reverts7f1ee23d88,050c5401b1(with the exception of the iber monument footprint), and the template changes ind0fc8ff67ditself. It also reduces alertRaiser ranges slightly, this was missed in the original diff. #3381 is not reopened as BuildingAI still uses the new range queries. Reported by: Freagarach Comments By: Angen Fixes #5968 Differential Revision: https://code.wildfiregames.com/D3456 This was SVN commit r24776.