#5610 closed defect (fixed)

Unit doesn't attack enemies nearby after killing one

Reported by: elexis Owned by: Angen
Priority: Release Blocker Milestone: Alpha 24
Component: Simulation Keywords: regression
Cc: Patch: Phab:D2517

Description

In this replay, the hero unit that attacked the passive gatherers of the enemy stopped attacking units that were just in front of him.

Sometimes it was idling until receiving another order, other times it decided to go for capturing the CC (probably hit by an arrow).

Attachments (2)

commands.txt (30.4 KB ) - added by elexis 21 months ago.
commands.2.txt (397.5 KB ) - added by Minohaka 21 months ago.
Replay that includes bug all units same type stop gathering

Download all attachments as: .zip

Change History (13)

by elexis, 21 months ago

Attachment: commands.txt added

comment:1 by elexis, 21 months ago

replay for r23013, bug occurs at least around minute 1 the first minute.

Reproduce: "gift from the gods", train 30 units, "i am too busy" cheat to reset speed cheat, set to passive (unneeded?), gather resources, change perspective to other player, train hero (or other unit?), attack those gatherers

comment:2 by Minohaka, 21 months ago

This is probably related

What's it call when some units do some sort of taunting, some times during fight and others when you order them to attack? I think there's a bug related to it, units of that type stop and just don't do anything when that happens

comment:3 by elexis, 21 months ago

Minohaka got a replay for that? Also are you refering to Petra controlled units or player controlled units?

comment:4 by Freagarach, 21 months ago

From what I gathered now regarding elexis' replay:

  • The hero gets stuck in "Chasing"-state, because the targeted unit as the hero tries to chase it.
  • Since there is no check in the MovementUpdate for a dead target (msg.likelyFailure) the hero won't get out of the chasing state.
  • I would say rP22526 perhaps?

It is not specific to many entities, 1 vs 1 can give the same result. Delete a entity which is being chased and one can see in the selection state that the chaser is stuck in "chasing". I'm not sure what caused the hero to move out of the chasing though.

Last edited 21 months ago by Freagarach (previous) (diff)

comment:5 by Freagarach, 21 months ago

Found it:

  • Forced orders will always not abandon chase on timer, while with the second order (you ordered stop so the attacking and chasing were not forced orders) the ShouldAbandonChase checks for target visible wich returns false due to it being dead and we not able to see in the life beyond so we do abandon chase then (note that it does not in "violent" stance).
Last edited 21 months ago by Freagarach (previous) (diff)

by Minohaka, 21 months ago

Attachment: commands.2.txt added

Replay that includes bug all units same type stop gathering

comment:6 by Minohaka, 21 months ago

Minohaka got a replay for that?

Replay added, around min 18:20 the bug happens blue player all javelin units gathering gold and stone stopped gathering after some of them did the animation like a fight call (the units lift their arms, like saying "let's go, let's go") I don't don't what that's called

Also are you refering to Petra controlled units or player controlled units?

User controlled units, blue player of the replay

in reply to:  6 ; comment:7 by Freagarach, 21 months ago

Replying to Minohaka:

Replay added, around min 18:20 the bug happens blue player all javelin units gathering gold and stone stopped gathering after some of them did the animation like a fight call (the units lift their arms, like saying "let's go, let's go") I don't don't what that's called

You upgraded the mercenaries to promote and after that the orders were not passed to the upgraded entity. Source: rP22753.

in reply to:  7 comment:8 by Angen, 17 months ago

Replying to Freagarach:

Replying to Minohaka:

Replay added, around min 18:20 the bug happens blue player all javelin units gathering gold and stone stopped gathering after some of them did the animation like a fight call (the units lift their arms, like saying "let's go, let's go") I don't don't what that's called

You upgraded the mercenaries to promote and after that the orders were not passed to the upgraded entity. Source: rP22753.

Fixed in rP23267. Fix promoted entities not retaining order queue after rP22753.

rP22753 changed order in which cheer order is given and old orders copied. That lead to replacing all orders with cheering order.

Patch by: Freagarach
Differential Revision: D2358

comment:9 by Angen, 16 months ago

Patch: Phab:D2517

comment:10 by Angen, 16 months ago

Priority: Must HaveRelease Blocker

comment:11 by Angen, 15 months ago

Owner: set to Angen
Resolution: fixed
Status: newclosed

In 23566:

React to target death properly when chasing

Differential Revision: https://code.wildfiregames.com/D2517
Reviewed by: Freagarach
Comments by: elexis, Stan
Fixes: #5610 #5656

Introduce likelyFailure check in the movementupdate for chasing state missing since rP22526.
Use new order and substate for Chasing to get into the wanted range and avoid that way issue with running - walking tracking or animation variants.

Fixing issue when attacker would not react to the death of the target while chasing it in stances where results for abandoning chasing are always false and also do not rely on timer ending chasing for the rest of stances.

Note: See TracTickets for help on using tickets.