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(gameclient): keep a master particle system alive for its finite slave
Olcay Seygandd28e96d545a
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex b05ab2b47..214d2e22b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -467,6 +467,7 @@ found and fixed — EA's own, not port damage.**- "Your base is under attack" fires for the attack you are actually under. The check that decides whether a warning is a repeat of one you just heard was computing something that was not a distance at all, so an attack on the far side of the map could silence the warning for one at your front door, and two hits on the same building could each get their own.- Scorch marks and tank tracks keep their colour on a brightly lit map. The shade was worked out from the map's own lighting with nothing holding it to a byte, and the red channel sits sixteen bits up, so anything over full brightness spilled into the transparency and the mark came out the wrong colour at the wrong opacity.- Two tanks shelling the same spot no longer wipe a scorch mark off the far side of the map. With the ground already carrying its full quota of marks, a repeat crater threw the oldest one away and then declined to add itself, so a mark vanished and nothing replaced it.+- Embers and sparks that trail an effect finish their run. When the effect that owned them ended first, they lost track of where it was, were drawn at the corner of the map and died early.- Heat haze wobbles in both directions. The vertical part of the distortion was rolled, clipped against the top and bottom of the screen, and then never used - every shimmer pulled the picture along one diagonal.- One tree in ten stood dead still in the breeze. The number that picks which way a tree sways was drawn from a range one short at the bottom, and the bottom of that range is the slot meaning "no sway at all".- Police car lights flash at their own speed instead of your monitor's. On a fast screen with the frame cap off they were cycling five and a half times too quickly.diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/System/ParticleSys.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/System/ParticleSys.cppindex 99c631aa4..9f4c8422b 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/System/ParticleSys.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/System/ParticleSys.cpp@@ -2426,9 +2426,11 @@ Bool ParticleSystem::finishUpdate( const ParticleShadowBlob *blob )// If we have been "destroyed", wait for all of our particles to die off,// then destroy ourselves (return false).//+ // A finite slave outlives its master by its own lifetime. Going away first nulls the slave's+ // master, and a slave with no master emits at the world origin and is cut short, so the master+ // stays in the list, destroyed and drawing nothing, until the slave is done.if (m_isDestroyed && !m_systemParticlesHead)- return false;-+ return m_slaveSystem != NULL && !m_slaveSystem->isSystemForever();// monitor particle system lifetimeif (m_isForever == false)@@ -2443,7 +2445,11 @@ Bool ParticleSystem::finishUpdate( const ParticleShadowBlob *blob )// check if time is upif (m_systemLifetimeLeft == 0)- return false;+ {+ if (m_slaveSystem == NULL || m_slaveSystem->isSystemForever())+ return false;+ m_isDestroyed = true;+ }}return true;