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): bigger gun tracers, muzzle flashes and bullet impacts

Olcay Seygan5e2d6b8bcdb2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec9ad9e95..d0cf83940 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1373,6 +1373,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same
- An explosion lights everything around it, smoothly. On the default renderer the light of a blast reaches every tank, soldier, building and patch of ground it can see, fading out with distance, where the ground used to brighten in blocky squares and a model took only four lights at once, so in a big fight half the tanks next to a burning wreck stayed dark. The 32 blasts nearest the camera light at the same time, and a wall with its back to the fire stays in shadow. The light brightens what it falls on by three quarters at most: a nuke's took the ground to white within a few frames until it was held there.
- 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. Tank guns fire a hot streak that flies with the shell, a Crusader's, Battlemaster's, Scorpion's, Paladin's or Overlord's muzzle flame and flash are about half as big again, and 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.
- A China mine field has mines in it. EA's field had no model at all, only a white glint blinking on each of its eight spots, so your own minefield looked like a patch of fireflies. Each spot is now a round steel mine pressed into a ring of dug earth, at a random turn, with a small red light blinking over its fuse, violet on EMP mines. You and your allies see them a little see-through, the way you see your own stealthed units. The enemy still sees nothing until he detects the field, and then he sees the same mines. What a mine does is unchanged.
- Effects fade out instead of blinking off. The rings a nuke sends across the ground, and any spark, flash or puff whose own colours never reached nothing, used to vanish at full strength on their last frame. Each one now dims away over its last quarter of a second, or over a quarter of its life when it lives shorter than that. One that was already fading looks the way it always did.
- Toxin, anthrax and radiation pools lie on the ground. A pool is a carpet of puddle pictures spread up to 140 paces from where the shell or the spray came down, and every one of them was drawn dead flat at the height of that one spot: on a hillside the uphill half of the pool disappeared into the slope and the downhill half hung in the air above it. Each puddle now bends over the ground underneath it, on both renderers, and a pool on a bridge stays on the deck. The pool also holds still. It used to throb twice a second, because every half second the pool's poison fired a fresh batch of puddles that swelled out of black to full green and back to black in two seconds, each batch somewhere new. Now it comes up in half a second, stays one pool at full colour for as long as it does damage, and fades over its last three seconds, or over three seconds from the moment the fog of war closes over it. It is not frozen, though: each puddle fades down and back up on its own beat, so the surface shimmers like something liquid while the pool as a whole never pulses. Four Scud warheads landing on one spot used to stack into a white-hot blotch in the middle; overlapping pools now share their light and the middle stays toxin green. The ground under it takes on its colour, green for toxin and the anthrax colours for anthrax, so it looks spilled rather than shone onto the grass. China's radiation keeps its orange but glows instead of browning the grass, which made it look like a scorch mark, and small bubbles swell out of it and pop. A nuke's radiation lies on the hillside as a pool from three seconds after the blast, where its first ten seconds used to be flat squares cutting into the slope.
diff --git a/GeneralsMD/Code/Data/INI/FXListReforged.ini b/GeneralsMD/Code/Data/INI/FXListReforged.ini
index c66e619a7..81a3b5b8a 100644
--- a/GeneralsMD/Code/Data/INI/FXListReforged.ini
+++ b/GeneralsMD/Code/Data/INI/FXListReforged.ini
@@ -87,6 +87,14 @@ FXList WeaponFX_GenericTankShellDetonation
ParticleSystem
Name = BuggyMissileExplosionSmoke
End
+ ; a shell landing throws EA's dirt clods and sparks, which only a tank being struck used to show
+ ParticleSystem
+ Name = TankStruckDebris
+ End
+ ParticleSystem
+ Name = TankStruckSparks
+ Height = 4 4 CONSTANT
+ End
LightPulse
Color = R:255 G:150 B:70
Radius = 85
@@ -3990,3 +3998,500 @@ FXList FX_PointDefenseLaserBurst
DecreaseTime = 300
End
End
+
+; ----------------------------------------------
+; Gunfire that reads at play zoom. EA's machine gun tracers were a third of a unit wide and ten
+; long, about one pixel at the default camera height, and an instant-hit gun showed nothing where
+; it hit, because it has no projectile to carry a detonation FX there. These are EA's gun FXLists
+; with the tracer twice as wide and half again as long, a stronger muzzle light, and a spark and a
+; dirt puff played AtTarget, where the tracer lands. The muzzle flares themselves are larger in
+; ParticleSystemReforged.ini. Colours and speeds stay EA's.
+FXList WeaponFX_GenericMachineGunFire
+ LightPulse
+ Color = R:255 G:255 B:128
+ Radius = 20
+ IncreaseTime = 0
+ DecreaseTime = 200
+ End
+ ParticleSystem
+ Name = GattlingCannonLenzflare
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ ParticleSystem
+ Name = FallingShells
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ Tracer
+ DecayAt = 1
+ Length = 16
+ Width = 0.7
+ Color = R:255 G:255 B:255
+ Speed = 600
+ Probability = 0.7
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactSpark
+ AtTarget = Yes
+ Radius = 0 3 UNIFORM
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactDust
+ AtTarget = Yes
+ Radius = 0 4 UNIFORM
+ CreateAtGroundHeight = Yes
+ End
+End
+
+; ----------------------------------------------
+FXList WeaponFX_GenericMachineGunFireWithRedTracers
+ LightPulse
+ Color = R:128 G:0 B:0
+ Radius = 30
+ IncreaseTime = 0
+ DecreaseTime = 200
+ End
+ ParticleSystem
+ Name = HeroicGattlingCannonLenzflare
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ ParticleSystem
+ Name = FallingShells
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ Tracer
+ DecayAt = 1
+ Length = 16
+ Width = 0.7
+ Color = R:255 G:0 B:0
+ Speed = 300
+ Probability = 0.7
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactSpark
+ AtTarget = Yes
+ Radius = 0 3 UNIFORM
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactDust
+ AtTarget = Yes
+ Radius = 0 4 UNIFORM
+ CreateAtGroundHeight = Yes
+ End
+End
+
+; ----------------------------------------------
+FXList WeaponFX_GattlingTankMachineGunFire
+ LightPulse
+ Color = R:255 G:255 B:128
+ Radius = 20
+ IncreaseTime = 0
+ DecreaseTime = 100
+ End
+ ParticleSystem
+ Name = GattlingCannonLenzflare
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ ParticleSystem
+ Name = FallingShellsGattling
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ Tracer
+ DecayAt = 1
+ Length = 16
+ Width = 0.7
+ Color = R:255 G:255 B:255
+ Speed = 1200
+ Probability = 0.7
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactSpark
+ AtTarget = Yes
+ Radius = 0 3 UNIFORM
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactDust
+ AtTarget = Yes
+ Radius = 0 4 UNIFORM
+ CreateAtGroundHeight = Yes
+ End
+End
+
+; ----------------------------------------------
+FXList WeaponFX_GattlingTankMachineGunFireWithRedTracers
+ LightPulse
+ Color = R:255 G:64 B:64
+ Radius = 30
+ IncreaseTime = 0
+ DecreaseTime = 500
+ End
+ ParticleSystem
+ Name = HeroicGattlingCannonLenzflare
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ ParticleSystem
+ Name = FallingShellsGattling
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ Tracer
+ DecayAt = 1
+ Length = 16
+ Width = 0.7
+ Color = R:255 G:0 B:0
+ Speed = 1200
+ Probability = 0.7
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactSpark
+ AtTarget = Yes
+ Radius = 0 3 UNIFORM
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactDust
+ AtTarget = Yes
+ Radius = 0 4 UNIFORM
+ CreateAtGroundHeight = Yes
+ End
+End
+
+; ----------------------------------------------
+FXList WeaponFX_GattlingCannonMachineGunFire
+ LightPulse
+ Color = R:255 G:255 B:128
+ Radius = 20
+ IncreaseTime = 0
+ DecreaseTime = 100
+ End
+ ParticleSystem
+ Name = GattlingCannonLenzflare
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ ParticleSystem
+ Name = FallingShellsGattlingTilted
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ Tracer
+ DecayAt = 1
+ Length = 16
+ Width = 0.7
+ Color = R:255 G:255 B:255
+ Speed = 1200
+ Probability = 0.7
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactSpark
+ AtTarget = Yes
+ Radius = 0 3 UNIFORM
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactDust
+ AtTarget = Yes
+ Radius = 0 4 UNIFORM
+ CreateAtGroundHeight = Yes
+ End
+End
+
+; ----------------------------------------------
+FXList WeaponFX_GattlingCannonMachineGunFireWithRedTracers
+ LightPulse
+ Color = R:255 G:64 B:64
+ Radius = 30
+ IncreaseTime = 0
+ DecreaseTime = 500
+ End
+ ParticleSystem
+ Name = HeroicGattlingCannonLenzflare
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ ParticleSystem
+ Name = FallingShellsGattlingTilted
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ Tracer
+ DecayAt = 1
+ Length = 16
+ Width = 0.7
+ Color = R:255 G:0 B:0
+ Speed = 1200
+ Probability = 0.7
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactSpark
+ AtTarget = Yes
+ Radius = 0 3 UNIFORM
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactDust
+ AtTarget = Yes
+ Radius = 0 4 UNIFORM
+ CreateAtGroundHeight = Yes
+ End
+End
+
+; ----------------------------------------------
+FXList WeaponFX_QuadCannonGunFire
+ LightPulse
+ Color = R:128 G:128 B:64
+ Radius = 30
+ IncreaseTime = 0
+ DecreaseTime = 100
+ End
+ ParticleSystem
+ Name = GattlingCannonLenzflareIntense
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ ParticleSystem
+ Name = FallingShells
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ Tracer
+ DecayAt = 1
+ Length = 16
+ Width = 0.7
+ Color = R:255 G:255 B:255
+ Speed = 300
+ Probability = 0.5
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactSpark
+ AtTarget = Yes
+ Radius = 0 3 UNIFORM
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactDust
+ AtTarget = Yes
+ Radius = 0 4 UNIFORM
+ CreateAtGroundHeight = Yes
+ End
+End
+
+; ----------------------------------------------
+FXList WeaponFX_HeroicQuadCannonGunFire
+ LightPulse
+ Color = R:255 G:255 B:128
+ Radius = 30
+ IncreaseTime = 0
+ DecreaseTime = 300
+ End
+ ParticleSystem
+ Name = HeroicGattlingCannonLenzflare
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ ParticleSystem
+ Name = FallingShells
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ Tracer
+ DecayAt = 1
+ Length = 16
+ Width = 0.7
+ Color = R:255 G:0 B:0
+ Speed = 300
+ Probability = 0.5
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactSpark
+ AtTarget = Yes
+ Radius = 0 3 UNIFORM
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactDust
+ AtTarget = Yes
+ Radius = 0 4 UNIFORM
+ CreateAtGroundHeight = Yes
+ End
+End
+
+; ----------------------------------------------
+; Humvee, Technical and the drones. EA fired a tracer on one shot in four; one in two now.
+FXList WeaponFX_TechnicalGunFire
+ LightPulse
+ Color = R:255 G:255 B:128
+ Radius = 30
+ IncreaseTime = 0
+ DecreaseTime = 500
+ End
+ ParticleSystem
+ Name = GattlingCannonLenzflareIntense
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ ParticleSystem
+ Name = FallingShells
+ OrientToObject = Yes
+ Offset = X:0.0 Y:0.0 Z:0.0
+ End
+ Tracer
+ DecayAt = 1
+ Length = 16
+ Width = 0.7
+ Color = R:230 G:204 B:179
+ Speed = 300
+ Probability = 0.5
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactSpark
+ AtTarget = Yes
+ Radius = 0 3 UNIFORM
+ End
+ ParticleSystem
+ Name = ReforgedBulletImpactDust
+ AtTarget = Yes
+ Radius = 0 4 UNIFORM
+ CreateAtGroundHeight = Yes
+ End
+End
+
+; ----------------------------------------------
+; Tank cannon. EA's "NoTracer" FXLists drew the muzzle and nothing in flight but the shell model,
+; a grey sliver smaller than a rifleman's head. Each one now sends a hot tracer with the shell,
+; at the weapon's own speed (no Speed line: the tracer takes the WeaponSpeed it is fired with),
+; and lights the ground around the muzzle further. The flame, flare and smoke are larger in
+; ParticleSystemReforged.ini.
+FXList WeaponFX_GenericTankGunNoTracer
+ ViewShake
+ Type = NORMAL
+ End
+ LightPulse
+ Color = R:255 G:255 B:128
+ Radius = 35
+ IncreaseTime = 0
+ DecreaseTime = 500
+ End
+ ParticleSystem
+ Name = TankMuzzleFlashSmoke
+ OrientToObject = Yes
+ End
+ ParticleSystem
+ Name = TankMuzzleFlashFlame
+ OrientToObject = Yes
+ End
+ ParticleSystem
+ Name = TankMuzzleFlare
+ OrientToObject = Yes
+ End
+ ParticleSystem
+ Name = TankMuzzleWave
+ OrientToObject = Yes
+ CreateAtGroundHeight = Yes
+ End
+ Tracer
+ DecayAt = 1
+ Length = 14
+ Width = 1.2
+ Color = R:255 G:210 B:140
+ End
+End
+
+; ----------------------------------------------
+FXList WeaponFX_GenericTankGunNoTracerSmall
+ ViewShake
+ Type = NORMAL
+ End
+ LightPulse
+ Color = R:255 G:255 B:128
+ Radius = 30
+ IncreaseTime = 0
+ DecreaseTime = 500
+ End
+ ParticleSystem
+ Name = TankSmallMuzzleFlashSmoke
+ OrientToObject = Yes
+ End
+ ParticleSystem
+ Name = TankSmallMuzzleFlashFlame
+ OrientToObject = Yes
+ End
+ ParticleSystem
+ Name = TankSmallMuzzleFlare
+ OrientToObject = Yes
+ End
+ Tracer
+ DecayAt = 1
+ Length = 12
+ Width = 1.0
+ Color = R:255 G:210 B:140
+ End
+End
+
+; ----------------------------------------------
+FXList WeaponFX_HeroicGenericTankGunNoTracer
+ ViewShake
+ Type = NORMAL
+ End
+ LightPulse
+ Color = R:128 G:0 B:0
+ Radius = 35
+ IncreaseTime = 0
+ DecreaseTime = 500
+ End
+ ParticleSystem
+ Name = HeroicTankMuzzleFlashSmoke
+ OrientToObject = Yes
+ End
+ ParticleSystem
+ Name = HeroicTankMuzzleFlashFlame
+ OrientToObject = Yes
+ End
+ ParticleSystem
+ Name = HeroicTankMuzzleFlare
+ OrientToObject = Yes
+ End
+ ParticleSystem
+ Name = TankMuzzleWave
+ OrientToObject = Yes
+ CreateAtGroundHeight = Yes
+ End
+ Tracer
+ DecayAt = 1
+ Length = 14
+ Width = 1.2
+ Color = R:255 G:90 B:60
+ End
+End
+
+; ----------------------------------------------
+FXList WeaponFX_HeroicGenericTankGunNoTracerSmall
+ ViewShake
+ Type = NORMAL
+ End
+ LightPulse
+ Color = R:255 G:255 B:128
+ Radius = 30
+ IncreaseTime = 0
+ DecreaseTime = 500
+ End
+ ParticleSystem
+ Name = TankSmallMuzzleFlashSmoke
+ OrientToObject = Yes
+ End
+ ParticleSystem
+ Name = TankSmallMuzzleFlashFlame
+ OrientToObject = Yes
+ End
+ ParticleSystem
+ Name = HeroicTankSmallMuzzleFlare
+ OrientToObject = Yes
+ End
+ Tracer
+ DecayAt = 1
+ Length = 12
+ Width = 1.0
+ Color = R:255 G:90 B:60
+ End
+End
diff --git a/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini b/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini
index a1752e722..e5cc577b0 100644
--- a/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini
+++ b/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini
@@ -3635,3 +3635,460 @@ ParticleSystem MineFXPurple
SlaveSystem = MineFXLightPurple
SlavePosOffset = X:0.00 Y:0.00 Z:0.60
End
+
+; Gunfire that reads at play zoom. EA's machine gun flash was a 10-unit flare gone in two frames,
+; and the tank's flame started half a unit across; at the default camera both were a few pixels.
+; These are EA's muzzle systems at about one and a half times the size, the machine gun flare held
+; one frame longer and the tank flame thrown further with more puffs. Every weapon that names one
+; of them gets it bigger, the Gattling building and the Quad Cannon included.
+
+ParticleSystem GattlingCannonLenzflare
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ADDITIVE
+ Type = PARTICLE
+ ParticleName = EXLnzFlar2.tga
+ AngleZ = -1.00 1.00
+ AngularRateZ = 0.00 0.00
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 1.00 1.00
+ Gravity = 0.00
+ Lifetime = 3.00 3.00
+ SystemLifetime = 1
+ Size = 16.00 16.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 3.00 3.00
+ SizeRateDamping = 1.00 1.00
+ Alpha1 = 1.00 1.00 0
+ Alpha2 = 0.00 0.00 3
+ Alpha3 = 0.00 0.00 0
+ Color1 = R:255 G:255 B:255 0
+ Color2 = R:255 G:255 B:255 1
+ Color3 = R:0 G:0 B:0 3
+ ColorScale = 0.00 0.00
+ BurstDelay = 0.00 0.00
+ BurstCount = 1.00 1.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.00
+ VelocityType = ORTHO
+ VelOrthoX = 0.00 0.00
+ VelOrthoY = 0.00 0.00
+ VelOrthoZ = 0.00 0.00
+ VolumeType = LINE
+ VolLineStart = X:1.00 Y:0.00 Z:0.00
+ VolLineEnd = X:2.00 Y:0.00 Z:0.00
+ IsHollow = Yes
+ IsGroundAligned = No
+ IsEmitAboveGroundOnly = No
+ IsParticleUpTowardsEmitter = No
+End
+
+ParticleSystem GattlingCannonLenzflareIntense
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ADDITIVE
+ Type = PARTICLE
+ ParticleName = EXLnzFlar2.tga
+ AngleZ = -1.00 1.00
+ AngularRateZ = 0.00 0.00
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 0.60 0.60
+ Gravity = 0.00
+ Lifetime = 5.00 5.00
+ SystemLifetime = 1
+ Size = 16.00 16.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 3.00 3.00
+ SizeRateDamping = 1.00 1.00
+ Alpha1 = 1.00 1.00 0
+ Alpha2 = 0.00 0.00 2
+ Alpha3 = 0.00 0.00 0
+ Color1 = R:255 G:255 B:255 0
+ Color2 = R:0 G:0 B:0 5
+ Color3 = R:0 G:0 B:0 0
+ ColorScale = 0.00 0.00
+ BurstDelay = 0.00 0.00
+ BurstCount = 1.00 1.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.00
+ VelocityType = ORTHO
+ VelOrthoX = 0.75 0.75
+ VelOrthoY = 0.00 0.00
+ VelOrthoZ = 0.00 0.00
+ VolumeType = LINE
+ VolLineStart = X:1.00 Y:0.00 Z:0.00
+ VolLineEnd = X:2.00 Y:0.00 Z:0.00
+ IsHollow = Yes
+ IsGroundAligned = No
+ IsEmitAboveGroundOnly = No
+ IsParticleUpTowardsEmitter = No
+End
+
+ParticleSystem HeroicGattlingCannonLenzflare
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ADDITIVE
+ Type = PARTICLE
+ ParticleName = EXLnzFlar4.tga
+ AngleZ = -1.00 1.00
+ AngularRateZ = 0.00 0.00
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 1.00 1.00
+ Gravity = 0.00
+ Lifetime = 3.00 3.00
+ SystemLifetime = 1
+ Size = 16.00 16.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 5.00 5.00
+ SizeRateDamping = 1.00 1.00
+ Alpha1 = 1.00 1.00 0
+ Alpha2 = 0.00 0.00 3
+ Alpha3 = 0.00 0.00 0
+ Color1 = R:255 G:255 B:255 0
+ Color2 = R:255 G:255 B:255 1
+ Color3 = R:0 G:0 B:0 3
+ ColorScale = 0.00 0.00
+ BurstDelay = 0.00 0.00
+ BurstCount = 1.00 1.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.00
+ VelocityType = ORTHO
+ VelOrthoX = 0.00 0.00
+ VelOrthoY = 0.00 0.00
+ VelOrthoZ = 0.00 0.00
+ VolumeType = LINE
+ VolLineStart = X:0.00 Y:0.00 Z:0.00
+ VolLineEnd = X:1.00 Y:0.00 Z:0.00
+ IsHollow = Yes
+ IsGroundAligned = No
+ IsEmitAboveGroundOnly = No
+ IsParticleUpTowardsEmitter = No
+End
+
+ParticleSystem TankMuzzleFlashFlame
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ADDITIVE
+ Type = PARTICLE
+ ParticleName = EXexplo03.tga
+ AngleZ = 0.00 7.00
+ AngularRateZ = 0.00 0.00
+ AngularDamping = 0.00 0.00
+ VelocityDamping = 0.50 0.90
+ Gravity = 0.00
+ Lifetime = 25.00 25.00
+ SystemLifetime = 10
+ Size = 1.50 1.50
+ StartSizeRate = 0.00 0.00
+ SizeRate = 2.00 3.50
+ SizeRateDamping = 0.93 0.95
+ Alpha1 = 0.00 0.00 0
+ Alpha2 = 0.00 0.00 0
+ Alpha3 = 0.00 0.00 0
+ Color1 = R:255 G:165 B:125 0
+ Color2 = R:0 G:0 B:0 25
+ Color3 = R:0 G:0 B:0 0
+ ColorScale = 0.00 0.00
+ BurstDelay = 99999.00 99999.00
+ BurstCount = 14.00 14.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.00
+ VelocityType = ORTHO
+ VelOrthoX = 3.00 7.00
+ VelOrthoY = 0.00 0.00
+ VelOrthoZ = 0.00 0.00
+ VolumeType = CYLINDER
+ VolCylinderRadius = 1.00
+ VolCylinderLength = 0.00
+ IsHollow = Yes
+ IsGroundAligned = No
+ IsEmitAboveGroundOnly = No
+ IsParticleUpTowardsEmitter = No
+End
+
+ParticleSystem TankMuzzleFlare
+ Priority = CRITICAL
+ IsOneShot = No
+ Shader = ADDITIVE
+ Type = PARTICLE
+ ParticleName = EXLnzFlar2.tga
+ AngleZ = 0.00 0.00
+ AngularRateZ = 0.00 0.00
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 0.70 0.70
+ Gravity = 0.00
+ Lifetime = 25.00 25.00
+ SystemLifetime = 1
+ Size = 56.00 56.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 20.00 20.00
+ SizeRateDamping = 0.70 0.70
+ Alpha1 = 0.00 0.00 0
+ Alpha2 = 0.00 0.00 0
+ Alpha3 = 0.00 0.00 0
+ Color1 = R:0 G:0 B:0 0
+ Color2 = R:253 G:253 B:253 5
+ Color3 = R:0 G:0 B:0 25
+ ColorScale = 0.00 0.00
+ BurstDelay = 1.00 1.00
+ BurstCount = 1.00 1.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.00
+ VelocityType = ORTHO
+ VelOrthoX = 4.00 4.00
+ VelOrthoY = 0.00 0.00
+ VelOrthoZ = 0.00 0.00
+ VolumeType = CYLINDER
+ VolCylinderRadius = 0.00
+ VolCylinderLength = 0.00
+ IsHollow = No
+ IsGroundAligned = No
+ IsEmitAboveGroundOnly = No
+ IsParticleUpTowardsEmitter = No
+End
+
+ParticleSystem TankMuzzleFlashSmoke
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ALPHA
+ Type = PARTICLE
+ ParticleName = EXSmokePuff.tga
+ AngleZ = 0.00 0.50
+ AngularRateZ = -0.01 0.01
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 0.80 0.85
+ Gravity = 0.01
+ Lifetime = 50.00 50.00
+ SystemLifetime = 10
+ Size = 2.00 2.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 3.00 6.00
+ SizeRateDamping = 0.90 0.93
+ Alpha1 = 0.60 0.75 0
+ Alpha2 = 0.00 0.00 50
+ Alpha3 = 0.00 0.00 0
+ Color1 = R:255 G:255 B:255 0
+ Color2 = R:36 G:36 B:36 0
+ Color3 = R:0 G:0 B:0 0
+ ColorScale = 0.00 0.00
+ BurstDelay = 99999.00 99999.00
+ BurstCount = 3.00 3.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:-0.20 Y:-0.20 Z:0.10
+ VelocityType = ORTHO
+ VelOrthoX = 0.00 -1.00
+ VelOrthoY = -2.00 2.00
+ VelOrthoZ = -1.00 -2.00
+ VolumeType = CYLINDER
+ VolCylinderRadius = 1.00
+ VolCylinderLength = 0.00
+ IsHollow = No
+ IsGroundAligned = No
+ IsEmitAboveGroundOnly = No
+ IsParticleUpTowardsEmitter = No
+End
+
+ParticleSystem TankSmallMuzzleFlashFlame
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ADDITIVE
+ Type = PARTICLE
+ ParticleName = EXexplo03.tga
+ AngleZ = 0.00 7.00
+ AngularRateZ = 0.00 0.00
+ AngularDamping = 0.00 0.00
+ VelocityDamping = 0.50 0.90
+ Gravity = 0.00
+ Lifetime = 25.00 25.00
+ SystemLifetime = 10
+ Size = 1.00 1.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 1.50 3.00
+ SizeRateDamping = 0.93 0.95
+ Alpha1 = 0.00 0.00 0
+ Alpha2 = 0.00 0.00 0
+ Alpha3 = 0.00 0.00 0
+ Color1 = R:255 G:238 B:198 0
+ Color2 = R:0 G:0 B:0 25
+ Color3 = R:0 G:0 B:0 0
+ ColorScale = 0.00 0.00
+ BurstDelay = 99999.00 99999.00
+ BurstCount = 6.00 6.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.00
+ VelocityType = ORTHO
+ VelOrthoX = 2.00 4.00
+ VelOrthoY = 0.00 0.00
+ VelOrthoZ = 0.00 0.00
+ VolumeType = CYLINDER
+ VolCylinderRadius = 1.00
+ VolCylinderLength = 0.00
+ IsHollow = Yes
+ IsGroundAligned = No
+ IsEmitAboveGroundOnly = No
+ IsParticleUpTowardsEmitter = No
+End
+
+ParticleSystem TankSmallMuzzleFlare
+ Priority = CRITICAL
+ IsOneShot = No
+ Shader = ADDITIVE
+ Type = PARTICLE
+ ParticleName = EXLnzFlar2.tga
+ AngleZ = 0.00 0.00
+ AngularRateZ = 0.00 0.00
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 0.70 0.70
+ Gravity = 0.00
+ Lifetime = 25.00 25.00
+ SystemLifetime = 1
+ Size = 32.00 32.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 12.00 12.00
+ SizeRateDamping = 0.70 0.70
+ Alpha1 = 0.00 0.00 0
+ Alpha2 = 0.00 0.00 0
+ Alpha3 = 0.00 0.00 0
+ Color1 = R:0 G:0 B:0 0
+ Color2 = R:206 G:206 B:206 5
+ Color3 = R:0 G:0 B:0 25
+ ColorScale = 0.00 0.00
+ BurstDelay = 1.00 1.00
+ BurstCount = 1.00 1.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.00
+ VelocityType = ORTHO
+ VelOrthoX = 2.00 2.00
+ VelOrthoY = 0.00 0.00
+ VelOrthoZ = 0.00 0.00
+ VolumeType = CYLINDER
+ VolCylinderRadius = 0.00
+ VolCylinderLength = 0.00
+ IsHollow = No
+ IsGroundAligned = No
+ IsEmitAboveGroundOnly = No
+ IsParticleUpTowardsEmitter = No
+End
+
+ParticleSystem TankSmallMuzzleFlashSmoke
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ALPHA
+ Type = PARTICLE
+ ParticleName = EXSmokePuff.tga
+ AngleZ = -5.00 5.00
+ AngularRateZ = -0.01 0.01
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 0.80 0.85
+ Gravity = 0.01
+ Lifetime = 30.00 30.00
+ SystemLifetime = 10
+ Size = 1.00 1.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 2.00 4.00
+ SizeRateDamping = 0.90 0.93
+ Alpha1 = 1.00 1.00 0
+ Alpha2 = 0.00 0.00 30
+ Alpha3 = 0.00 0.00 0
+ Color1 = R:255 G:255 B:255 0
+ Color2 = R:36 G:36 B:36 0
+ Color3 = R:0 G:0 B:0 0
+ ColorScale = 0.00 0.00
+ BurstDelay = 99999.00 99999.00
+ BurstCount = 2.00 2.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:-0.10 Y:-0.10 Z:0.10
+ VelocityType = ORTHO
+ VelOrthoX = 0.00 -1.00
+ VelOrthoY = -2.00 2.00
+ VelOrthoZ = -1.00 -2.00
+ VolumeType = CYLINDER
+ VolCylinderRadius = 1.00
+ VolCylinderLength = 0.00
+ IsHollow = No
+ IsGroundAligned = No
+ IsEmitAboveGroundOnly = No
+ IsParticleUpTowardsEmitter = No
+End
+
+; Where a machine gun bullet lands (FXListReforged.ini plays these AtTarget on every gun FX): a
+; short spray of EA's sparks, warm-tinted, and a puff of EA's dirt on the ground under the hit.
+
+ParticleSystem ReforgedBulletImpactSpark
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ADDITIVE
+ Type = PARTICLE
+ ParticleName = EXSpark02.tga
+ AngleZ = -5.00 5.00
+ AngularRateZ = 0.00 0.00
+ AngularDamping = 0.00 0.00
+ VelocityDamping = 0.85 0.85
+ Gravity = 0.00
+ Lifetime = 6.00 6.00
+ SystemLifetime = 1
+ Size = 2.00 2.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 1.00 2.00
+ SizeRateDamping = 0.90 0.90
+ Alpha1 = 0.00 0.00 0
+ Alpha2 = 0.00 0.00 0
+ Alpha3 = 0.00 0.00 0
+ Color1 = R:255 G:240 B:200 0
+ Color2 = R:0 G:0 B:0 6
+ Color3 = R:0 G:0 B:0 0
+ ColorScale = 0.00 0.00
+ BurstDelay = 0.00 0.00
+ BurstCount = 3.00 3.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.00
+ VelocityType = ORTHO
+ VelOrthoX = 0.00 0.00
+ VelOrthoY = -1.00 1.00
+ VelOrthoZ = 0.50 1.50
+ VolumeType = SPHERE
+ VolSphereRadius = 2.00
+ IsHollow = No
+ IsGroundAligned = No
+ IsEmitAboveGroundOnly = No
+ IsParticleUpTowardsEmitter = No
+End
+
+ParticleSystem ReforgedBulletImpactDust
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ALPHA
+ Type = PARTICLE
+ ParticleName = EXDrtExp01.tga
+ AngleZ = 0.00 0.00
+ AngularRateZ = -0.10 0.10
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 1.00 1.00
+ Gravity = -0.05
+ Lifetime = 18.00 18.00
+ SystemLifetime = 1
+ Size = 3.00 4.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 0.60 1.00
+ SizeRateDamping = 0.95 0.95
+ Alpha1 = 0.80 0.80 0
+ Alpha2 = 0.00 0.00 18
+ Alpha3 = 0.00 0.00 0
+ Color1 = R:170 G:150 B:120 0
+ Color2 = R:0 G:0 B:0 0
+ Color3 = R:0 G:0 B:0 0
+ ColorScale = 0.01 0.10
+ BurstDelay = 0.00 0.00
+ BurstCount = 1.00 1.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.00
+ VelocityType = ORTHO
+ VelOrthoX = -0.50 0.50
+ VelOrthoY = -0.50 0.50
+ VelOrthoZ = 0.50 1.00
+ VolumeType = POINT
+ IsHollow = No
+ IsGroundAligned = No
+ IsEmitAboveGroundOnly = No
+ IsParticleUpTowardsEmitter = No
+End
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/FXList.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/FXList.cpp
index ab9d38181..4ed406c78 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/FXList.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/FXList.cpp
@@ -572,12 +572,21 @@ public:
m_attachToObject = false;
m_createAtGroundHeight = FALSE;
m_useCallersRadius = FALSE;
+ m_atTarget = FALSE;
m_rotateX = m_rotateY = m_rotateZ = 0;
}
- virtual void doFXPos(const Coord3D *primary, const Matrix3D* primaryMtx, const Real /*primarySpeed*/, const Coord3D * /*secondary*/, const Real overrideRadius ) const
+ virtual void doFXPos(const Coord3D *primary, const Matrix3D* primaryMtx, const Real /*primarySpeed*/, const Coord3D *secondary, const Real overrideRadius ) const
{
- if (primary)
+ // AtTarget plays the system where the shot lands rather than at the muzzle: a FireFX is
+ // played with the victim's position as its secondary, the same point a Tracer flies to,
+ // and an instant-hit gun has no projectile to carry a detonation FX there.
+ if (m_atTarget)
+ {
+ DEBUG_ASSERTCRASH(secondary, ("ParticleSystem %s is AtTarget but the FX has no target\n", m_name.str()));
+ reallyDoFX(secondary, NULL, NULL, overrideRadius);
+ }
+ else if (primary)
{
reallyDoFX(primary, primaryMtx, NULL, overrideRadius);
}
@@ -633,6 +642,7 @@ public:
{ "AttachToObject", INI::parseBool, NULL, offsetof( ParticleSystemFXNugget, m_attachToObject ) },
{ "CreateAtGroundHeight", INI::parseBool, NULL, offsetof( ParticleSystemFXNugget, m_createAtGroundHeight ) },
{ "UseCallersRadius", INI::parseBool, NULL, offsetof( ParticleSystemFXNugget, m_useCallersRadius ) },
+ { "AtTarget", INI::parseBool, NULL, offsetof( ParticleSystemFXNugget, m_atTarget ) },
{ 0, 0, 0, 0 }
};
@@ -730,6 +740,7 @@ private:
Bool m_attachToObject;
Bool m_createAtGroundHeight;
Bool m_useCallersRadius;
+ Bool m_atTarget;
Bool m_ricochet;
};
EMPTY_DTOR(ParticleSystemFXNugget)
diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cpp
index 0328a960b..a308b72ef 100644
--- a/GeneralsMD/Code/Tests/test_gameengine.cpp
+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp
@@ -832,7 +832,9 @@ TEST(patch_of_a_missing_object_is_skipped)
pink death, which has none and is the one block the count leaves out. The Paladin's and the
Avenger's hard-kill charge added two of the fork's own, its launch and its blast, lit too.
The explosion pass added 22 more of EA's, from the structure deaths to the nukes, each with
- the light it lacked, and the point defense lasers' missile burst one of the fork's own. */
+ the light it lacked, and the point defense lasers' missile burst one of the fork's own.
+ The gunfire pass added 13 of EA's gun FXLists, wider tracers and AtTarget impacts, all of
+ which already had a muzzle light. */
static const char *const s_unlitReforgedFXList = "FXList SupW_FX_ParticleUplinkDeathInitial";
TEST(fxlist_reforged_ini_parses_and_keeps_its_light)
@@ -881,7 +883,7 @@ TEST(fxlist_reforged_ini_parses_and_keeps_its_light)
}
fclose( fp );
- CHECK_EQ( blocks, 113 );
+ CHECK_EQ( blocks, 126 );
CHECK_EQ( lit, blocks );
}