From 1338b5695f96c4f17fd3353aa7d1a62b92f7751c Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Tue, 18 Nov 2025 18:40:05 -0500 Subject: [PATCH 1/2] bugfix(logic): fix unexpected return in MSG_CANCEL_UNIT_CREATE --- .../GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp | 2 +- .../GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp b/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp index 6c58b9aa53..64afb2deff 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp @@ -1390,7 +1390,7 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData ) // get the unit production interface ProductionUpdateInterface *pu = producer->getProductionUpdateInterface(); if( pu == NULL ) - return; + break; // cancel the production pu->cancelUnitCreate( productionID ); diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp index 8b18e615d1..9b115d40f9 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp @@ -1418,7 +1418,7 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData ) // get the unit production interface ProductionUpdateInterface *pu = producer->getProductionUpdateInterface(); if( pu == NULL ) - return; + break; // cancel the production pu->cancelUnitCreate( productionID ); From 7dce50a9ced513b3b0e5959a40f16d516d72031e Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Tue, 18 Nov 2025 19:26:19 -0500 Subject: [PATCH 2/2] move behind retail compat flag --- .../GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp | 4 ++++ .../GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp b/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp index 64afb2deff..485a2bbaed 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp @@ -1390,7 +1390,11 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData ) // get the unit production interface ProductionUpdateInterface *pu = producer->getProductionUpdateInterface(); if( pu == NULL ) +#if RETAIL_COMPATIBLE_CRC + return; +#else break; +#endif // cancel the production pu->cancelUnitCreate( productionID ); diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp index 9b115d40f9..80085f5b25 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp @@ -1418,7 +1418,11 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData ) // get the unit production interface ProductionUpdateInterface *pu = producer->getProductionUpdateInterface(); if( pu == NULL ) +#if RETAIL_COMPATIBLE_CRC + return; +#else break; +#endif // cancel the production pu->cancelUnitCreate( productionID );