Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

fix(gameengine): patch command sets and creation lists, close the last eight

Olcay Seygan41d564dc098f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 23ac66304..c5382ceed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -491,6 +491,13 @@ A second pass went through the same nine generals and the base units they build,
- Demolitions: the Rebel says his line when he plants a booby trap, the Combat Bike's button shows its icon, and a Worker on a bike dies in the Demolitions explosion.
- Toxin: a Stinger missile shot down by a laser burns up with the effect the plain one has.
- The Stealth general's Quad Cannon costs 800 like the other GLA versions. The price change had missed it.
+- The Scud Storm fires when its timer says so and not before. There was a way to make it launch all nine missiles early.
+- Infantry and Nuke: buying Mines at the Command Center no longer takes Frenzy off its buttons, and the Infantry general keeps his own Carpet Bomb there. The Infantry barracks keeps its own capture-building upgrade after Mines as well.
+- The Nuke MiG upgrade can be started on low power, like every other upgrade that silo sells.
+- The ECM Tank has an Attack Move button and the Troop Crawlers have Guard.
+- The three American generals' Paradrop drops their own Rangers, and a destroyed Particle Uplink lets their own Rangers out of the rubble. Both used to give the plain American Ranger, who could not be double-click selected with the rest.
+- A Saboteur thrown off a dying Combat Bike is thrown, instead of vanishing.
+- The Alpha Aurora's fuel-air blast goes off where the bomb lands, not in the air above the first roof it passes, and the bomb no longer hangs in the air for a frame before landing.
## One crate, one collector
diff --git a/GeneralsMD/Code/Data/INI/CommandSetReforged.ini b/GeneralsMD/Code/Data/INI/CommandSetReforged.ini
new file mode 100644
index 000000000..61693b013
--- /dev/null
+++ b/GeneralsMD/Code/Data/INI/CommandSetReforged.ini
@@ -0,0 +1,114 @@
+; Corrections to EA's command buttons and command sets. ControlBar::init loads this after
+; CommandSet.ini with INI_LOAD_MULTIFILE: a button block edits EA's button in place and names
+; only what changes, and a set block replaces the set whole. GameEngine::init adds its bytes to
+; the multiplayer INI CRC, as it does for CommandSet.ini.
+
+; ==== Buttons =====================================================================================
+
+; The Nuke MiG upgrade is the one China tank and silo upgrade that cannot be started on low power;
+; Neutron Shells, sold from the same silo, carries IGNORES_UNDERPOWERED.
+
+CommandButton Command_UpgradeChinaTacticalNukeMig
+ Options = IGNORES_UNDERPOWERED
+End
+
+; ==== China Command Centers after Mines ===========================================================
+
+; Buying Mines swaps the Command Center to its Upgrade set, and the Infantry and Nuke copies of that
+; set were written from other sets: the Infantry one lost Frenzy and put the plain Carpet Bomb and
+; Napalm Strike in place of the general's own, which it cannot use, and the Nuke one lost Frenzy.
+; Each is now its general's normal set with EMP Mines in slot 12.
+
+CommandSet Infa_ChinaCommandCenterCommandSetUpgrade
+ 1 = Infa_Command_ConstructChinaDozer
+ 2 = Early_Command_ChinaCarpetBomb
+ 3 = Infa_Command_Paradrop
+ 4 = Command_ClusterMines
+ 6 = Command_ArtilleryBarrage
+ 7 = Command_EmergencyRepair
+ 8 = Command_EMPPulse
+ 9 = Command_UpgradeChinaRadar
+ 10 = Early_Command_Frenzy
+ 12 = Command_UpgradeEMPMines
+ 13 = Command_SetRallyPoint
+ 14 = Command_Sell
+End
+
+CommandSet Nuke_ChinaCommandCenterCommandSetUpgrade
+ 1 = Nuke_Command_ConstructChinaDozer
+ 2 = Nuke_Command_ChinaCarpetBomb
+ 3 = Command_NapalmStrike
+ 4 = Command_ClusterMines
+ 5 = Command_CashHack
+ 6 = Command_ArtilleryBarrage
+ 7 = Early_Command_EmergencyRepair
+ 8 = Command_EMPPulse
+ 9 = Command_UpgradeChinaRadar
+ 10 = Command_Frenzy
+ 12 = Command_UpgradeEMPMines
+ 13 = Command_SetRallyPoint
+ 14 = Command_Sell
+End
+
+; The Infantry barracks after Mines swaps the general's own capture-building upgrade for the plain
+; one.
+
+CommandSet Infa_ChinaBarracksCommandSetUpgrade
+ 1 = Infa_Command_ConstructChinaInfantryMiniGunner
+ 2 = Infa_Command_ConstructChinaInfantryTankHunter
+ 3 = Infa_Command_ConstructChinaInfantryHacker
+ 4 = Infa_Command_ConstructChinaInfantryBlackLotus
+ 7 = Infa_Command_UpgradeChinaRedguardCaptureBuilding
+ 12 = Command_UpgradeEMPMines
+ 13 = Command_SetRallyPoint
+ 14 = Command_Sell
+End
+
+; ==== Missing orders ==============================================================================
+
+; The ECM Tank has no Attack Move and the Troop Crawlers no Guard, where every other China combat
+; vehicle has both.
+
+CommandSet ChinaVehicleECMTankCommandSet
+ 1 = Command_ChinaTankECMDisableVehicle
+ 11 = Command_AttackMove
+ 13 = Command_Guard
+ 14 = Command_Stop
+End
+
+CommandSet Tank_ChinaVehicleECMTankCommandSet
+ 1 = Command_ChinaTankECMDisableVehicle
+ 11 = Command_AttackMove
+ 13 = Command_Guard
+ 14 = Command_Stop
+End
+
+CommandSet ChinaTroopCrawlerCommandSet
+ 1 = Command_TransportExit
+ 2 = Command_TransportExit
+ 3 = Command_TransportExit
+ 4 = Command_TransportExit
+ 5 = Command_TransportExit
+ 6 = Command_TransportExit
+ 7 = Command_TransportExit
+ 8 = Command_TransportExit
+ 9 = Command_EmptyCrawler
+ 11 = Command_AttackMove
+ 13 = Command_Guard
+ 14 = Command_Stop
+End
+
+CommandSet Infa_ChinaTroopCrawlerCommandSet
+ 1 = Command_TransportExit
+ 2 = Command_TransportExit
+ 3 = Command_TransportExit
+ 4 = Command_TransportExit
+ 5 = Command_TransportExit
+ 6 = Command_TransportExit
+ 7 = Command_TransportExit
+ 8 = Command_TransportExit
+ 9 = Command_EmptyCrawler
+ 11 = Command_AttackMove
+ 13 = Command_Guard
+ 14 = Command_Stop
+End
diff --git a/GeneralsMD/Code/Data/INI/FixesReforged.ini b/GeneralsMD/Code/Data/INI/FixesReforged.ini
index d3c5d03c5..32dbe705a 100644
--- a/GeneralsMD/Code/Data/INI/FixesReforged.ini
+++ b/GeneralsMD/Code/Data/INI/FixesReforged.ini
@@ -2112,4 +2112,175 @@ End
Object Slth_GLAScudStorm
UpgradeCameo2 = Upgrade_GLAAnthraxBeta
+ WeaponSet
+ Conditions = None
+ Weapon = SECONDARY ScudStormWeapon
+ AutoChooseSources = SECONDARY NONE
+ End
+End
+
+; ==== Scud Storm exploit ==========================================================================
+
+; Every storm carried its missiles in PRIMARY, and a storm could be made to fire them before its
+; timer was up. The weapon moves to SECONDARY on all seven storms that share
+; SUPERWEAPON_ScudStorm, and ObjectCreationListReforged.ini points the power at that slot.
+
+Object GLAScudStorm
+ WeaponSet
+ Conditions = None
+ Weapon = SECONDARY ScudStormWeapon
+ AutoChooseSources = SECONDARY NONE
+ End
+End
+
+Object Chem_GLAScudStorm
+ WeaponSet
+ Conditions = None
+ Weapon = SECONDARY Chem_ScudStormWeapon
+ AutoChooseSources = SECONDARY NONE
+ End
+End
+
+Object Demo_GLAScudStorm
+ WeaponSet
+ Conditions = None
+ Weapon = SECONDARY Demo_ScudStormWeapon
+ AutoChooseSources = SECONDARY NONE
+ End
+End
+
+Object GC_Chem_GLAScudStorm
+ WeaponSet
+ Conditions = None
+ Weapon = SECONDARY GC_Chem_ScudStormWeapon
+ AutoChooseSources = SECONDARY NONE
+ End
+End
+
+Object GC_Slth_GLAScudStorm
+ WeaponSet
+ Conditions = None
+ Weapon = SECONDARY ScudStormWeapon
+ AutoChooseSources = SECONDARY NONE
+ End
+End
+
+Object Boss_ScudStorm
+ WeaponSet
+ Conditions = None
+ Weapon = SECONDARY ScudStormWeapon
+ AutoChooseSources = SECONDARY NONE
+ End
+End
+
+; ==== Rangers of the right general ================================================================
+
+; Paradrop and the Particle Uplink's rubble gave the three American generals the plain USA
+; Ranger. They now use the per-general lists in ObjectCreationListReforged.ini.
+
+Object AirF_AmericaCommandCenter
+ ReplaceModule ModuleTag_22
+ Behavior = OCLSpecialPower ModuleTag_22_Fix
+ SpecialPowerTemplate = SuperweaponParadropAmerica
+ UpgradeOCL = SCIENCE_Paradrop3 AirF_SUPERWEAPON_Paradrop3
+ UpgradeOCL = SCIENCE_Paradrop2 AirF_SUPERWEAPON_Paradrop2
+ OCL = AirF_SUPERWEAPON_Paradrop1
+ CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE
+ OCLAdjustPositionToPassable = Yes
+ End
+ End
+End
+
+Object Lazr_AmericaCommandCenter
+ ReplaceModule ModuleTag_22
+ Behavior = OCLSpecialPower ModuleTag_22_Fix
+ SpecialPowerTemplate = SuperweaponParadropAmerica
+ UpgradeOCL = SCIENCE_Paradrop3 Lazr_SUPERWEAPON_Paradrop3
+ UpgradeOCL = SCIENCE_Paradrop2 Lazr_SUPERWEAPON_Paradrop2
+ OCL = Lazr_SUPERWEAPON_Paradrop1
+ CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE
+ OCLAdjustPositionToPassable = Yes
+ End
+ End
+End
+
+Object SupW_AmericaCommandCenter
+ ReplaceModule ModuleTag_22
+ Behavior = OCLSpecialPower ModuleTag_22_Fix
+ SpecialPowerTemplate = SuperweaponParadropAmerica
+ UpgradeOCL = SCIENCE_Paradrop3 SupW_SUPERWEAPON_Paradrop3
+ UpgradeOCL = SCIENCE_Paradrop2 SupW_SUPERWEAPON_Paradrop2
+ OCL = SupW_SUPERWEAPON_Paradrop1
+ CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE
+ OCLAdjustPositionToPassable = Yes
+ End
+ End
+End
+
+Object AirF_AmericaParticleCannonUplink
+ ReplaceModule ModuleTag_18
+ Behavior = SlowDeathBehavior ModuleTag_18_Fix
+ ExemptStatus = UNDER_CONSTRUCTION
+ DestructionDelay = 2000
+ FX = INITIAL FX_ParticleUplinkDeathInitial
+ OCL = INITIAL OCL_SDILinkLasers
+ FX = FINAL FX_StructureMediumDeath
+ OCL = FINAL AirF_OCL_ParticleUplinkDeathFinal
+ End
+ End
+End
+
+Object Lazr_AmericaParticleCannonUplink
+ ReplaceModule ModuleTag_18
+ Behavior = SlowDeathBehavior ModuleTag_18_Fix
+ ExemptStatus = UNDER_CONSTRUCTION
+ DestructionDelay = 2000
+ FX = INITIAL FX_ParticleUplinkDeathInitial
+ OCL = INITIAL OCL_SDILinkLasers
+ FX = FINAL FX_StructureMediumDeath
+ OCL = FINAL Lazr_OCL_ParticleUplinkDeathFinal
+ End
+ End
+End
+
+Object SupW_AmericaParticleCannonUplink
+ ReplaceModule ModuleTag_18
+ Behavior = SlowDeathBehavior ModuleTag_18_Fix
+ ExemptStatus = UNDER_CONSTRUCTION
+ DestructionDelay = 2000
+ FX = INITIAL FX_ParticleUplinkDeathInitial
+ OCL = INITIAL OCL_SDILinkLasers
+ FX = FINAL FX_StructureMediumDeath
+ OCL = FINAL SupW_OCL_ParticleUplinkDeathFinal
+ End
+ End
+End
+
+; ==== Alpha Aurora bomb ===========================================================================
+
+; The fuel-air bomb died 15 above the ground or above any roof it passed, and a 12 radius let it
+; hit buildings early, so the fuel-air blast went off in the air over the target instead of on it.
+; Its drag was also sixteen times the plain Aurora bomb's, and it hung for a frame or two before
+; landing. The blast now comes from the impact, as the plain bomb's does. The weapon's 400 damage
+; was never dealt, since a bomb killed in the air does not detonate, and stays out.
+
+Weapon SupW_AuroraFuelBombWeapon
+ PrimaryDamage = 0.0
+ ProjectileDetonationOCL = SupW_OCL_FuelAirBomb
+ ProjectileDetonationFX = AirF_FX_AuroraBombExplode
+End
+
+Object SupW_AuroraFuelAirBomb
+ RemoveModule ModuleTag_03
+ RemoveModule ModuleTag_04
+ RemoveModule ModuleTag_07
+ ReplaceModule ModuleTag_05
+ Behavior = PhysicsBehavior ModuleTag_05_Fix
+ Mass = 75.0
+ AerodynamicFriction = 2
+ ForwardFriction = 2
+ CenterOfMassOffset = 2
+ End
+ End
+ GeometryMajorRadius = 2.0
End
diff --git a/GeneralsMD/Code/Data/INI/ObjectCreationListReforged.ini b/GeneralsMD/Code/Data/INI/ObjectCreationListReforged.ini
new file mode 100644
index 000000000..127f04d54
--- /dev/null
+++ b/GeneralsMD/Code/Data/INI/ObjectCreationListReforged.ini
@@ -0,0 +1,671 @@
+; Object creation lists EA left out or got wrong. GameEngine::init loads this right after
+; ObjectCreationList.ini with INI_LOAD_OVERWRITE, so a list named here is cleared and replaced
+; whole and a new name is added. It lands in the multiplayer INI CRC.
+
+; ==== Scud Storm ==================================================================================
+
+; The storms carried their missiles in the PRIMARY slot, and a storm could be made to launch all
+; nine before its timer was up. The storms' weapon moved to SECONDARY in FixesReforged.ini, and
+; the power fires that slot.
+
+ObjectCreationList SUPERWEAPON_ScudStorm
+ Attack
+ WeaponSlot = SECONDARY
+ NumberOfShots = 9
+ DeliveryDecalRadius = 200 ; align with SpecialPower.ini's RadiusCursorRadius
+ DeliveryDecal
+ Texture = SCCScudStorm_GLA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:33 G:255 B:67 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+End
+
+; ==== Saboteur on a Combat Bike ===================================================================
+
+; The Stealth Combat Bike throws its Saboteur rider with this list, and EA never wrote it, so the
+; rider vanished. The body is the Saboteur's, thrown with the Worker's falls.
+
+ObjectCreationList OCL_SaboteurFlyingOffBikeDeathStart
+ ApplyRandomForce
+ MinForceMagnitude = 60
+ MaxForceMagnitude = 100
+ MinForcePitch = 70
+ MaxForcePitch = 90
+ SpinRate = 120
+ End
+ CreateDebris
+ ModelNames = UISabotr_SKN
+ AnimationSet = UIWRKR_SKL.UIWRKR_ADTE1 UIWRKR_SKL.UIWRKR_ADTE2 UIWRKR_SKL.UIWRKR_ADTE3
+ FXFinal = FX_TechnicalGunnerHitsGround
+ OkToChangeModelColor = Yes
+ IgnorePrimaryObstacle = Yes
+ Mass = 5.0
+ Disposition = RANDOM_FORCE INHERIT_VELOCITY
+ OrientInForceDirection = Yes
+ ExtraBounciness = -1.0
+ MinForceMagnitude = 12
+ MaxForceMagnitude = 15
+ MinForcePitch = 70
+ MaxForcePitch = 80
+ End
+End
+
+; ==== Paradrop ====================================================================================
+
+; The three American generals' Command Centers dropped the plain USA Ranger, not their own, so the
+; drop could not be double-click selected with the Rangers from their barracks and lacked the
+; general's own traits. One copy of each level per general, with the general's Ranger.
+
+ObjectCreationList AirF_SUPERWEAPON_Paradrop1
+ DeliverPayload
+ Transport = AmericaJetCargoPlane
+ StartAtPreferredHeight = Yes
+ StartAtMaxSpeed = Yes
+ MaxAttempts = 4
+ DropOffset = X:0 Y:0 Z:-10
+ DropDelay = 150
+ ParachuteDirectly = Yes
+ PutInContainer = AmericaParachute
+ Payload = AirF_AmericaInfantryRanger 5
+ DeliveryDistance = 0
+ PreOpenDistance = 300
+ DeliveryDecalRadius = 50
+ DeliveryDecal
+ Texture = SCCParadrop_USA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:227 G:229 B:22 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+End
+
+ObjectCreationList AirF_SUPERWEAPON_Paradrop2
+ DeliverPayload
+ Transport = AmericaJetCargoPlane
+ StartAtPreferredHeight = Yes
+ StartAtMaxSpeed = Yes
+ MaxAttempts = 4
+ DropOffset = X:0 Y:0 Z:-10
+ DropDelay = 80
+ ParachuteDirectly = Yes
+ PutInContainer = AmericaParachute
+ Payload = AirF_AmericaInfantryRanger 10
+ DeliveryDistance = 0
+ PreOpenDistance = 300
+ DeliveryDecalRadius = 50
+ DeliveryDecal
+ Texture = SCCParadrop_USA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:227 G:229 B:22 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+End
+
+ObjectCreationList AirF_SUPERWEAPON_Paradrop3
+ DeliverPayload
+ Transport = AmericaJetCargoPlane
+ StartAtPreferredHeight = Yes
+ StartAtMaxSpeed = Yes
+ MaxAttempts = 4
+ DropOffset = X:0 Y:0 Z:-10
+ DropDelay = 80
+ ParachuteDirectly = Yes
+ PutInContainer = AmericaParachute
+ Payload = AirF_AmericaInfantryRanger 10
+ DeliveryDistance = 0
+ PreOpenDistance = 300
+ DeliveryDecalRadius = 50
+ DeliveryDecal
+ Texture = SCCParadrop_USA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:227 G:229 B:22 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+ DeliverPayload
+ Transport = AmericaJetCargoPlane
+ StartAtPreferredHeight = Yes
+ StartAtMaxSpeed = No
+ MaxAttempts = 4
+ DropOffset = X:0 Y:0 Z:-10
+ DropDelay = 80
+ ParachuteDirectly = Yes
+ PutInContainer = AmericaParachute
+ Payload = AirF_AmericaInfantryRanger 10
+ DeliveryDistance = 0
+ PreOpenDistance = 300
+ DeliveryDecalRadius = 50
+ DeliveryDecal
+ Texture = SCCParadrop_USA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:227 G:229 B:22 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+End
+
+ObjectCreationList Lazr_SUPERWEAPON_Paradrop1
+ DeliverPayload
+ Transport = AmericaJetCargoPlane
+ StartAtPreferredHeight = Yes
+ StartAtMaxSpeed = Yes
+ MaxAttempts = 4
+ DropOffset = X:0 Y:0 Z:-10
+ DropDelay = 150
+ ParachuteDirectly = Yes
+ PutInContainer = AmericaParachute
+ Payload = Lazr_AmericaInfantryRanger 5
+ DeliveryDistance = 0
+ PreOpenDistance = 300
+ DeliveryDecalRadius = 50
+ DeliveryDecal
+ Texture = SCCParadrop_USA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:227 G:229 B:22 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+End
+
+ObjectCreationList Lazr_SUPERWEAPON_Paradrop2
+ DeliverPayload
+ Transport = AmericaJetCargoPlane
+ StartAtPreferredHeight = Yes
+ StartAtMaxSpeed = Yes
+ MaxAttempts = 4
+ DropOffset = X:0 Y:0 Z:-10
+ DropDelay = 80
+ ParachuteDirectly = Yes
+ PutInContainer = AmericaParachute
+ Payload = Lazr_AmericaInfantryRanger 10
+ DeliveryDistance = 0
+ PreOpenDistance = 300
+ DeliveryDecalRadius = 50
+ DeliveryDecal
+ Texture = SCCParadrop_USA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:227 G:229 B:22 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+End
+
+ObjectCreationList Lazr_SUPERWEAPON_Paradrop3
+ DeliverPayload
+ Transport = AmericaJetCargoPlane
+ StartAtPreferredHeight = Yes
+ StartAtMaxSpeed = Yes
+ MaxAttempts = 4
+ DropOffset = X:0 Y:0 Z:-10
+ DropDelay = 80
+ ParachuteDirectly = Yes
+ PutInContainer = AmericaParachute
+ Payload = Lazr_AmericaInfantryRanger 10
+ DeliveryDistance = 0
+ PreOpenDistance = 300
+ DeliveryDecalRadius = 50
+ DeliveryDecal
+ Texture = SCCParadrop_USA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:227 G:229 B:22 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+ DeliverPayload
+ Transport = AmericaJetCargoPlane
+ StartAtPreferredHeight = Yes
+ StartAtMaxSpeed = No
+ MaxAttempts = 4
+ DropOffset = X:0 Y:0 Z:-10
+ DropDelay = 80
+ ParachuteDirectly = Yes
+ PutInContainer = AmericaParachute
+ Payload = Lazr_AmericaInfantryRanger 10
+ DeliveryDistance = 0
+ PreOpenDistance = 300
+ DeliveryDecalRadius = 50
+ DeliveryDecal
+ Texture = SCCParadrop_USA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:227 G:229 B:22 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+End
+
+ObjectCreationList SupW_SUPERWEAPON_Paradrop1
+ DeliverPayload
+ Transport = AmericaJetCargoPlane
+ StartAtPreferredHeight = Yes
+ StartAtMaxSpeed = Yes
+ MaxAttempts = 4
+ DropOffset = X:0 Y:0 Z:-10
+ DropDelay = 150
+ ParachuteDirectly = Yes
+ PutInContainer = AmericaParachute
+ Payload = SupW_AmericaInfantryRanger 5
+ DeliveryDistance = 0
+ PreOpenDistance = 300
+ DeliveryDecalRadius = 50
+ DeliveryDecal
+ Texture = SCCParadrop_USA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:227 G:229 B:22 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+End
+
+ObjectCreationList SupW_SUPERWEAPON_Paradrop2
+ DeliverPayload
+ Transport = AmericaJetCargoPlane
+ StartAtPreferredHeight = Yes
+ StartAtMaxSpeed = Yes
+ MaxAttempts = 4
+ DropOffset = X:0 Y:0 Z:-10
+ DropDelay = 80
+ ParachuteDirectly = Yes
+ PutInContainer = AmericaParachute
+ Payload = SupW_AmericaInfantryRanger 10
+ DeliveryDistance = 0
+ PreOpenDistance = 300
+ DeliveryDecalRadius = 50
+ DeliveryDecal
+ Texture = SCCParadrop_USA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:227 G:229 B:22 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+End
+
+ObjectCreationList SupW_SUPERWEAPON_Paradrop3
+ DeliverPayload
+ Transport = AmericaJetCargoPlane
+ StartAtPreferredHeight = Yes
+ StartAtMaxSpeed = Yes
+ MaxAttempts = 4
+ DropOffset = X:0 Y:0 Z:-10
+ DropDelay = 80
+ ParachuteDirectly = Yes
+ PutInContainer = AmericaParachute
+ Payload = SupW_AmericaInfantryRanger 10
+ DeliveryDistance = 0
+ PreOpenDistance = 300
+ DeliveryDecalRadius = 50
+ DeliveryDecal
+ Texture = SCCParadrop_USA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:227 G:229 B:22 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+ DeliverPayload
+ Transport = AmericaJetCargoPlane
+ StartAtPreferredHeight = Yes
+ StartAtMaxSpeed = No
+ MaxAttempts = 4
+ DropOffset = X:0 Y:0 Z:-10
+ DropDelay = 80
+ ParachuteDirectly = Yes
+ PutInContainer = AmericaParachute
+ Payload = SupW_AmericaInfantryRanger 10
+ DeliveryDistance = 0
+ PreOpenDistance = 300
+ DeliveryDecalRadius = 50
+ DeliveryDecal
+ Texture = SCCParadrop_USA
+ Style = SHADOW_ALPHA_DECAL
+ OpacityMin = 25%
+ OpacityMax = 50%
+ OpacityThrobTime = 500
+ Color = R:227 G:229 B:22 A:255
+ OnlyVisibleToOwningPlayer = Yes
+ End
+ End
+End
+
+; ==== Particle Uplink rubble ======================================================================
+
+; A destroyed Particle Cannon Uplink lets six plain USA Rangers out of the rubble, where every
+; other building of these generals lets out the general's own. One copy per general, the same list
+; with the general's Ranger.
+
+ObjectCreationList AirF_OCL_ParticleUplinkDeathFinal
+ CreateObject
+ ObjectNames = AirF_AmericaInfantryRanger
+ IgnorePrimaryObstacle = Yes
+ Disposition = SEND_IT_OUT
+ DispositionIntensity = 4
+ Count = 6
+ RequiresLivePlayer = Yes
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:15 Y:15 Z:5
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:-15 Y:-15 Z:5
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:-15 Y:15 Z:5
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:15 Y:-15 Z:5
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:15 Y:15 Z:15
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:-15 Y:-15 Z:15
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:-15 Y:15 Z:15
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:15 Y:-15 Z:15
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d11 ABPwrPlant_d12 ABPwrPlant_d13 ABPwrPlant_d14 ABPwrPlant_d15 ABPwrPlant_d16 ABPwrPlant_d17 ABPwrPlant_d18 ABPwrPlant_d19 ABPwrPlant_d20
+ Offset = X:0 Y:0 Z:25
+ Mass = 30.0
+ Count = 10
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d21 ABPwrPlant_d22 ABPwrPlant_d23 ABPwrPlant_d24 ABPwrPlant_d25 ABPwrPlant_d26 ABPwrPlant_d27 ABPwrPlant_d28 ABPwrPlant_d29 ABPwrPlant_d30
+ Offset = X:0 Y:0 Z:40
+ Mass = 30.0
+ Count = 5
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+End
+
+ObjectCreationList Lazr_OCL_ParticleUplinkDeathFinal
+ CreateObject
+ ObjectNames = Lazr_AmericaInfantryRanger
+ IgnorePrimaryObstacle = Yes
+ Disposition = SEND_IT_OUT
+ DispositionIntensity = 4
+ Count = 6
+ RequiresLivePlayer = Yes
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:15 Y:15 Z:5
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:-15 Y:-15 Z:5
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:-15 Y:15 Z:5
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:15 Y:-15 Z:5
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:15 Y:15 Z:15
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:-15 Y:-15 Z:15
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:-15 Y:15 Z:15
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:15 Y:-15 Z:15
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d11 ABPwrPlant_d12 ABPwrPlant_d13 ABPwrPlant_d14 ABPwrPlant_d15 ABPwrPlant_d16 ABPwrPlant_d17 ABPwrPlant_d18 ABPwrPlant_d19 ABPwrPlant_d20
+ Offset = X:0 Y:0 Z:25
+ Mass = 30.0
+ Count = 10
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d21 ABPwrPlant_d22 ABPwrPlant_d23 ABPwrPlant_d24 ABPwrPlant_d25 ABPwrPlant_d26 ABPwrPlant_d27 ABPwrPlant_d28 ABPwrPlant_d29 ABPwrPlant_d30
+ Offset = X:0 Y:0 Z:40
+ Mass = 30.0
+ Count = 5
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+End
+
+ObjectCreationList SupW_OCL_ParticleUplinkDeathFinal
+ CreateObject
+ ObjectNames = SupW_AmericaInfantryRanger
+ IgnorePrimaryObstacle = Yes
+ Disposition = SEND_IT_OUT
+ DispositionIntensity = 4
+ Count = 6
+ RequiresLivePlayer = Yes
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:15 Y:15 Z:5
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:-15 Y:-15 Z:5
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:-15 Y:15 Z:5
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:15 Y:-15 Z:5
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:15 Y:15 Z:15
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:-15 Y:-15 Z:15
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:-15 Y:15 Z:15
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d01 ABPwrPlant_d02 ABPwrPlant_d03 ABPwrPlant_d04 ABPwrPlant_d05 ABPwrPlant_d06 ABPwrPlant_d07 ABPwrPlant_d08 ABPwrPlant_d09 ABPwrPlant_d10
+ Offset = X:15 Y:-15 Z:15
+ Mass = 30.0
+ Count = 3
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d11 ABPwrPlant_d12 ABPwrPlant_d13 ABPwrPlant_d14 ABPwrPlant_d15 ABPwrPlant_d16 ABPwrPlant_d17 ABPwrPlant_d18 ABPwrPlant_d19 ABPwrPlant_d20
+ Offset = X:0 Y:0 Z:25
+ Mass = 30.0
+ Count = 10
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+ CreateDebris
+ ModelNames = ABPwrPlant_d21 ABPwrPlant_d22 ABPwrPlant_d23 ABPwrPlant_d24 ABPwrPlant_d25 ABPwrPlant_d26 ABPwrPlant_d27 ABPwrPlant_d28 ABPwrPlant_d29 ABPwrPlant_d30
+ Offset = X:0 Y:0 Z:40
+ Mass = 30.0
+ Count = 5
+ Disposition = SEND_IT_FLYING
+ DispositionIntensity = 3
+ BounceSound = BuildingDebris
+ End
+End
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h
index 6156134b0..dea6993a1 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h
@@ -457,6 +457,7 @@ public:
CommandSet* friend_getNext() { return m_next; }
const FieldParse* friend_getFieldParse() const { return m_commandSetFieldParseTable; }
void friend_addToList(CommandSet** listHead);
+ void friend_clearCommands();
private:
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp
index e86c0b5b6..3a0f14d72 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp
@@ -1067,6 +1067,9 @@ void GameEngine::init( int argc, char *argv[] )
ini.load( AsciiString( "Data\\INI\\FXListReforged.ini" ), INI_LOAD_OVERWRITE, &xferCRC );
initSubsystem(TheWeaponStore,"TheWeaponStore", MSGNEW("GameEngineSubsystem") WeaponStore(), &xferCRC, NULL, "Data\\INI\\Weapon.ini");
initSubsystem(TheObjectCreationListStore,"TheObjectCreationListStore", MSGNEW("GameEngineSubsystem") ObjectCreationListStore(), &xferCRC, "Data\\INI\\Default\\ObjectCreationList.ini", "Data\\INI\\ObjectCreationList.ini");
+ /* Lists EA left out or got wrong, before any object names one: a list parsed again is cleared
+ and replaced whole, and a new name is simply added. */
+ ini.load( AsciiString( "Data\\INI\\ObjectCreationListReforged.ini" ), INI_LOAD_OVERWRITE, &xferCRC );
initSubsystem(TheLocomotorStore,"TheLocomotorStore", MSGNEW("GameEngineSubsystem") LocomotorStore(), &xferCRC, NULL, "Data\\INI\\Locomotor.ini");
initSubsystem(TheSpecialPowerStore,"TheSpecialPowerStore", MSGNEW("GameEngineSubsystem") SpecialPowerStore(), &xferCRC, "Data\\INI\\Default\\SpecialPower.ini", "Data\\INI\\SpecialPower.ini");
initSubsystem(TheDamageFXStore,"TheDamageFXStore", MSGNEW("GameEngineSubsystem") DamageFXStore(), &xferCRC, NULL, "Data\\INI\\DamageFX.ini");
@@ -1171,6 +1174,7 @@ void GameEngine::init( int argc, char *argv[] )
checksumFileContents( xferCRC, "Data\\INI\\Default\\CommandButton.ini" );
checksumFileContents( xferCRC, "Data\\INI\\CommandButton.ini" );
checksumFileContents( xferCRC, "Data\\INI\\CommandSet.ini" );
+ checksumFileContents( xferCRC, "Data\\INI\\CommandSetReforged.ini" );
checksumModels( xferCRC );
xferCRC.close();
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/INI/INICommandButton.cpp b/GeneralsMD/Code/GameEngine/Source/Common/INI/INICommandButton.cpp
index 681e95e66..cf2117573 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/INI/INICommandButton.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/INI/INICommandButton.cpp
@@ -62,6 +62,10 @@ void ControlBar::parseCommandButtonDefinition( INI *ini )
button->markAsOverride();
}
} // end if
+ else if( ini->getLoadType() == INI_LOAD_MULTIFILE )
+ {
+ // a patch file's button edits EA's in place and names only what changes
+ }
else if( ini->getLoadType() != INI_LOAD_CREATE_OVERRIDES )
{
DEBUG_CRASH(( "[LINE: %d in '%s'] Duplicate commandbutton %s found!", ini->getLineNum(), ini->getFilename().str(), name.str() ));
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
index c68cbcc4e..b76a01db4 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
@@ -1214,9 +1214,16 @@ void CommandSet::parseCommandButton( INI* ini, void *instance, void *store, cons
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
-CommandSet::CommandSet(const AsciiString& name) :
+CommandSet::CommandSet(const AsciiString& name) :
m_name(name),
m_next(NULL)
+{
+ friend_clearCommands();
+}
+
+//-------------------------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------------------------
+void CommandSet::friend_clearCommands()
{
for( Int i = 0; i < MAX_COMMANDS_PER_SET; i++ )
m_command[ i ] = NULL;
@@ -2620,6 +2627,9 @@ void ControlBar::init( void )
// load the command sets
ini.load( AsciiString( "Data\\INI\\CommandSet.ini" ), INI_LOAD_OVERWRITE, NULL );
+ // the fork's corrections to EA's buttons and sets, edited in place; GameEngine::init checksums it
+ ini.load( AsciiString( "Data\\INI\\CommandSetReforged.ini" ), INI_LOAD_MULTIFILE, NULL );
+
// post process step after loading the command buttons and command sets
postProcessCommands();
@@ -3799,6 +3809,11 @@ CommandButton *ControlBar::newCommandButtonOverride( CommandButton *buttonToOver
commandSet->markAsOverride();
}
} // end if
+ else if( ini->getLoadType() == INI_LOAD_MULTIFILE )
+ {
+ // a patch file's set replaces the set whole, in place, so every pointer to it stays good
+ commandSet->friend_clearCommands();
+ }
else if( ini->getLoadType() != INI_LOAD_CREATE_OVERRIDES )
{
//Holy crap, this sucks to debug!!!