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.

feat(w3ddevice): weather wind at a quarter of its speed

Olcay Seygan2e4713206d5e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0afe10a80..e1060d078 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -85,7 +85,7 @@ found and fixed, EA's own, not port damage.**
## Weather, if you want it
-- Weather, under Options, Effects, is a new setting, off by default until it has been played. A green map gets rain, and a desert map gets blowing sand over a still tan haze. A snowy map with no flakes of its own gets them. The trees lean and sway harder and smoke drifts downwind; a map that already rains or snows, Flooded Plains or Bitter Winter, keeps what EA gave it and takes only the wind. The weather is much lighter than it first was, so the field stays readable in rain, sand and snow. No part of the game reads any of this: what a unit sees and hits stays what the map says, so you and your opponent can have different weather in one match. A sandstorm over a battle of three armies and three superweapons takes the graphics card's frame from about 7.9 to 8.5 ms. Direct3D 11 only, and off under Classic Graphics.
+- Weather, under Options, Effects, is a new setting, off by default until it has been played. A green map gets rain, and a desert map gets blowing sand over a still tan haze. A snowy map with no flakes of its own gets them. The trees lean and sway harder and smoke drifts gently downwind, and rain, sand and snow blow at a quarter of the speed they first flew at; a map that already rains or snows, Flooded Plains or Bitter Winter, keeps what EA gave it and takes only the wind. The weather is much lighter than it first was, so the field stays readable in rain, sand and snow. No part of the game reads any of this: what a unit sees and hits stays what the map says, so you and your opponent can have different weather in one match. A sandstorm over a battle of three armies and three superweapons takes the graphics card's frame from about 7.9 to 8.5 ms. Direct3D 11 only, and off under Classic Graphics.
## Fire keeps its colour
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/Snow.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/Snow.cpp
index 9430db418..f06bfd220 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/Snow.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Snow.cpp
@@ -92,10 +92,10 @@ void SnowManager::updateIniSettings(void)
/* The Weather option's wind. Strength 1 is a sandstorm. Sway and lean are radians over the default
breeze's 0.055 of each, the smoke's drift is world units per particle update; a smoke column rises
- about twice that, so it leans by some 25 degrees. */
+ about eight times that, so it leans by some 7 degrees. */
static const Real WEATHER_SWAY = 0.11f;
static const Real WEATHER_LEAN = 0.16f;
-static const Real WEATHER_SMOKE_DRIFT = 0.5f;
+static const Real WEATHER_SMOKE_DRIFT = 0.125f;
static const Short WEATHER_BREEZE_PERIOD = LOGICFRAMES_PER_SECOND * 3;
static const Short WEATHER_BREEZE_VERSION = 0x2000; // past any count a map's scripts reach, so trees notice the switch
static BreezeInfo s_weatherBreeze;
diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DSnow.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DSnow.cpp
index 8210edffb..9fe657752 100644
--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DSnow.cpp
+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DSnow.cpp
@@ -240,10 +240,10 @@ struct WeatherLayer
static const WeatherLayer WEATHER_LAYERS[WEATHER_KIND_COUNT][2] =
{
{ { NULL }, { NULL } },
- { { "EXRainDrop.tga", 6000, 180.0f, 1100.0f, 44.0f, 3.0f, 0xb8d8e4f0, 0.0f, FALSE }, { NULL } },
- { { "EXRainDrop.tga", 3500, 520.0f, 25.0f, 64.0f, 3.0f, 0x90ecd4a4, 150.0f, FALSE },
- { "EXCloud01.tga", 70, 260.0f, 4.0f, 260.0f, 260.0f, 0x1cd0ac7c, 170.0f, TRUE } },
- { { "EXSnowFlake1.tga", 6000, 34.0f, 46.0f, 2.4f, 2.4f, 0xd0e8eef4, 0.0f, TRUE }, { NULL } }
+ { { "EXRainDrop.tga", 6000, 45.0f, 1100.0f, 44.0f, 3.0f, 0xb8d8e4f0, 0.0f, FALSE }, { NULL } },
+ { { "EXRainDrop.tga", 3500, 130.0f, 25.0f, 64.0f, 3.0f, 0x90ecd4a4, 150.0f, FALSE },
+ { "EXCloud01.tga", 70, 65.0f, 4.0f, 260.0f, 260.0f, 0x1cd0ac7c, 170.0f, TRUE } },
+ { { "EXSnowFlake1.tga", 6000, 8.5f, 46.0f, 2.4f, 2.4f, 0xd0e8eef4, 0.0f, TRUE }, { NULL } }
};
static const Real WEATHER_WIND_STRENGTH[WEATHER_KIND_COUNT] = { 0.5f, 0.8f, 1.0f, 0.35f };