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(w3ddevice): -volsmoke tank soot lobes bigger, darker, held 1.8 s
Olcay Seygan4bb274bdd8b0
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex edf64bdde..27f593cc9 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -112,7 +112,7 @@ found and fixed, EA's own, not port damage.**## Smoke simulation- Options > Effects has a Smoke Simulation box. On Low or High a tank's cook-off, a shell's dirt fountain and a nuclear mushroom are a moving body of air rather than flat sprites: the smoke rolls, rises with the heat, settles as dust and parts round the buildings in its way. Off is the default, and Off draws exactly the picture the game drew before. The box works mid-match, the next frame after you press Accept, on the default renderer; the Direct3D 9 renderer and the Classic graphics setting hide it.-- A tank goes up the way the footage of a real one does. Orange flame and black smoke burst out low along its own hull, long under an Overlord and short under a Crusader, and roll along the ground off both ends over a skirt of pale dust. A ragged fan of blown-out white fire with orange edges rises straight off the hull and opens wider as it climbs, tallest in the middle, on High about twice as tall as the fire is wide and on Low a shorter fan of the same shape, and in about a second it has cooled through orange to grey-brown smoke. Near-black soot banks up at both ends of the hull while the fan burns. The wreck's black column is gone about eight seconds after the death, as quickly as the game's own smoke with the setting Off; it used to stand for half a minute, which in a fast game left a field of black pillars. A Crusader's fan no longer stands on a thin stem or grows horns at its edges. The glowing ball and the rays round it are gone, and so is the ring on the ground. Shells that hit a tank's armour no longer throw a fountain of dirt off it. The scrap flying off a dead tank keeps its own sparks but no longer drags thick grey arcs across the fire, and a gun's muzzle smoke is the soft grey puff it always was, where it had turned into a flat tan disc on the ground.+- A tank goes up the way the footage of a real one does. Orange flame and black smoke burst out low along its own hull, long under an Overlord and short under a Crusader, and roll along the ground off both ends over a skirt of pale dust. A ragged fan of blown-out white fire with orange edges rises straight off the hull and opens wider as it climbs, tallest in the middle, on High about twice as tall as the fire is wide and on Low a shorter fan of the same shape, and in about a second it has cooled through orange to grey-brown smoke. Near-black soot banks up low along the hull, licked red by the fire under it, and swells for nearly two seconds after the flash. The wreck's black column is gone about eight seconds after the death, as quickly as the game's own smoke with the setting Off; it used to stand for half a minute, which in a fast game left a field of black pillars. A Crusader's fan no longer stands on a thin stem or grows horns at its edges. The glowing ball and the rays round it are gone, and so is the ring on the ground. Shells that hit a tank's armour no longer throw a fountain of dirt off it. The scrap flying off a dead tank keeps its own sparks but no longer drags thick grey arcs across the fire, and a gun's muzzle smoke is the soft grey puff it always was, where it had turned into a flat tan disc on the ground.- A nuke builds a mushroom you can read. The flash is light: the ground, the buildings and the missile's own smoke trail go white for a third of a second, where a flat white disc used to cover half the screen for most of a second. From the first frame a lumpy ball of fire sits on the ground, yellow-white inside an orange-red rim, with a thin white dome running out round it, and the orange disc that lay on the ground under it is gone. The ball rises and slows, and by five seconds is an orange cap on a thin grey-brown stem. A white collar rings the stem for a few seconds. The cap cools to cream and lumpy cauliflower, three to four times as wide as the stem, and it stays up for over a minute; the old one was a dark brown disc that had thinned away inside twelve seconds. The dark dust that used to bury the whole base under the cloud is gone, and a low wall of dust runs out along the ground between the buildings instead. The missile's own trail is smoke in the same air now, a thick pale column behind it on the way up from the silo and on the way down, drifting with the wind and spreading as it thins, where it used to stay a column of flat sprites.- Every other smoke goes the same way while it is on: missile and rocket trails, the dust behind a tank, a burning building's column, muzzle smoke. They are fed into one body of air round the camera instead of being drawn as sprites, and a unit moving through it pushes it. A tank's hull shoves the smoke aside and leaves a turning wake, a jet drags a sheet of it down between two wingtip vortices, and a helicopter hovering low flattens a burning column into a dark ring on the ground and lifts a band of dust round itself. A blast's front pushes the smoke already hanging round it outwards. Units you cannot see push nothing, so the smoke never gives away a stealthed tank or an unscouted base.- Missile and rocket trails are thin ribbons of real smoke. A Tomahawk's, a Rocket Buggy's and a Scud Launcher's lay a pale line that breaks into puffs, widens towards its old end, stirs and drifts off with the wind, and is gone about as soon as the game's own trail would be, so a Rocket Buggy salvo no longer leaves a tan haze over the field: a Tomahawk's arc over Heartland Shield is gone about 3.5 s after the launch, where it hung on for 5 to 6 and the game's own lasts about 3. A trail that climbs high, a Scud's arc or the nine columns a Scud Storm puts up, goes into a second, taller body of air over the battlefield, a thousand units high, where it thins just as fast. The trails are lit by the sun like any smoke: the Scud Storm's columns had stood as straight glowing pillars of one width, and at night on Dark Night the trails stood out pale blue as if lit from inside. Before, a fast missile's trail broke into a dotted line of brown blobs, and once a missile climbed past about 200 units over the ground the top of its trail simply vanished.diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/DX11VolumeSmoke.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/DX11VolumeSmoke.cppindex fd59c8356..c8ad49099 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/DX11VolumeSmoke.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/DX11VolumeSmoke.cpp@@ -1582,8 +1582,9 @@ void schedule(const Volume &volume, unsigned slab, float t, DrawConstants *draw)dust[0] = 0.70f; dust[1] = 0.62f; dust[2] = 0.50f; // sunlit, fire-lit dust, warm against the tan ground// The base: orange flame and black soot bursting out low along the whole hull, rolling off// both ends and a little to the sides, held down by the dust in it. The four towards the- // ends burn only a dull red-brown (heat 0.8), so the hot middle sits between dark lobes,- // as in the photo; at 1.25 all along the base read as one bright band.+ // ends burn only a dull red (heat 0.62), so the hot middle sits between dark lobes, as in+ // the photo; at 1.25 all along the base read as one bright band, and at 0.8 the soot laid+ // in them glowed orange (heat is the hottest emitter's) instead of reading dark.if (t < 0.7f) {const float fade = 1 - t / 0.7f;for (unsigned i = 0; i < 6; ++i) {@@ -1591,7 +1592,7 @@ void schedule(const Volume &volume, unsigned slab, float t, DrawConstants *draw)const float across = (unit(810 + i) - 0.5f) * W * 0.7f;const float radius = (std::max)(W * 0.85f, 2.2f) * (0.8f + 0.4f * unit(820 + i));onHull(s * L * 1.15f, across, 0.6f + 0.6f * unit(830 + i), radius, s * (8.0f + 12.0f * unit(840 + i)) * fade,- (across < 0 ? -2.5f : 2.5f) * fade, 1.5f, 20.0f * fade, std::fabs(s) < 0.5f ? 1.25f : 0.8f, 8.0f * fade, 0.35f);+ (across < 0 ? -2.5f : 2.5f) * fade, 1.5f, 20.0f * fade, std::fabs(s) < 0.5f ? 1.25f : 0.62f, 8.0f * fade, 0.35f);}}// The plume, the photo's tallest part: thirteen jets of white-hot fire and dust shot up out@@ -1734,19 +1735,23 @@ void schedule(const Volume &volume, unsigned slab, float t, DrawConstants *draw)// the default 1.6 once the flare is over; about a third of a second of white, as long as// the jets run, and no longer, so several tanks dying at once do not white out the viewsoot[3] = 1.6f + 4.2f * std::exp(-t / 0.22f);- // Dark soot banked on the hull: two thick lobes at each end, just past the jets' roots and- // over the base fire, which edges them red, so the bright core stands between near-black- // lobes as in the photo and the fan's top stays clear of them. Heat 0.3 does not glow at all- // (fireColour starts at 0.5). Heat is the hottest emitter's, so laid inside the jets' roots- // the soot burned as bright as they did; laid round the hull's sides as well (pass 12) the- // lobes closed into a dark ring round the fire from the play camera. Kept low and short (0.5- // s), so a fight's dead tanks do not hang under black clouds.- if (t < 0.5f) {- const float fade = 1 - t / 0.5f;+ // Dark soot banked on the hull: four big lobes lying low along its length, two over each+ // half from the jets' roots out past the end, which the base fire edges red, so the bright+ // core stands between near-black masses as in the photo and the fan's top stays clear of+ // them. They swell for nearly two seconds, well after the flash, and the column takes over. Heat+ // 0.3 does not glow at all (fireColour starts at 0.5). Heat is the hottest emitter's, so laid+ // inside the jets' roots the soot burned as bright as they did; laid round the hull's sides+ // as well (pass 12) the lobes closed into a dark ring round the fire from the play camera;+ // small and gone in half a second (pass 13) they hid behind the fire from the side.+ // 22 a second at most and half as wide again by 1.2 s: at 45 and nearly twice as wide they+ // rolled into one black ball over the wreck from the play camera.+ if (t < 1.8f) {+ const float fade = 1 - t / 1.8f, swell = 1 + 0.5f * (std::min)(t / 1.2f, 1.0f);for (unsigned k = 0; k < 4; ++k) {- const float s = k < 2 ? -1.0f : 1.0f, side = (k & 1) ? 1.0f : -1.0f;- onHull(s * L * (1.0f + 0.15f * unit(980 + k)), side * W * 0.35f, H * (0.45f + 0.25f * unit(984 + k)),- (std::max)(W * 0.7f, 2.2f) * (1 + t), s * 4.0f * fade, side * 1.5f * fade, 1.5f, 40.0f * fade, 0.3f, 2.0f * fade, 0.2f);+ const float s = (k < 2 ? -1.0f : 1.0f) * ((k & 1) ? 1.05f : 0.7f) * (0.95f + 0.1f * unit(980 + k));+ const float across = ((k & 1) ? 0.3f : -0.3f) * W;+ onHull(s * L, across, H * (0.4f + 0.2f * unit(984 + k)), (std::max)(W * 0.9f, 2.6f) * swell,+ s * 2.5f * fade, across * 0.3f * fade, 0.8f, 22.0f * fade * fade, 0.3f, 2.0f * fade, 0.15f);}}// Pale dust lifted along the ground on both sides of the hull, pushed out low, no ring.