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(data): projectile hit fans open back toward the shooter

Olcay Seygana5cd588cc3b0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 92f4ceeed..0cf42b331 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1456,7 +1456,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same
- A bright cloud no longer shows what is behind it as a line drawing. Inside a nuke's white cloud, or a falling War Factory's fireball, every tree and wreck under it used to come out as a thin grey outline, and the picture's sharpening ringed each dark piece in white. Both stop where the frame is bright.
- Smoke and fire no longer end on a straight line where they meet the ground or a building. A puff that sinks into a hillside or drifts against a wall thins out over its last few metres, softly enough that a nuke's haze and a Scud's grey smoke no longer come out as stacked, stair-stepped terraces, and a toxin cloud lying low over the ground keeps its body instead of breaking into hard-edged green islands. A China mine field blinks where you can see it again: its lights hang just off the ground, and the fade had eaten all but a thirtieth of their bright middle. No effect fades over more than its own size now, so a small spark close to the ground keeps its light. This is the default renderer; Classic and the old renderer keep the hard edge they had in 2003.
- Gunfire shows at the zoom you play at. A rifle's tracer was a third of a unit wide, about one pixel from the default camera, and a bullet hit nothing you could see. Tracers from rifles, Gattlings, Humvees, Technicals and Quad Cannons are now twice as wide and half again as long, the muzzle flash is half as big again, and every hit kicks up sparks and a puff of dirt where it lands. A tank shell burns a short hot streak behind it all the way to the target, where it used to be a grey sliver you could not pick out between the flash and the blast. A Crusader's, Battlemaster's, Scorpion's, Paladin's or Overlord's shot used to be a soft white glow drifting out in front of the gun, wider than the tank; it is now a short orange blast at the barrel tip, with a bigger flame and smoke puff behind it. A shell landing throws dirt and sparks around its blast. The colours are the ones the game always used, and no weapon does anything different.
-- Blasts throw fragments that smoke. Every explosion flings hot sparks up into the air, each drawing a white line of smoke that arcs over and curves down, and the bigger the blast the higher and longer the fan: a Stinger or a rocket pod throws three short ones, a tank shell or a rocket four, a bomb, a heavy shell, a Scud or a building eight that climb several times a tank's length, and a nuke, a MOAB, a Daisy Cutter or a large building fourteen that arc over its own fireball and hang for nearly five seconds. A vehicle that blows up throws burning pieces that drag near-black smoke and bounce where they land, and the turret, wheels and plates it throws off trail smoke and flame too, then smoulder a moment on the ground. In a fight of seventeen tanks the screen held about 1550 particles where it held 890, peaking at 2323 of the 2500 limit; the fragments and their smoke are the first effects that limit and a lower detail setting drop, so a bigger fight keeps its explosions and loses some lines. What a weapon does is unchanged.
+- Blasts throw fragments that smoke. Every explosion flings hot sparks into the air, each drawing a white line of smoke that arcs over and curves down. Where a shell, rocket or missile lands the spray opens back up the line it came in on, towards the gun that fired it, low for a tank shell and steeper for a diving rocket, so you can read where the fire came from. The bigger the blast, the higher and longer the fan: a Stinger or a rocket pod throws three short ones, a tank shell or a rocket four, a bomb, a heavy shell, a Scud or a building eight that climb several times a tank's length, and a nuke, a MOAB, a Daisy Cutter or a large building fourteen that arc over its own fireball and hang for nearly five seconds. A vehicle that blows up throws burning pieces that drag near-black smoke and bounce where they land, and the turret, wheels and plates it throws off trail smoke and flame too, then smoulder a moment on the ground. In a fight of seventeen tanks the screen held about 1400 particles where it held 890, peaking at 2159 of the 2500 limit; the fragments and their smoke are the first effects that limit and a lower detail setting drop, so a bigger fight keeps its explosions and loses some lines. What a weapon does is unchanged.
- A China mine field tells you what kind it is. EA's field had no model at all, only a soft white glint swelling and fading on each of its eight spots, so your own minefield looked like a patch of fireflies. Each mine is now marked by a small arming light that snaps on for a quarter of a second every second and a half, red on standard and cluster mines and blue on EMP mines, with a white-hot point and a dark rim that keep it readable on grass, sand or snow. No mine body is drawn on the ground, only the light. The enemy still sees nothing until he detects the field. A mine going off under a tank now throws a column of dark earth twice the tank's height, scatters clods round it and leaves a low black smoke and a scorch, with a short jolt of the screen; it used to puff a pale spray of specks that looked like dust kicked up. An EMP mine throws no earth, so you can tell which kind went off: it lights a blue ring across the ground, a crackle of blue sparks and a short blue flash at the spot; EA's flash grew until it washed the whole screen white for a fifth of a second. What a mine does is unchanged.
- A base out of power looks out of power. A building that switches off when your power runs short, or one a hacker shut down, drains to a cold grey and sags darker, and its windows and lamps go out. Every few seconds it blinks dark for an instant or its lights catch again for a moment, and blue sparks jump on its walls where something shorts. A tank or building hit by an EMP crawls with thin blue arcs for as long as it stays dead, where it used to just turn dark grey.
- Your own stealthed units look like glass, not like ice. In 3.0 a camouflaged Rebel, a Pathfinder or Colonel Burton came out under a blue skin with bands running up it, which players rightly called ugly. The blue is gone: the ground behind him shows through his body in its own colours and bends, a slow lens that ripples along him and pulls harder at his outline, with only a hint of his own paint left in it. The bend is what you find him by: each face of him tips the ground behind it its own way, so his shape shows even on plain sand, and the bend never drops below a few pixels, and a faint cool haze that thickens at his outline keeps a cloaked soldier or building findable at the zoom you play at, without turning him white. Up close a building's flat wall bends across its face. It moves slowly and never fizzes. He never turns solid, and the 2003 breathing of the fade is still there. His shadow fades with him, to between a quarter and a half of its strength as he breathes, where it used to lie on the ground at full strength and give him away before his body did; on Classic and the old renderer the shadow stays whole. When an enemy detector has found him, his whole body beats amber along with his edge, so a spotted building reads as spotted and does not just turn tan. On every renderer, a stealthed unit of yours no longer comes out solid whenever no building is on the screen: the game drew it a second time without its see-through. An enemy stealth unit your detector finds used to turn into a flat orange shape with no paint; now it shows as heat, its own shading run from dark red through orange to a warm yellow that stops short of white, so you can still tell a tank from a soldier and bright GLA paint keeps its detail, with a burning outline and a slow glow climbing it that flares on every sweep of the detector. The fine scan lines of 3.0 are gone, since zoomed out they broke into stripes. This is the default renderer; Classic and the old renderer keep the 2003 look for all of these.
diff --git a/GeneralsMD/Code/BuildFingerprint.manifest b/GeneralsMD/Code/BuildFingerprint.manifest
index ab9bb69ab..831db2433 100644
--- a/GeneralsMD/Code/BuildFingerprint.manifest
+++ b/GeneralsMD/Code/BuildFingerprint.manifest
@@ -35,6 +35,7 @@ Data/Cinema/blastcheck.txt
Data/Cinema/debristrails.txt
Data/Cinema/debristrails3.txt
Data/Cinema/debristrails3_nuke.txt
+Data/Cinema/debristrails3_side.txt
Data/Cinema/demo.txt
Data/Cinema/drawlooks.txt
Data/Cinema/explreel.txt
diff --git a/GeneralsMD/Code/Data/Cinema/debristrails3_side.txt b/GeneralsMD/Code/Data/Cinema/debristrails3_side.txt
new file mode 100644
index 000000000..bcc88a451
--- /dev/null
+++ b/GeneralsMD/Code/Data/Cinema/debristrails3_side.txt
@@ -0,0 +1,8 @@
+# Scenarios/debristrails3.txt, the tank fight from the south side, low, so the fire line between
+# the Americans at x 1380 and the Chinese at x 1600 runs across the frame and the direction a hit's
+# fragments open toward can be read against the shooter. Heading 135 kept the map edge out of the
+# side views of the town. Run with -video 120 1000.
+
+0.5 cut 1430 3780 0.7 -45 18
+2.5 shot
+17.0 end
diff --git a/GeneralsMD/Code/Data/INI/FXListReforged.ini b/GeneralsMD/Code/Data/INI/FXListReforged.ini
index 215a6f67d..20a7d8289 100644
--- a/GeneralsMD/Code/Data/INI/FXListReforged.ini
+++ b/GeneralsMD/Code/Data/INI/FXListReforged.ini
@@ -82,6 +82,8 @@ End
FXList WeaponFX_GenericTankShellDetonation
ParticleSystem
Name = ReforgedBlastShards
+ OrientToObject = Yes
+ RotateY = -55
End
Sound
Name = ExplosionRocketBuggyMissile
@@ -888,6 +890,8 @@ End
FXList WeaponFX_ComancheAntiTankMissileDetonation
ParticleSystem
Name = ReforgedBlastShards
+ OrientToObject = Yes
+ RotateY = -55
End
Sound
Name = ExplosionRocketBuggyMissile
@@ -910,6 +914,8 @@ End
FXList WeaponFX_ComancheRocketPodRocketDetonation
ParticleSystem
Name = ReforgedBlastShardsSmall
+ OrientToObject = Yes
+ RotateY = -55
End
Sound
Name = ExplosionRocketBuggyMissile
@@ -932,6 +938,8 @@ End
FXList WeaponFX_RocketBuggyMissileDetonation
ParticleSystem
Name = ReforgedBlastShards
+ OrientToObject = Yes
+ RotateY = -55
End
Sound
Name = ExplosionRocketBuggyMissile
@@ -1065,6 +1073,8 @@ End
FXList WeaponFX_TomahawkMissileDetonation
ParticleSystem
Name = ReforgedBlastShards
+ OrientToObject = Yes
+ RotateY = -55
End
Sound
Name = ExplosionRocketBuggyMissile
@@ -1087,6 +1097,8 @@ End
FXList WeaponFX_HumveeMissileDetonation
ParticleSystem
Name = ReforgedBlastShardsSmall
+ OrientToObject = Yes
+ RotateY = -55
End
Sound
Name = ExplosionRocketBuggyMissile
@@ -1247,6 +1259,8 @@ End
FXList WeaponFX_StingerMissileDetonation
ParticleSystem
Name = ReforgedBlastShardsSmall
+ OrientToObject = Yes
+ RotateY = -55
End
Sound
Name = ExplosionRocketBuggyMissile
@@ -1779,6 +1793,8 @@ End
FXList FX_A10ThunderboltMissileExplosion
ParticleSystem
Name = ReforgedBlastShards
+ OrientToObject = Yes
+ RotateY = -55
End
ParticleSystem
@@ -2817,6 +2833,8 @@ End
FXList WeaponFX_DEMOGENRocketBuggyMissileDetonation
ParticleSystem
Name = ReforgedBlastShards
+ OrientToObject = Yes
+ RotateY = -55
End
Sound
Name = ExplosionRocketBuggyMissile
@@ -2842,6 +2860,8 @@ End
FXList WeaponFX_DEMOGenericTankShellDetonation
ParticleSystem
Name = ReforgedBlastShards
+ OrientToObject = Yes
+ RotateY = -55
End
Sound
Name = ExplosionRocketBuggyMissile
@@ -2926,6 +2946,8 @@ End
FXList WeaponFX_DEMORocketBuggyMissileDetonation
ParticleSystem
Name = ReforgedBlastShards
+ OrientToObject = Yes
+ RotateY = -55
End
Sound
Name = ExplosionRocketBuggyMissile
@@ -3735,6 +3757,8 @@ End
FXList WeaponFX_NukeCannon
ParticleSystem
Name = ReforgedBlastShardsLarge
+ OrientToObject = Yes
+ RotateY = -55
End
; a short bend, the cannon fires often
ScreenDistortion
@@ -3826,6 +3850,8 @@ End
FXList Nuke_WeaponFX_NukeCannon
ParticleSystem
Name = ReforgedBlastShardsLarge
+ OrientToObject = Yes
+ RotateY = -55
End
; a short bend, the cannon fires often
ScreenDistortion
@@ -4107,6 +4133,8 @@ End
FXList FX_SpectreHowitzerExplosion
ParticleSystem
Name = ReforgedBlastShardsLarge
+ OrientToObject = Yes
+ RotateY = -55
End
ViewShake
Type = SUBTLE
@@ -4152,6 +4180,8 @@ End
FXList FX_FireBaseHowitzerExplosion
ParticleSystem
Name = ReforgedBlastShardsLarge
+ OrientToObject = Yes
+ RotateY = -55
End
ViewShake
Type = SUBTLE
@@ -4944,6 +4974,8 @@ End
FXList WeaponFX_JetMissileDetonation
ParticleSystem
Name = ReforgedBlastShards
+ OrientToObject = Yes
+ RotateY = -55
End
ViewShake
Type = NORMAL
diff --git a/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini b/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini
index 1b39ec633..1ad3711ad 100644
--- a/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini
+++ b/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini
@@ -5069,7 +5069,7 @@ End
; high, where they hid inside the fireball. Heights are v*v/2g in retail frames.
;
; Small (infantry rockets, rocket pods) 3 sparks, 15 to 25 high, line 0.8 s
-; Medium (tank shells, rockets, light bombs) 4 sparks, 25 to 55 high, line 1 s
+; Medium (tank shells, rockets, light bombs) 4 sparks, 25 to 55 high, line 0.7 s
; Large (bombs, heavy shells, buildings) 8 sparks, 75 to 140 high, line 3 s
; Huge (nukes, MOAB, Daisy Cutter, big
; buildings) 14 sparks, 185 to 330 high, line 4.7 s
@@ -5077,7 +5077,17 @@ End
; Huge was 95 to 165 high with 3-wide lines at first and came out as a ring of short arcs a fifth
; the width of a nuke's fireball. Small lays a point every second frame, the others every third:
; ribbons bend at each point, and a fragment's arc is smooth enough at that spacing while the point
-; count drops by a third. At most about 40, 40, 210 and 510 trail points alive per blast. Orange sparks rather than white: white
+; count drops by a third. At most about 40, 30, 210 and 510 trail points alive per blast. Medium's
+; line was 1.2 s and then 1 s; over a busy fight the hits' lines stood in the air together like
+; rain, so it fades in 0.7 s.
+;
+; On a projectile's hit (shells, rockets, missiles, artillery) FXListReforged.ini plays the tier
+; with OrientToObject and RotateY -55. The FX gets the projectile's own transform, X along its
+; flight, so the cone's axis (the system's Z) leans 55 degrees back from the projectile's up
+; towards where it came from: a flat tank shell sprays back up its own line at about 35 degrees
+; over the ground, a rocket diving at 30 degrees sprays back at about 60, and a shell falling at 60
+; straight up. Bombs, deaths and superweapons stay on the plain upward cone: a bomb falls straight
+; down and has no "back". Orange sparks rather than white: white
; ones born inside the white of the blast could not be told from it.
; ----------------------------------------------------------------------------------------------
@@ -5150,7 +5160,7 @@ ParticleSystem ReforgedBlastShardPuff
AngularDamping = 1.00 1.00
VelocityDamping = 0.95 0.95
Gravity = 0.00
- Lifetime = 30.00 30.00
+ Lifetime = 21.00 21.00
SystemLifetime = 0
Size = 1.60 1.60
StartSizeRate = 0.00 0.00
@@ -5158,14 +5168,14 @@ ParticleSystem ReforgedBlastShardPuff
SizeRateDamping = 0.96 0.96
Alpha1 = 0.00 0.00 0
Alpha2 = 0.60 0.60 3
- Alpha3 = 0.35 0.35 14
- Alpha4 = 0.00 0.00 30
+ Alpha3 = 0.35 0.35 10
+ Alpha4 = 0.00 0.00 21
Alpha5 = 0.00 0.00 0
Alpha6 = 0.00 0.00 0
Alpha7 = 0.00 0.00 0
Alpha8 = 0.00 0.00 0
Color1 = R:225 G:225 B:225 0
- Color2 = R:190 G:190 B:190 30
+ Color2 = R:190 G:190 B:190 21
Color3 = R:0 G:0 B:0 0
Color4 = R:0 G:0 B:0 0
Color5 = R:0 G:0 B:0 0