Description
Description
Details
Details
- Auditors
wraitii - Committed
Freagarach Feb 28 2021, 7:29 AM - Differential Revision
- D3283: Properly discard orders in UnitAI.js.
- Parents
- rP24955: Only cancel (un)packing when in the correct state.
- Branches
- Unknown
- Tags
- Build Status
Buildable 15835 Build 35042: Post-Commit Build Jenkins Build 35041: Post-Commit Build (macOS) Jenkins
Event Timeline
Comment Actions
Causes the @gameboy bug. The problem is subtle and annoying.
Before, when FinishOrder() was called inside an "Order.X" message to reject an order, we were still processing the FSM state. So FinishOrder's SetNextState() would actually do something. Now it does nothing -> units don't go in IDLE when out of orders.
Comment Actions
I actually think it's cleaner to call FinishOrder() from inside the FSM than handle it from outside. So I'd favour replacing the return REJECT_ORDER with a return rejectOrder() function that does that.