View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005281 | Spring engine | General | public | 2016-06-14 17:44 | 2016-12-17 18:55 |
| Reporter | Forboding Angel | Assigned To | Kloot | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | 101.0+git | ||||
| Summary | 0005281: If a mobile unit is built by another mobile unit and not given an order, UnitIdle never fires | ||||
| Description | For a very long time I've wondered why this widget: https://github.com/EvolutionRTS/Evolution-RTS/blob/master/LuaUI/Widgets_Evo/unit_auto_reclaim_heal_assist.lua Refuses to work for eorb ever since i made it so that they are built by builders instead of factories. Today I did some digging. It appears that when mobile units are built by other mobile units, UnitIdle never happens, therefore it's almost like the unit doesn't exist yet. Bad explanation but hopefully someone will understand. | ||||
| Steps To Reproduce | Make a mobile unit build another mobile unit. Make sure not to give the newly constructed unit any orders and see if UnitIdle happens. If you load up evo:test and build an orb, you can see it for yourself. | ||||
| Tags | No tags attached. | ||||
| Checked infolog.txt for Errors | |||||
|
|
I can suggest to listen to UnitFinished event and invoke manually UnitIdle from there. That's what i did for my AI in past, don't know if applicable in ticket's case. |
|
|
That seems like a perfectly legit workaround, but tbh, this is something that should be fixed instead of requiring workarounds for what should already be. |
|
|
It is probably because units built by mobiles are not told to bugger off. |
|
|
I assume bugger off is an order that factories give recently built units to clear the pad? |
|
|
https://github.com/spring/spring/blob/5f08624585852b8c8dfd1a16d020ae530269dc09/rts/Sim/Units/CommandAI/BuilderCAI.h#L39 |
|
|
the event only fires when a unit's command queue *becomes* empty, not if it *starts* empty. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-06-14 17:44 | Forboding Angel | New Issue | |
| 2016-06-14 21:25 | lamer | Note Added: 0016443 | |
| 2016-06-14 22:18 | Forboding Angel | Note Added: 0016444 | |
| 2016-06-15 10:23 | Google_Frog | Note Added: 0016445 | |
| 2016-06-15 22:06 | Forboding Angel | Note Added: 0016446 | |
| 2016-06-16 12:52 | silentwings | Note Added: 0016447 | |
| 2016-12-17 18:54 | Kloot | Note Added: 0016980 | |
| 2016-12-17 18:55 | Kloot | Assigned To | => Kloot |
| 2016-12-17 18:55 | Kloot | Status | new => closed |
| 2016-12-17 18:55 | Kloot | Resolution | open => no change required |
| 2017-01-05 15:27 | Kloot | Relationship added | has duplicate 0005306 |