fix(ground-ai): improve firing on the move
Share a distance-based speed cap between tactics and the fire gate. Brake toward it and try a short halt when speed or aim keeps blocking a ready shot. Measure tracking drift relative to the aim direction and use the close-range alignment window for quick shots. Expose the controls in the launcher and record measured and permitted speeds in diagnostics. Verified both TypeScript typechecks, 2.61.0.58 and 2.61.0.60 patch checks and builds, and daScript loading in the guarded 2.61.0.58 client.
This commit is contained in:
1 parent
0167c3ea7d
commit
688406bb76
17 files changed
+218
-114
No files matched your search
@@ -190,6 +190,7 @@ function readNavigationSection(nav: TuningReader): GroundAiTuning['navigation']
|
||||
deadEchoSec: nav.number('deadEchoSec', { min: 0.3, max: 10 }),
|
||||
controlTimeoutSec: nav.number('controlTimeoutSec', { min: 0.3, max: 10 }),
|
||||
cornerBrakeAccel: nav.number('cornerBrakeAccel', { min: 0.5, max: 8 }),
|
||||
movingFireSpeedRampMps: nav.number('movingFireSpeedRampMps', { min: 0.2, max: 5 }),
|
||||
pivotAngleDeg: nav.number('pivotAngleDeg', { min: 25, max: 150 }),
|
||||
stuckWindowSec: nav.number('stuckWindowSec', { min: 1, max: 15 }),
|
||||
stuckMinMoveM: nav.number('stuckMinMoveM', { min: 0.5, max: 10 }),
|
||||
@@ -221,6 +222,7 @@ function readStateMachineSection(sm: TuningReader): GroundAiTuning['stateMachine
|
||||
}
|
||||
return {
|
||||
preaimAngleDeg: sm.number('preaimAngleDeg', { min: 1.0, max: 30.0 }),
|
||||
movingShotWaitSec: sm.number('movingShotWaitSec', { min: 0.25, max: 5.0 }),
|
||||
shortHaltMaxSec: sm.number('shortHaltMaxSec', { min: 0.5, max: 12.0 }),
|
||||
shortHaltCooldownSec: sm.number('shortHaltCooldownSec', { min: 0.5, max: 20.0 }),
|
||||
turnLaunchSpeedMps: sm.number('turnLaunchSpeedMps', { min: 0.5, max: 6.0 }),
|
||||
@@ -283,6 +285,11 @@ function readFireControlSection(fc: TuningReader): GroundAiTuning['fireControl']
|
||||
if (midRangeM <= closeRangeM || longRangeM <= midRangeM) {
|
||||
throw new TuningError('tuning file ground-ai.jsonc: fireControl ranges must satisfy closeRangeM < midRangeM < longRangeM');
|
||||
}
|
||||
const closeRangeMaxSpeedKmh = fc.number('closeRangeMaxSpeedKmh', { min: 3.6, max: 100 });
|
||||
const pointBlankMaxSpeedKmh = fc.number('pointBlankMaxSpeedKmh', { min: 3.6, max: 100 });
|
||||
if (pointBlankMaxSpeedKmh < closeRangeMaxSpeedKmh) {
|
||||
throw new TuningError('tuning file ground-ai.jsonc: fireControl.pointBlankMaxSpeedKmh must be >= closeRangeMaxSpeedKmh');
|
||||
}
|
||||
return {
|
||||
maxEngageRangeM: fc.number('maxEngageRangeM', { min: 150, max: 3000 }),
|
||||
closeRangeM,
|
||||
@@ -290,6 +297,8 @@ function readFireControlSection(fc: TuningReader): GroundAiTuning['fireControl']
|
||||
longRangeM,
|
||||
midSlowSpeedRatio: fc.number('midSlowSpeedRatio', { min: 0.1, max: 1.0 }),
|
||||
midSlowMaxMps: fc.number('midSlowMaxMps', { min: 1.0, max: 15.0 }),
|
||||
closeRangeMaxSpeedKmh,
|
||||
pointBlankMaxSpeedKmh,
|
||||
stopSpeedMaxMps: fc.number('stopSpeedMaxMps', { min: 0.1, max: 2.0 }),
|
||||
longRangeWindowSec: fc.number('longRangeWindowSec', { min: 1.0, max: 15.0 }),
|
||||
baseAlignDeg: fc.number('baseAlignDeg', { min: 0.1, max: 3.0 }),
|
||||
|
||||
Reference in new issue
Block a user