diff --git a/Core/GameEngine/CMakeLists.txt b/Core/GameEngine/CMakeLists.txt
index 494d544f73d..9f495b545f0 100644
--- a/Core/GameEngine/CMakeLists.txt
+++ b/Core/GameEngine/CMakeLists.txt
@@ -339,6 +339,7 @@ set(GAMEENGINE_SRC
# Include/GameLogic/Module/HeightDieUpdate.h
# Include/GameLogic/Module/HelicopterSlowDeathUpdate.h
# Include/GameLogic/Module/HelixContain.h
+# Include/GameLogic/Module/MultiAddOnContain.h
# Include/GameLogic/Module/HighlanderBody.h
# Include/GameLogic/Module/HijackerUpdate.h
# Include/GameLogic/Module/HiveStructureBody.h
@@ -905,6 +906,7 @@ set(GAMEENGINE_SRC
# Source/GameLogic/Object/Contain/GarrisonContain.cpp
# Source/GameLogic/Object/Contain/HealContain.cpp
# Source/GameLogic/Object/Contain/HelixContain.cpp
+# Source/GameLogic/Object/Contain/MultiAddOnContain.cpp
# Source/GameLogic/Object/Contain/InternetHackContain.cpp
# Source/GameLogic/Object/Contain/MobNexusContain.cpp
# Source/GameLogic/Object/Contain/OpenContain.cpp
diff --git a/Core/GameEngine/Source/Common/System/GameMemoryInitPools_Generals.inl b/Core/GameEngine/Source/Common/System/GameMemoryInitPools_Generals.inl
index b049809df14..31b24b6551b 100644
--- a/Core/GameEngine/Source/Common/System/GameMemoryInitPools_Generals.inl
+++ b/Core/GameEngine/Source/Common/System/GameMemoryInitPools_Generals.inl
@@ -196,6 +196,7 @@ static PoolSizeRec PoolSizes[] =
{ "OverchargeBehavior", 32, 32 },
{ "OverlordContain", 32, 32 },
{ "HelixContain", 32, 32 },
+ { "MultiAddOnContain", 64, 32 },
{ "ParachuteContain", 128, 32 },
{ "PhysicsBehavior", 600, 32 },
{ "PoisonedBehavior", 512, 64 },
diff --git a/Core/GameEngine/Source/Common/System/GameMemoryInitPools_GeneralsMD.inl b/Core/GameEngine/Source/Common/System/GameMemoryInitPools_GeneralsMD.inl
index c00ec752b39..49c4f6fe416 100644
--- a/Core/GameEngine/Source/Common/System/GameMemoryInitPools_GeneralsMD.inl
+++ b/Core/GameEngine/Source/Common/System/GameMemoryInitPools_GeneralsMD.inl
@@ -200,6 +200,7 @@ static PoolSizeRec PoolSizes[] =
{ "OverchargeBehavior", 32, 32 },
{ "OverlordContain", 32, 32 },
{ "HelixContain", 32, 32 },
+ { "MultiAddOnContain", 64, 32 },
{ "ParachuteContain", 128, 32 },
{ "PhysicsBehavior", 600, 32 },
{ "PoisonedBehavior", 512, 64 },
diff --git a/GeneralsMD/Code/GameEngine/CMakeLists.txt b/GeneralsMD/Code/GameEngine/CMakeLists.txt
index 36e3f897c9e..6ef78dbac79 100644
--- a/GeneralsMD/Code/GameEngine/CMakeLists.txt
+++ b/GeneralsMD/Code/GameEngine/CMakeLists.txt
@@ -21,13 +21,13 @@ set(GAMEENGINE_SRC
Include/Common/CDManager.h
Include/Common/ClientUpdateModule.h
Include/Common/CommandLine.h
-# Include/Common/crc.h
-# Include/Common/CRCDebug.h
+# Include/Common/crc.h
+# Include/Common/CRCDebug.h
Include/Common/CriticalSection.h
Include/Common/CustomMatchPreferences.h
Include/Common/DamageFX.h
Include/Common/DataChunk.h
-# Include/Common/Debug.h
+# Include/Common/Debug.h
Include/Common/Dict.h
Include/Common/Directory.h
Include/Common/DisabledTypes.h
@@ -45,7 +45,7 @@ set(GAMEENGINE_SRC
# Include/Common/GameDefines.h
Include/Common/GameEngine.h
Include/Common/GameLOD.h
-# Include/Common/GameMemory.h
+# Include/Common/GameMemory.h
# Include/Common/GameMusic.h
# Include/Common/GameSounds.h
Include/Common/GameSpyMiscPreferences.h
@@ -92,7 +92,7 @@ set(GAMEENGINE_SRC
Include/Common/QuotedPrintable.h
Include/Common/Radar.h
# Include/Common/RAMFile.h
-# Include/Common/RandomValue.h
+# Include/Common/RandomValue.h
Include/Common/Recorder.h
# Include/Common/ReplaySimulation.h
Include/Common/Registry.h
@@ -142,7 +142,7 @@ set(GAMEENGINE_SRC
Include/GameClient/CDCheck.h
Include/GameClient/ChallengeGenerals.h
Include/GameClient/ClientInstance.h
-# Include/GameClient/ClientRandomValue.h
+# Include/GameClient/ClientRandomValue.h
Include/GameClient/Color.h
Include/GameClient/CommandXlat.h
Include/GameClient/ControlBar.h
@@ -224,12 +224,12 @@ set(GAMEENGINE_SRC
Include/GameClient/Statistics.h
Include/GameClient/TerrainRoads.h
Include/GameClient/TerrainVisual.h
- Include/GameClient/TintStatus.h
-# Include/GameClient/VideoPlayer.h
+ Include/GameClient/TintStatus.h
+# Include/GameClient/VideoPlayer.h
Include/GameClient/View.h
Include/GameClient/Water.h
Include/GameClient/WindowLayout.h
-# Include/GameClient/WindowVideoManager.h
+# Include/GameClient/WindowVideoManager.h
Include/GameClient/WindowXlat.h
Include/GameClient/WinInstanceData.h
Include/GameLogic/AI.h
@@ -253,7 +253,7 @@ set(GAMEENGINE_SRC
Include/GameLogic/GhostObject.h
Include/GameLogic/Locomotor.h
Include/GameLogic/LocomotorSet.h
-# Include/GameLogic/LogicRandomValue.h
+# Include/GameLogic/LogicRandomValue.h
Include/GameLogic/Module/ActiveBody.h
Include/GameLogic/Module/ActiveShroudUpgrade.h
Include/GameLogic/Module/AIUpdate.h
@@ -344,6 +344,7 @@ set(GAMEENGINE_SRC
Include/GameLogic/Module/HeightDieUpdate.h
Include/GameLogic/Module/HelicopterSlowDeathUpdate.h
Include/GameLogic/Module/HelixContain.h
+ Include/GameLogic/Module/MultiAddOnContain.h
Include/GameLogic/Module/HighlanderBody.h
Include/GameLogic/Module/HijackerUpdate.h
Include/GameLogic/Module/HiveStructureBody.h
@@ -578,8 +579,8 @@ set(GAMEENGINE_SRC
Source/Common/Bezier/BezierSegment.cpp
Source/Common/BitFlags.cpp
Source/Common/CommandLine.cpp
-# Source/Common/crc.cpp
-# Source/Common/CRCDebug.cpp
+# Source/Common/crc.cpp
+# Source/Common/CRCDebug.cpp
Source/Common/DamageFX.cpp
Source/Common/Dict.cpp
Source/Common/DiscreteCircle.cpp
@@ -611,7 +612,7 @@ set(GAMEENGINE_SRC
Source/Common/INI/INITerrainBridge.cpp
Source/Common/INI/INITerrainRoad.cpp
Source/Common/INI/INIUpgrade.cpp
-# Source/Common/INI/INIVideo.cpp
+# Source/Common/INI/INIVideo.cpp
Source/Common/INI/INIWater.cpp
Source/Common/INI/INIWeapon.cpp
Source/Common/INI/INIWebpageURL.cpp
@@ -622,7 +623,7 @@ set(GAMEENGINE_SRC
Source/Common/NameKeyGenerator.cpp
Source/Common/PartitionSolver.cpp
Source/Common/PerfTimer.cpp
-# Source/Common/RandomValue.cpp
+# Source/Common/RandomValue.cpp
Source/Common/Recorder.cpp
# Source/Common/ReplaySimulation.cpp
Source/Common/RTS/AcademyStats.cpp
@@ -651,7 +652,7 @@ set(GAMEENGINE_SRC
Source/Common/System/CDManager.cpp
Source/Common/System/CriticalSection.cpp
Source/Common/System/DataChunk.cpp
-# Source/Common/System/Debug.cpp
+# Source/Common/System/Debug.cpp
Source/Common/System/Directory.cpp
Source/Common/System/DisabledTypes.cpp
Source/Common/System/encrypt.cpp
@@ -806,7 +807,7 @@ set(GAMEENGINE_SRC
Source/GameClient/GUI/Shell/Shell.cpp
Source/GameClient/GUI/Shell/ShellMenuScheme.cpp
Source/GameClient/GUI/WindowLayout.cpp
-# Source/GameClient/GUI/WindowVideoManager.cpp
+# Source/GameClient/GUI/WindowVideoManager.cpp
Source/GameClient/GUI/WinInstanceData.cpp
Source/GameClient/InGameUI.cpp
Source/GameClient/Input/Keyboard.cpp
@@ -838,8 +839,8 @@ set(GAMEENGINE_SRC
Source/GameClient/System/Smudge.cpp
Source/GameClient/Terrain/TerrainRoads.cpp
Source/GameClient/Terrain/TerrainVisual.cpp
-# Source/GameClient/VideoPlayer.cpp
-# Source/GameClient/VideoStream.cpp
+# Source/GameClient/VideoPlayer.cpp
+# Source/GameClient/VideoStream.cpp
Source/GameClient/View.cpp
Source/GameClient/Water.cpp
Source/GameLogic/AI/AI.cpp
@@ -924,6 +925,7 @@ set(GAMEENGINE_SRC
Source/GameLogic/Object/Contain/GarrisonContain.cpp
Source/GameLogic/Object/Contain/HealContain.cpp
Source/GameLogic/Object/Contain/HelixContain.cpp
+ Source/GameLogic/Object/Contain/MultiAddOnContain.cpp
Source/GameLogic/Object/Contain/InternetHackContain.cpp
Source/GameLogic/Object/Contain/MobNexusContain.cpp
Source/GameLogic/Object/Contain/OpenContain.cpp
@@ -1167,16 +1169,16 @@ set(GAMEENGINE_SRC
if(RTS_GAMEMEMORY_ENABLE)
# Uses the original Game Memory implementation.
list(APPEND GAMEENGINE_SRC
-# Source/Common/System/GameMemory.cpp
-# Source/Common/System/GameMemoryInitDMA_GeneralsMD.inl
-# Source/Common/System/GameMemoryInitPools_GeneralsMD.inl
-# Source/Common/System/MemoryInit.cpp
+# Source/Common/System/GameMemory.cpp
+# Source/Common/System/GameMemoryInitDMA_GeneralsMD.inl
+# Source/Common/System/GameMemoryInitPools_GeneralsMD.inl
+# Source/Common/System/MemoryInit.cpp
)
else()
# Uses the null implementation when disabled.
list(APPEND GAMEENGINE_SRC
-# Source/Common/System/GameMemoryNull.cpp
-# Include/Common/GameMemoryNull.h
+# Source/Common/System/GameMemoryNull.cpp
+# Include/Common/GameMemoryNull.h
)
endif()
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ContainModule.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ContainModule.h
index 3b172314756..4c2e73235c8 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ContainModule.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ContainModule.h
@@ -208,6 +208,11 @@ class ContainModuleInterface
return true;
}
+
+ // AW: New additions for MultiAddonContain only
+ virtual short getRiderSlot(ObjectID riderID) const = 0; // get the slot occupied by the object.
+ virtual short getPortableSlot(ObjectID portableID) const = 0; // get the slot occupied by the object.
+ virtual const ContainedItemsList* getAddOnList() const = 0;
};
//-------------------------------------------------------------------------------------------------
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MultiAddOnContain.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MultiAddOnContain.h
new file mode 100644
index 00000000000..7dc2e8b3027
--- /dev/null
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MultiAddOnContain.h
@@ -0,0 +1,166 @@
+/*
+** Command & Conquer Generals Zero Hour(tm)
+** Copyright 2025 Electronic Arts Inc.
+**
+** This program is free software: you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation, either version 3 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program. If not, see .
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+// //
+// (c) 2001-2003 Electronic Arts Inc. //
+// //
+////////////////////////////////////////////////////////////////////////////////
+
+// FILE: MultiAddOnContain.h ////////////////////////////////////////////////////////////////////////
+// Author: Graham Smallwood, September, 2002
+// Desc: Contain module that acts as transport normally, but when full it redirects queries to the first passenger
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#ifndef __MULTIADDON_CONTAIN_H_
+#define __MULTIADDON_CONTAIN_H_
+
+// USER INCLUDES //////////////////////////////////////////////////////////////////////////////////
+#include "GameLogic/Module/TransportContain.h"
+#include "GameLogic/GameLogic.h"
+
+
+typedef std::vector TemplateNameList;
+typedef std::vector::const_iterator TemplateNameIterator;
+
+typedef std::vector VecObjectID;
+typedef VecObjectID::iterator VecObjectIDIt;
+
+typedef std::vector