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.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
fix(gameengine): overlord lets go of its own bunker when it dies
Olcay Seygan99ca7bfcec29
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 53a6f1b79..a4706cb9d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1428,6 +1428,7 @@ A third pass went through the generals' powers, promotions and unit abilities.- The water stops moving while the game is paused.- A stealth unit that fires in plain sight no longer vanishes for a few frames before it shows up again.- Revealing the fog at a waypoint in a mission reveals it for the right players.+- An Overlord whose Battle Bunker is destroyed on its own, by a script or with the team or player it belongs to, no longer crashes the game the next time the Overlord moves or the match ends. The Overlord kept the dead bunker on its back.- Replays recorded before this version that have burning infantry, missiles, captured vehicles, cancelled production, guard mode, tunnels or power plants in them play back differently.## The buildings nobody repairs, repair themselvesdiff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OverlordContain.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OverlordContain.cppindex 648a5ca8b..88b9d78e5 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OverlordContain.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OverlordContain.cpp@@ -312,6 +312,17 @@ void OverlordContain::addToContain( Object *obj )//-------------------------------------------------------------------------------------------------void OverlordContain::removeFromContain( Object *obj, Bool exposeStealthUnits ){+ // My own rider leaves my list, never the list it carries. A bunker destroyed on its own (a+ // team or player killed, a script) says goodbye through here from Object::onDestroy; redirected,+ // the bunker was asked to let go of itself, refused, and stayed on my list after it was freed.+ // The next redeployOccupants or the teardown at reset then touched the freed bunker.+ if( m_containListSize > 0 && obj == m_containList.front() )+ {+ deactivateRedirectedContain();+ TransportContain::removeFromContain( obj, exposeStealthUnits );+ return;+ }+// Do you mean me the Overlord, or my behavior of passing stuff on to my passengers?if( getRedirectedContain() == NULL ){