Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#5584 closed defect (fixed)

Capturing or repairing bolt shooter or catapult stops when the unit switches states

Reported by: Minohaka Owned by: wraitii
Priority: Should Have Milestone: Alpha 24
Component: Simulation Keywords:
Cc: Patch: Phab:D2735

Description

If your order a group units to capture a bolt shooter or catapult while they are deployed if it starts moving to run away the units forget what they were doing and stop and start attacking it or attacking other units even tho that was not what they were order to.

The same happens if you order your citizen units to repair one these units (bolt shooter or catapult) and they switch from one state to the other the units switch task without finish the repair. Apparently these units change type or something when their state changes

Change History (8)

comment:1 by Minohaka, 5 years ago

Summary: Capturing or repairing bolt shooter or catapult stops when the unit swithces statesCapturing or repairing bolt shooter or catapult stops when the unit switches states

comment:2 by elexis, 5 years ago

Thank you for filing a bugreport about this minohaka! I was already worrying it got lost in transmission.

Do you happen to know if this behavior exists in alpha 23 too?

comment:3 by elexis, 5 years ago

Milestone: BacklogAlpha 24

I will put it on the milestone so we will at least check whether it was a regression.

comment:4 by Freagarach, 5 years ago

Repairing: UnitAI L2690, a temporary this.repairTarget which is not updated at unit rename (makes timer finish order). Attacking: might be when a function still runs when the entity gets renamed? (Since target is often stored at the start of a "function" (e.g. "Timer").)

comment:5 by Freagarach, 4 years ago

Repairing fixed in r23449.

comment:6 by wraitii, 4 years ago

Owner: set to wraitii
Patch: Phab:D2735

Need to check that D2735 fixes this but it ought to.

Edit -> it's indeed the case.

Last edited 4 years ago by wraitii (previous) (diff)

comment:7 by wraitii, 4 years ago

Resolution: fixed
Status: newclosed

In 23708:

Trigger an exit-reentry when the target entity of an order is renamed

This lets sunit AI FSM states correctly handle target entity renaming by processing a message when that happens. The default behaviour is to leave-reenter the state, which re-runs sanity checks and optionally picks a better behaviour.

UnitMotion is still not made aware of entity renaming, as the leave-enter makes it irrelevant in practice. It still may be a good idea to implement that someday.

Fixes the concern raised at rP20393.
Fixes #5584

Comments by: bb, Freagarach

Reported by: minohaka, bb, Freagarach

Differential Revision: https://code.wildfiregames.com/D2735

comment:8 by wraitii, 4 years ago

In 23742:

Trigger an exit-reentry when the target entity of an order is renamed

This lets unitAI FSM states correctly handle target entity renaming by processing a message when that happens. The default behaviour is to leave-reenter the state, which re-runs sanity checks and optionally picks a better behaviour.

UnitMotion is still not made aware of entity renaming, as the leave-enter makes it irrelevant in practice. It still may be a good idea to implement that someday.

Fixes the concern raised at rP20393.
Fixes #5584

Comments by: bb, Freagarach

Tested by: Freagarach

Reported by: minohaka, bb, Freagarach, gameboy (error in the original commit)

Differential Revision: https://code.wildfiregames.com/D2735

Note: See TracTickets for help on using tickets.