View Issue Details

IDProjectCategoryView StatusLast Update
0005281Spring engineGeneralpublic2016-12-17 18:55
ReporterForboding Angel Assigned ToKloot  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version101.0+git 
Summary0005281: If a mobile unit is built by another mobile unit and not given an order, UnitIdle never fires
DescriptionFor 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 ReproduceMake 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.
TagsNo tags attached.
Checked infolog.txt for Errors

Relationships

has duplicate 0005306 closedKloot UnitIdle isnt triggered 

Activities

lamer

2016-06-14 21:25

reporter   ~0016443

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.

Forboding Angel

2016-06-14 22:18

reporter   ~0016444

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.

Google_Frog

2016-06-15 10:23

reporter   ~0016445

It is probably because units built by mobiles are not told to bugger off.

Forboding Angel

2016-06-15 22:06

reporter   ~0016446

I assume bugger off is an order that factories give recently built units to clear the pad?

silentwings

2016-06-16 12:52

reporter   ~0016447

https://github.com/spring/spring/blob/5f08624585852b8c8dfd1a16d020ae530269dc09/rts/Sim/Units/CommandAI/BuilderCAI.h#L39

Kloot

2016-12-17 18:54

developer   ~0016980

the event only fires when a unit's command queue *becomes* empty, not if it *starts* empty.

Issue History

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