Skip to content

Fixes #5811: Unit Auto Reclaim/Heal/Assist no longer leaves ghost idle cons - #5818

Open
Petronous wants to merge 3 commits into
ZeroK-RTS:masterfrom
Petronous:master
Open

Fixes #5811: Unit Auto Reclaim/Heal/Assist no longer leaves ghost idle cons#5818
Petronous wants to merge 3 commits into
ZeroK-RTS:masterfrom
Petronous:master

Conversation

@Petronous

@Petronous Petronous commented Aug 24, 2026

Copy link
Copy Markdown

Changed the widget to not issue a stop command if the unit just died (proposed solution b in my issue).

Frankly I am not sure if we ever want it to issue a stop command.

The core selector widget now checks whether the unit in UnitIdle is really alive before setting its IdleCons entry to true.

I tested the change and it actually does fix the issue, idle con count stays correct. I have not done exhaustive testing with other widgets, but with such a small change it should hopefully not be necessary.

…ghost idle cons.

Changed the widget to not issue a stop command if the unit just died.
@sprunk

sprunk commented Aug 25, 2026

Copy link
Copy Markdown
Member

What if another widget gives a stop command, or even a player for a con with longer death animation? Core selector should probably be the one to notice that it's a dead unit receiving an order and not count it

@Petronous

Copy link
Copy Markdown
Author

Yeah, it's probably the better option. I suppose I was reluctant to jump straight into editing a core widget.

Is checking Spring.GetUnitIsDead(...) enough?

@sprunk

sprunk commented Aug 25, 2026

Copy link
Copy Markdown
Member

Sounds like it should be.

perry added 2 commits August 26, 2026 19:08
… leaves ghost idle cons."

This reverts commit f9acc72.

The ghost idle con prevention will be implemented in the core selector widget.
gui_chill_core_selector.lua now uses `Spring.GetUnitIsDead(...) == false` in `widget:UnitIdle(...)` to check if unit is really alive.
@Petronous

Copy link
Copy Markdown
Author

I could also put the same check into UnitCreated and UnitLoaded, which also set idleCons[...] = true, but I don't know if there is even a possibility that those could fire for a dead unit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants