Opened 3 years ago

Closed 3 years ago

#6260 closed defect (fixed)

Units in formation ignore enemies when patroling or doing attack-move

Reported by: Silier Owned by: Freagarach
Priority: Must Have Milestone: Alpha 25
Component: Simulation Keywords:
Cc: Patch: Phab:D4208

Description

Reproted by ValihrAnt on forums:

https://wildfiregames.com/forum/topic/41264-alpha-25-pre-releaserelease-candidate-build-testing/page/14/?tab=comments#comment-444235

I did some quick messing around with formations and found a new issue now.
When I unit attack move or patrol when in formation, only one of the units in 
the formation will attack while the rest continue moving onwards, right 
through the enemies. Attack move and patrol without formation seems to be just fine though.

Change History (5)

comment:1 by Silier, 3 years ago

Priority: Should HaveMust Have

comment:2 by Freagarach, 3 years ago

They actually don't ignore them, but check enemies on a timer, at 1000 ms. So if one lets a formation attack-move while close to an enemy, it may seem to be ignoring them. One could check for nearby targets also when entering the walk-and-fight state to remedy such unwanted behaviour.

comment:3 by Freagarach, 3 years ago

There is more at play, indeed only one unit goes to attack, introduced in r25102.

comment:4 by Freagarach, 3 years ago

Milestone: Alpha 26Alpha 25
Owner: set to Freagarach
Patch: Phab:D4208

comment:5 by Freagarach, 3 years ago

Resolution: fixed
Status: newclosed

In 25847:

Fix walk and fight with formations.

Introduced in r25102 / rP25102, FindWalkAndFightTargets returns after the first UnitAI finds a target, instead of also querying the rest of the members.

Differential revision: https://code.wildfiregames.com/D4208
Comments by: @Stan, @wraitii
Fixes: #6260

Note: See TracTickets for help on using tickets.