Opened 13 years ago

Closed 13 years ago

#844 closed defect (fixed)

Idle villagers button broken (garrisoned idle units not shown)

Reported by: Kieran P Owned by: ben
Priority: Release Blocker Milestone: Alpha 5
Component: Core engine Keywords:
Cc: Patch:

Description

I'm clicking on it and 9/10 times nothing happens, 1/10 times it actually finds an idle unit.

Change History (7)

comment:1 by Kieran P, 13 years ago

Owner: set to ben

comment:2 by historic_bruno, 13 years ago

I can't reproduce this, any more info would be helpful.

comment:3 by Kieran P, 13 years ago

Resolution: worksforme
Status: newclosed

I've tried getting the same issue, same map, but wasn't able to get this again.

So it's either been fixed, or was a result of some JS error that happened before the button was clicked.

I'll close this for now. If it happens again, I'll reopen for Alpha 6.

comment:4 by historic_bruno, 13 years ago

Resolution: worksforme
Status: closedreopened
Summary: Idle villagers button brokenIdle villagers button broken (garrisoned idle units not shown)

Reopening because it's a valid bug. The cause is that garrisoned units are counted as idle and so get iterated like normal idle units. Then the selection and camera follow fails (presumably because the units are no longer visible). There's a few ways of solving this that I can think of:

  • Allow garrisoned idle units to be selected somehow instead of silently failing. Maybe giving them an order (e.g. move, attack, build) would automatically ungarrison them?
  • Or add an isGarrisoned flag to UnitAI. Marking units as garrisoned turns out to be trivial because they always enter the Garrisoned state, the problem is they exit said state directly after, so marking them as ungarrisoned is a bit trickier. I guess the garrison holder needs to be responsible for manually setting the flag on every unit it ejects. Or maybe units should stay in the Garrisoned state until they're ungarrisoned.
  • Or reset the isIdle flag so that garrisoned units are not counted as idle, we could say for instance that they are on guard and so not really idle at all. (This runs into a similar problem as above when they get ungarrisoned, we'd have to handle changing idleness then.)

comment:5 by historic_bruno, 13 years ago

Priority: Release BlockerShould Have

comment:6 by Kieran P, 13 years ago

Priority: Should HaveRelease Blocker

comment:7 by ben, 13 years ago

Resolution: fixed
Status: reopenedclosed

(In [9498]) Fixes garrisoned units being found as idle (even if they are, we can't select them, so skip them instead). Fixes #844. Garrisoned units now remain in the GARRISONED state until explicitly ungarrisoned

Note: See TracTickets for help on using tickets.