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 , 13 years ago
Owner: | set to |
---|
comment:2 by , 13 years ago
comment:3 by , 13 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
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 , 13 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
Summary: | Idle villagers button broken → Idle 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 , 13 years ago
Priority: | Release Blocker → Should Have |
---|
comment:6 by , 13 years ago
Priority: | Should Have → Release Blocker |
---|
comment:7 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I can't reproduce this, any more info would be helpful.