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.

fix(gameclient): aura ring light clamped like the terrain shade, tuned

Olcay Seyganca1e34837fad
diff --git a/GeneralsMD/Code/BuildFingerprint.manifest b/GeneralsMD/Code/BuildFingerprint.manifest
index 88b87f884..48589592b 100644
--- a/GeneralsMD/Code/BuildFingerprint.manifest
+++ b/GeneralsMD/Code/BuildFingerprint.manifest
@@ -60,6 +60,7 @@ Data/Cinema/filterbw.txt
Data/Cinema/firelook.txt
Data/Cinema/geproto_alpine.txt
Data/Cinema/geproto_glow.txt
+Data/Cinema/geproto_hazemove.txt
Data/Cinema/geproto_oasis.txt
Data/Cinema/gunfx.txt
Data/Cinema/headlights.txt
@@ -106,6 +107,7 @@ Data/Cinema/nukewarp.txt
Data/Cinema/rankaura.txt
Data/Cinema/rankauramaresal.txt
Data/Cinema/rankauranight.txt
+Data/Cinema/rankaurasnow.txt
Data/Cinema/rankladder.txt
Data/Cinema/rankzero.txt
Data/Cinema/rf_ai.txt
@@ -251,6 +253,7 @@ Data/Scenarios/firelook.txt
Data/Scenarios/fogleak.txt
Data/Scenarios/geproto_alpine.txt
Data/Scenarios/geproto_glow.txt
+Data/Scenarios/geproto_hazemove.txt
Data/Scenarios/geproto_oasis.txt
Data/Scenarios/givemoney.txt
Data/Scenarios/glowbase.txt
@@ -327,6 +330,7 @@ Data/Scenarios/rankaura.txt
Data/Scenarios/rankauramaresal.txt
Data/Scenarios/rankauranight.txt
Data/Scenarios/rankaurareplay.txt
+Data/Scenarios/rankaurasnow.txt
Data/Scenarios/rankladder.txt
Data/Scenarios/rankzero.txt
Data/Scenarios/reachshot.txt
diff --git a/GeneralsMD/Code/Data/Cinema/rankaurasnow.txt b/GeneralsMD/Code/Data/Cinema/rankaurasnow.txt
new file mode 100644
index 000000000..1422a028d
--- /dev/null
+++ b/GeneralsMD/Code/Data/Cinema/rankaurasnow.txt
@@ -0,0 +1,8 @@
+# Scenarios/rankaurasnow.txt: the Maresal Altay's five rings, radius 300, on Winter Wolf's snow. The
+# first cut frames the Altay at the screen centre for a -control click (after frame 360); the
+# selection survives the later cut, which pulls back and tilts down so the whole ring fits.
+
+0.0 hud on
+0.3 cut 900 1736 1.8 0 0
+3.0 cut 900 1736 1.8 0 0
+8.0 cut 900 1736 2.0 0 -30
diff --git a/GeneralsMD/Code/Data/INI/BalanceReforged.ini b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
index 34a9f4c53..98310fc80 100644
--- a/GeneralsMD/Code/Data/INI/BalanceReforged.ini
+++ b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
@@ -1909,7 +1909,7 @@ Veterancy
OpacityMin = 40%
OpacityMax = 40%
SpinTime = 90000
- LightReference = 0.9
+ LightReference = 0.75
LightScaleMin = 0.35
LightScaleMax = 1.2
End
@@ -1919,7 +1919,7 @@ Veterancy
Color = R:175 G:200 B:230
OpacityMin = 40%
OpacityMax = 40%
- LightReference = 0.9
+ LightReference = 0.75
LightScaleMin = 0.35
LightScaleMax = 1.2
End
@@ -1929,7 +1929,7 @@ Veterancy
Color = R:180 G:215 B:180
OpacityMin = 40%
OpacityMax = 40%
- LightReference = 0.9
+ LightReference = 0.75
LightScaleMin = 0.35
LightScaleMax = 1.2
End
@@ -1940,7 +1940,7 @@ Veterancy
OpacityMin = 32%
OpacityMax = 32%
SpinTime = -120000
- LightReference = 0.9
+ LightReference = 0.75
LightScaleMin = 0.35
LightScaleMax = 1.2
End
@@ -1950,7 +1950,7 @@ Veterancy
Color = R:215 G:215 B:210
OpacityMin = 30%
OpacityMax = 30%
- LightReference = 0.9
+ LightReference = 0.75
LightScaleMin = 0.25
LightScaleMax = 1.2
End
diff --git a/GeneralsMD/Code/Data/Scenarios/rankaurasnow.txt b/GeneralsMD/Code/Data/Scenarios/rankaurasnow.txt
new file mode 100644
index 000000000..f6f1d8be1
--- /dev/null
+++ b/GeneralsMD/Code/Data/Scenarios/rankaurasnow.txt
@@ -0,0 +1,19 @@
+# Turkiye's Maresal rings on snow (2026-10-22): the same company as rankauramaresal.txt on Winter
+# Wolf, east of seat 0's start (438,1736), so the five rings (radius 300) lie on snow the seat has
+# already seen. Two Kirpi drive through the ring east to west. Select the Altay with a -control
+# click at the screen centre once Cinema/rankaurasnow.txt has cut to it.
+#
+# generals.exe -win -borderless -xres 1920 -yres 1080 -msaa 0 -quickstart -noshellmap
+# -multiInstance -fps 120 -noFPSLimit -map "Maps\Winter Wolf\Winter Wolf.map"
+# -autoskirmish 2 -takeover -side 0 FactionTurkiye -side 1 FactionChina -seed 1
+# -scenario rankaurasnow -cinema rankaurasnow -control 8798 -logPrefix rankaura3_s_
+
+10 spawn 0 TurkiyeTankAltay 1 900 1736
+10 spawn 0 TurkiyeInfantrySungur 1 780 1680
+10 spawn 0 TurkiyeInfantryMehmetcik 4 1015 1660 30
+10 spawn 0 TurkiyeVehicleKirpi 2 1200 1900 40
+10 spawn 1 ChinaTankBattleMaster 1 start1:-260:0
+
+12 rank 0 TurkiyeTankAltay grade 21
+
+200 move 0 TurkiyeVehicleKirpi 650 1900
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/RadiusDecal.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/RadiusDecal.cpp
index 63eb9c14e..d98318db7 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/RadiusDecal.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/RadiusDecal.cpp
@@ -75,12 +75,13 @@ static Real groundLight()
RGBColor shade = TheGlobalData->m_terrainAmbient[0];
for (Int i = 0; i < TheGlobalData->m_numGlobalLights; ++i)
{
- const Real down = MAX(0.0f, -TheGlobalData->m_terrainLightPos[i].z);
+ const Real down = MIN(1.0f, MAX(0.0f, -TheGlobalData->m_terrainLightPos[i].z));
shade.red += TheGlobalData->m_terrainDiffuse[i].red * down;
shade.green += TheGlobalData->m_terrainDiffuse[i].green * down;
shade.blue += TheGlobalData->m_terrainDiffuse[i].blue * down;
}
- return 0.30f * shade.red + 0.59f * shade.green + 0.11f * shade.blue;
+ // each channel saturates at 1 as the terrain's own vertex shade does
+ return 0.30f * MIN(1.0f, shade.red) + 0.59f * MIN(1.0f, shade.green) + 0.11f * MIN(1.0f, shade.blue);
}
Real RadiusDecalTemplate::lightScale() const