From f0b60db710819e724bb9d8c3a2d06513e73f0f73 Mon Sep 17 00:00:00 2001 From: Nathan Fulton Date: Thu, 25 Aug 2016 16:11:23 -0400 Subject: [PATCH] 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. --- game/Builder.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/game/Builder.cpp b/game/Builder.cpp index a7c70e8..aeb5164 100644 --- a/game/Builder.cpp +++ b/game/Builder.cpp @@ -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) {