diff --git a/src/extensions/house/houseext_hooks.cpp b/src/extensions/house/houseext_hooks.cpp index 71ceda52..de0eb141 100644 --- a/src/extensions/house/houseext_hooks.cpp +++ b/src/extensions/house/houseext_hooks.cpp @@ -160,7 +160,7 @@ DECLARE_PATCH(_HouseClass_Can_Build_BuildCheat_Patch) /** - * #issue-715 + * #issue-611, #issue-715 * * Gets the number of queued objects when determining whether a cameo * should be disabled. @@ -184,6 +184,15 @@ int _HouseClass_ShouldDisableCameo_Get_Queued_Count(FactoryClass* factory, Techn return count; } + /** + * #issue-611 + * + * If the object has a build limit, then reduce count by 1 + */ + if (technotype->BuildLimit > 0) { + count--; + } + /** * #issue-715 * @@ -204,10 +213,13 @@ int _HouseClass_ShouldDisableCameo_Get_Queued_Count(FactoryClass* factory, Techn /** - * #issue-715 + * #issue-611, #issue-715 + * + * Fixes the game allowing the player to queue one unit too few + * when a unit has BuildLimit > 1. * - * Updates the build limit logic with unit queuing to - * take our unit transformation logic into account. + * Also updates the logic to take our unit transformation logic + * into account. */ DECLARE_PATCH(_HouseClass_ShouldDisableCameo_BuildLimit_Fix) {