Opened 3 years ago
Closed 3 years ago
#5968 closed defect (fixed)
Idle entities not reacting to nearby enemies.
Reported by: | Freagarach | Owned by: | wraitii |
---|---|---|---|
Priority: | Release Blocker | Milestone: | Alpha 24 |
Component: | Simulation | Keywords: | UnitAI |
Cc: | Patch: | Phab:D3456 |
Description
As can be seen in the attached replay, there are sometimes some idle javelineers of mine that do not attack nearby enemies.
Attachments (2)
Change History (8)
by , 3 years ago
Attachment: | commands.txt added |
---|
comment:1 by , 3 years ago
Component: | Core engine → Simulation |
---|
comment:3 by , 3 years ago
K, this is very much a release blocker... Phab:rP24217 has basically introduced edge cases in all unit range queries. The problem is UnitAI does some primitive range checking, using euclidian distance and not proper obstructionManager distance checking. But things don't stop there.
- Defensive checks distance to a held position, but the range check is for the entity itself, which is very much not at the held position. Using the los range update is incorrect here in almost every case.
- Even then, the range queries might return entities which are technically inside the vision range, but aren't visible because of #5606 (our entities become visible when their center-point is visible).
- Finally, range queries don't really guarantee that units are actually in range, so using those and checking range precisely and then forgetting about the units is probably not a good call in any case.
I fear I have to upgrade r24217 to include a 'force center-to-center' query mode or things might be very, very broken at the moment, because of point 2.
BTW this is easier to reproduce with rams, because of their slow speed and larger obstruction size almost guaranteeing that they'll be reported in the range query before they're actually in the proper range.
comment:4 by , 3 years ago
Priority: | Must Have → Release Blocker |
---|
comment:5 by , 3 years ago
Patch: | → Phab:D3456 |
---|
r24761