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:
Nathan Fulton 2016-08-25 16:11:23 -04:00
parent b57f5a3a62
commit f0b60db710

View File

@ -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) {