1
0
forked from 0ad/0ad
0ad/source
wraitii 93a352ad16 Fix UnitAI range queries - allow queries to ignore sizes - partial revert of d0fc8ff67d
Units sometimes ignored targets that entered their LoS. The cause is
d0fc8ff67d: 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).

Reverts 7f1ee23d88, 050c5401b1 (with the exception of the iber monument
footprint), and the template changes in d0fc8ff67d itself.

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.
2021-01-23 18:57:46 +00:00
..
collada Fix compiler warnings on VS 2015, refs #3439, refs #5069. 2018-03-10 09:58:53 +00:00
graphics Fix issue with 5d2be02f68 2021-01-21 08:42:05 +00:00
gui Fix 3872ee43b5 and 768c84aa46 2021-01-18 12:16:27 +00:00
i18n Replaces UNICODE characters in the code by consistent ASCII characters. 2021-01-15 10:07:36 +00:00
lib Replaces UNICODE characters in the code by consistent ASCII characters. 2021-01-15 10:07:36 +00:00
lobby Fix incorrect user identifier used in 0342f01580 2021-01-20 19:54:16 +00:00
maths Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Net Server: Verify password in Authenticate 2021-01-23 18:04:36 +00:00
pch Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ps Allows to override GL version for SDL. 2021-01-22 19:40:02 +00:00
renderer Removes useless transparent pass before the water for lowest settings since the water is opaque there. 2021-01-21 22:38:11 +00:00
rlinterface Address concerns in 5473393e30 (RL interface) 2021-01-15 16:30:05 +00:00
scriptinterface Address concerns in 5473393e30 (RL interface) 2021-01-15 16:30:05 +00:00
simulation2 Fix UnitAI range queries - allow queries to ignore sizes - partial revert of d0fc8ff67d 2021-01-23 18:57:46 +00:00
soundmanager Fix audio leak that resulted in openAL errors after a while. 2021-01-22 12:50:05 +00:00
third_party Optimization for include resolving in PreprocessorWrapper. 2021-01-20 23:05:15 +00:00
tools Update bundle dist tools 2021-01-22 12:53:54 +00:00
main.cpp Address concerns in 5473393e30 (RL interface) 2021-01-15 16:30:05 +00:00
test_setup.cpp Fix windows SEH hook when crashing in an std::thread 2021-01-10 08:39:54 +00:00