diff --git a/src/CounterDrone.Core/Simulation/SimulationEngine.cs b/src/CounterDrone.Core/Simulation/SimulationEngine.cs index e72d02f..c1c316f 100644 --- a/src/CounterDrone.Core/Simulation/SimulationEngine.cs +++ b/src/CounterDrone.Core/Simulation/SimulationEngine.cs @@ -41,6 +41,7 @@ namespace CounterDrone.Core.Simulation private List _zones = new(); private CombatScene _scene = new(); + private float _disperseHeight = 300f; private AmmunitionSpec _ammoSpec = new(); private int _tickRate = 20; @@ -82,6 +83,7 @@ namespace CounterDrone.Core.Simulation if (config == null) throw new InvalidOperationException("Task not found"); _scene = config.Scene; + _disperseHeight = (float)config.Cloud.DisperseHeight; _tickRate = config.Task.TickRate; _tickInterval = 1.0f / _tickRate; @@ -157,8 +159,7 @@ namespace CounterDrone.Core.Simulation platform.AerosolType ?? Models.AerosolType.InertGas, platform.PosX, platform.PosY, platform.PosZ, fe.TargetX, fe.TargetY, fe.TargetZ, - fe.MuzzleVelocity, - (float)_ammoSpec.InitialRadius > 0 ? 300f : 300f); + fe.MuzzleVelocity, _disperseHeight); _munitions.Add(m); frameEvents.Add(new SimEvent {