ZeroK-RTS / Zero-K

Open source RTS game running on the Spring/Recoil engine
https://zero-k.info
GNU General Public License v2.0
683 stars 204 forks source link

Owl with Fight sometimes fails to flee #3643

Open GoogleFrog opened 5 years ago

GoogleFrog commented 5 years ago

Movestate should not affect unit AI when Fight or Patrol is active. The Roam behaviour for Owl is better than the Hold Position behaviour.

Cat-Lady commented 5 years ago

Traditionally and for all other units, movestate affects (or at least should, by description) how far unit "wanders" off form patrol route to pursue enemies (hold position - doesn't wander at all, maneuver -> goes some way, then returns, Roam -> chase to the death, either self, or the target, return only when no further targets).

It seems that fight move was working same way - units on Roam would "forget" where they were supposed to move via attack-move, until all targets in sight died.

GoogleFrog commented 5 years ago

The AI behaviour for Owl with Fight makes no reference to movestate, yet I observed a difference. This ticket has a specific topic (like most tickets).

GoogleFrog commented 5 years ago

http://zero-k.info/Battles/Detail/741904

At 3000 5100 23:16 an Owl with Hold Position and Fight moves much closer to enemy units than should be permitted by its behaviour. It appears to skip a few slow updates of fleeing.

A similar thing happens around 20:37 with a Roam Owl, so the issue is not related to move state.