fix(#171): sticky deep-overlap back-off sign pin — the runaway-to-center (gate-2 residual)
Gate 2: pack behavior good except "sometimes the monster is in the character / too close vs retail". The ACDREAM_PROBE_STICKY capture nailed it frame-by-frame: 1661 deep-overlap AdjustOffset ticks, ALL steering inward (dist -0.65 -> -0.78 -> ... -> -1.9 at +0.13/tick), monsters converging to centerDist~0 — while the suppressed-snap lines show ACE's authoritative positions stayed properly OUTSIDE (drift up to 7.7 m). The radii were correct (tgtR=0.68, ownR=0.59-0.98). Root cause: ACE's literal decode of StickyManager::adjust_offset (`if (delta >= |dist|) delta = dist;`) leaves delta POSITIVE when the overlap exceeds one tick's step — steering TOWARD the target center, a runaway whose equilibrium is centers-coincident. ACE servers virtually never reach that branch (quantum >=1/30 -> threshold ~1 m); at render-rate quanta the threshold is ~0.13 m and pack jostle trips it constantly. The BN mush (0x00555554-0x00555597) is unreadable on exactly this compare; the retail oracle (side-by-side on the same ACE: monsters separate) refutes the ACE-literal reading. Pin: sign-correct clamp — `else if (dist < 0) delta = -delta` (back off rate-limited). Identical to ACE-literal in every shallow/outside case. Register row AP-82 (same commit) with the cdb verification note. Conformance: StickyManagerTests.AdjustOffset_DeepOverlap_BacksOff_ RateLimited. Full suite 4039 green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
7a82317614
commit
699669502c
3 changed files with 40 additions and 1 deletions
|
|
@ -191,6 +191,26 @@ public sealed class StickyManagerTests
|
|||
Assert.Equal(-0.4f, frame.Origin.X, 3);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AdjustOffset_DeepOverlap_BacksOff_RateLimited()
|
||||
{
|
||||
var world = new Dictionary<uint, R5Host>();
|
||||
var self = new R5Host(10u, world) { Radius = 0.5f, MinterpMaxSpeed = 1.0f };
|
||||
var target = new R5Host(20u, world);
|
||||
// centerDist 0.1 → cyl = 0.1-0.5-0.5 = -0.9, minus 0.3 → dist = -1.2
|
||||
// (overlap DEEPER than one tick's step).
|
||||
var sticky = StuckAndInitialized(self, target, new Vector3(0.1f, 0f, 0f));
|
||||
|
||||
var frame = new MotionDeltaFrame();
|
||||
sticky.AdjustOffset(frame, quantum: 0.1);
|
||||
|
||||
// delta = 5*0.1 = 0.5 < |dist|=1.2 — ACE's literal branch kept +0.5
|
||||
// here (INWARD: the #171 gate-3 runaway-to-center; 1661 probe ticks,
|
||||
// all inward, equilibrium at centers-coincident). The sign pin backs
|
||||
// off rate-limited: dir +X × −0.5.
|
||||
Assert.Equal(-0.5f, frame.Origin.X, 3);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AdjustOffset_UsesCachedPosition_WhenTargetUnresolvable()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue