From 66ee75792656f71b65108b8fe4e3edca9169b1a7 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 21 May 2026 18:36:42 +0200 Subject: [PATCH] =?UTF-8?q?feat(physics):=20A6.P1=20=E2=80=94=20add=20LogP?= =?UTF-8?q?ushBackCellTransit=20helper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One-line per-iteration emission helper for the CheckOtherCells multi-cell BSP loop. Captures primary/other cell ids, BSP result, and halted flag for direct comparison to retail's CTransition::check_other_cells loop. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Physics/PhysicsDiagnostics.cs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/AcDream.Core/Physics/PhysicsDiagnostics.cs b/src/AcDream.Core/Physics/PhysicsDiagnostics.cs index 2cf8224..5942a19 100644 --- a/src/AcDream.Core/Physics/PhysicsDiagnostics.cs +++ b/src/AcDream.Core/Physics/PhysicsDiagnostics.cs @@ -386,6 +386,34 @@ public static class PhysicsDiagnostics walkInterpEntry, returnState)); } + /// + /// A6.P1 emission helper for the CheckOtherCells multi-cell + /// BSP iteration site. One line per off-cell hit: from-cell, to-cell, + /// BSP result (Ok / Adjusted / Slid / Collided), and the iteration + /// outcome. Direct paired comparison to retail's + /// CTransition::check_other_cells loop at decomp line + /// 272717. Augments the existing A4 multi-cell BSP instrumentation + /// with explicit per-iteration outcome telemetry. + /// + /// + /// Caller MUST guard with if (!ProbePushBackEnabled) return; + /// before calling. + /// + /// + public static void LogPushBackCellTransit( + uint primaryCellId, + uint otherCellId, + int bspResult, + bool halted) + { + var ci = System.Globalization.CultureInfo.InvariantCulture; + Console.WriteLine(string.Format(ci, + "[push-back-cell] site=other_cell " + + "primary=0x{0:X8} other=0x{1:X8} " + + "bspResult={2} halted={3}", + primaryCellId, otherCellId, bspResult, halted)); + } + public static void LogCpBoolWrite(string field, bool oldValue, bool newValue) { var caller = GetCpCallerName();