#1395 closed defect (fixed)
Idle worker selection broken
Reported by: | Erik Johansson | Owned by: | Jonathan Waller |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 10 |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description
Or perhaps it's rather the "marking villagers as idle" part that's broken. Either way, I do have units standing idle (the case where I noticed it was with female citizens having gathered all the food from a farm) but not either moving to a similar resource (there was another farm nearby, I think it would be within the radius, but I could be wrong) or be "marked as idle". After I had ordered the unit to move a short distance and it had stopped moving it was possible to select it via the idle worker function.
Change History (6)
comment:1 by , 12 years ago
Milestone: | Backlog → Alpha 10 |
---|---|
Priority: | Should Have → Must Have |
comment:2 by , 12 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:3 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The error still occurs in some cases. Leper gave a test case of gathering from the berry bushes on Massacre of Delphi.
comment:5 by , 5 years ago
In r22023 by wraitii:
Always leave/reenter the top-most FSM state when SetNextState is called with the current FSM state.
When SetNextState is called with the current state, it will leave and re-enter so that any relevant cleanup will get called and things work as expected. It will prevent possibly awkward code issues in UnitAI, which already called SetNextStateAlwaysEntering in a number of places to work around them.
This should most likely have been the default behaviour in the first place.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1488
In 11806: