feat(physics): A6.P1 — add LogPushBackDispatch helper
One-line per-call emission helper for the FindCollisions dispatcher instrumentation site. Captures path-selection state (collide flag, insertType, objState) + walk-interp + return state for direct comparison to retail's BSPTREE::find_collisions breakpoint. Output uses the [push-back-disp] tag to disambiguate from [push-back] adjust-sphere events. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
eb8a3186e7
commit
2d1f27d647
1 changed files with 38 additions and 0 deletions
|
|
@ -348,6 +348,44 @@ public static class PhysicsDiagnostics
|
|||
dpPos, dpMove, iDist, applied));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A6.P1 emission helper for the <c>FindCollisions</c> dispatcher
|
||||
/// site. One line per call: input sphere center, movement vector,
|
||||
/// path-selection state flags (collide / insertType / objState),
|
||||
/// walk-interp at entry, and the return state. Direct paired
|
||||
/// comparison to retail's cdb breakpoint on
|
||||
/// <c>BSPTREE::find_collisions</c>.
|
||||
///
|
||||
/// <para>
|
||||
/// Caller MUST guard with <c>if (!ProbePushBackEnabled) return;</c>
|
||||
/// before calling.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void LogPushBackDispatch(
|
||||
Vector3 sphereCenter,
|
||||
Vector3 movement,
|
||||
bool collide,
|
||||
int insertType,
|
||||
int objState,
|
||||
float walkInterpEntry,
|
||||
int returnState)
|
||||
{
|
||||
// Output format mirrors LogPushBackAdjust: single string.Format
|
||||
// with CultureInfo.InvariantCulture so the F4 / hex formatting is
|
||||
// locale-independent and the output is greppable.
|
||||
var ci = System.Globalization.CultureInfo.InvariantCulture;
|
||||
Console.WriteLine(string.Format(ci,
|
||||
"[push-back-disp] site=dispatch " +
|
||||
"center=({0:F4},{1:F4},{2:F4}) " +
|
||||
"mvmt=({3:F4},{4:F4},{5:F4}) " +
|
||||
"collide={6} insertType={7} objState=0x{8:X} " +
|
||||
"winterp={9:F4} return={10}",
|
||||
sphereCenter.X, sphereCenter.Y, sphereCenter.Z,
|
||||
movement.X, movement.Y, movement.Z,
|
||||
collide, insertType, objState,
|
||||
walkInterpEntry, returnState));
|
||||
}
|
||||
|
||||
public static void LogCpBoolWrite(string field, bool oldValue, bool newValue)
|
||||
{
|
||||
var caller = GetCpCallerName();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue