SimulationEngine cleanup: 删硬编码弹药fallback + 释放高度用配置值
This commit is contained in:
parent
6a184d9bf8
commit
c9c2a75328
@ -41,6 +41,7 @@ namespace CounterDrone.Core.Simulation
|
||||
private List<ControlZoneEntity> _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
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user