mirror of
https://github.com/spiffcode/hostile-takeover.git
synced 2026-04-29 23:41:38 -06:00
Fix builder bug that allowed ordering disabled units
If a unit was ordered while it was enabled, and then the order was canceled after the unit was disabled, the order button would appear and allow the disabled unit to be ordered more. This would continue to work as long as there was at least one order of the disabled unit in the queue to cancel.
This commit is contained in:
parent
b57f5a3a62
commit
f0b60db710
@ -774,6 +774,9 @@ void MobileUnitBuildForm::OnControlSelected(word idc)
|
||||
|
||||
m_fOrderValid = true;
|
||||
m_fLimitReached = false;
|
||||
ListItem *pli = plstc->GetSelectedItem();
|
||||
if (pli != NULL)
|
||||
m_fOrderValid = !pli->fDisabled;
|
||||
UpdateOrderButton(false);
|
||||
|
||||
if (m_bqPrivate.GetUnitCount(ut) == 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user