fix: roundInLane+ch 双重错开 + TargetY 分析
- stagger = (baseRoundInLane+ch)×CloudCoverInterval - 引擎 span=7.20s, Planner单元测试 span=7.27s - 2/3 击毁,第三架 FormationOffsetY 垂向偏移导致覆盖窗口缩短
This commit is contained in:
parent
0c9cdb7b82
commit
b596b4a791
@ -178,10 +178,9 @@ namespace CounterDrone.Core.Algorithms
|
|||||||
{
|
{
|
||||||
float offset = (eventIdx - (totalRoundsNeeded - 1) / 2f) * spacing;
|
float offset = (eventIdx - (totalRoundsNeeded - 1) / 2f) * spacing;
|
||||||
var fe = GenerateFireEventsAt(threat, c.Unit, c.AmmoType, ammo, env, offset, yLane, yLanes, formationWidth);
|
var fe = GenerateFireEventsAt(threat, c.Unit, c.AmmoType, ammo, env, offset, yLane, yLanes, formationWidth);
|
||||||
// 车道内序号 = 该车道已分配的弹药数
|
int baseRoundInLane = singleNeeded - laneNeeded[currentLane];
|
||||||
int roundInLane = singleNeeded - laneNeeded[currentLane];
|
|
||||||
foreach (var e in fe)
|
foreach (var e in fe)
|
||||||
e.FireTime = unitBaseTime + roundInLane * stagger;
|
e.FireTime = unitBaseTime + (baseRoundInLane + ch) * stagger;
|
||||||
fevents.AddRange(fe);
|
fevents.AddRange(fe);
|
||||||
eventIdx++;
|
eventIdx++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user