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): build toxin and stealth technicals again
Olcay Seygan22ce63b8f6af
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 6dfb60f86..227b80f08 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -937,6 +937,7 @@ found and fixed, EA's own, not port damage.**- The Aurora's bomb goes off like the strike it is. It hits for 400 where a Scud Launcher's missile hits for 300, and buildings take one and a half to three times that, yet it blew up with one carpet bomb's puff, smaller than the missile's. The blast is now two to two and a half times the Scud's across: arms of fire flung twice as far, four big napalm fireballs, a shock ring 210 wide where the carpet bomb's stops near 90, a rolling dust ring, fourteen clods of dirt and a column of smoke, with a hard shake, a wide scorch and a bend in the picture on Direct3D 11. It is over in about two seconds. Its damage is unchanged. This is the Aurora of every American general; the Alpha Aurora keeps its fuel-air blast.+- The Toxin and Stealth Generals get their Technicals again. Since v3.3.0 the Arms Dealer took the 500, ran the build timer and let nothing out, and the queue moved on to the next unit. EA has both generals roll the plain GLA Technical, and the code that hands Turkiye its own copies of American units mistook the general's Technical button for a copy of that truck, so it built the button instead of the truck. In a test queue of six, none came out before and all six do now. The plain GLA and the Demolition General were never hit. Replays recorded with a Toxin or Stealth Technical before this change play out differently.- The Dragon Tank's Fire Wall burns where you put it again. An earlier change in this build handed each patch of the wall the full speed of the flame that lit it, so the fire slid off across the map: in one test the patches came to rest anywhere from 155 to 1,050 away from the tank, 800 on average, setting fire to whatever stood in the way. They now stop 120 to 180 from the tank, a little past where the flames land, as they did in the original game. Napalm bombs and the wrecks of shot-down planes and drones keep their original drift too. Replays recorded before this change play out differently.- A bunker buster shot down on the way in no longer clears out the building it was aimed at. It emptied the bunker from wherever it happened to be destroyed - a Point Defence Laser did not save you, it just moved the explosion.- A Battle Bus in its wrecked form takes attack orders again. Every order you gave it was dropped on the way, because the crew inside are 'held' and held units were skipped.diff --git a/GeneralsMD/Code/GameEngine/Source/Common/Thing/ThingFactory.cpp b/GeneralsMD/Code/GameEngine/Source/Common/Thing/ThingFactory.cppindex 8135937b6..a0e57e5c0 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/Thing/ThingFactory.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/Thing/ThingFactory.cpp@@ -391,10 +391,14 @@ const ThingTemplate *ThingFactory::findSideReskin( const ThingTemplate *tmplate,if (it != m_sideReskins.end())return it->second;+ // A template with build variations is only a build button: isEquivalentTo counts each variation+ // as its equal, and EA's Toxin and Stealth Technicals roll the plain GLA chassis, so without the+ // skip a Toxin player's chassis was swapped for Chem_GLAVehicleTechnical itself, a unit with no+ // weapon or locomotor: the Arms Dealer charged for a Technical and nothing drove out.const ThingTemplate *found = NULL;for (const ThingTemplate *t = m_firstTemplate; t != NULL && found == NULL; t = t->friend_getNextTemplate()){- if (t->getDefaultOwningSide() == side && t->isEquivalentTo( tmplate ))+ if (t->getDefaultOwningSide() == side && t->getBuildVariations().empty() && t->isEquivalentTo( tmplate ))found = (const ThingTemplate *)t->getFinalOverride();}m_sideReskins[ key ] = found;