From c4c51545fcc44d4ebd696f7adb21d9697ade4d56 Mon Sep 17 00:00:00 2001 From: arcattack Date: Tue, 14 Jul 2026 07:38:47 -0500 Subject: [PATCH] Diag: BT_TEMPBAR_LOG -- verify the subsystem temperature-bar cluster renders live Logs each SubsystemCluster::Execute's drawn CurrentTemperature vs the degradation/ failure thresholds + drawState. Confirmed (BT_DEV_GAUGES + madcat + autofire): the per-subsystem temperature bars build lazily on the engineering MFD screen, execute live with animating values (weapons heat toward the 1000K degradation line = the jam threshold) and correct 1000/2000 markers, drawState=0 online. No behavior change (env). Co-Authored-By: Claude Fable 5 --- game/reconstructed/btl4gau2.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/game/reconstructed/btl4gau2.cpp b/game/reconstructed/btl4gau2.cpp index 9fb51f1..ace13f7 100644 --- a/game/reconstructed/btl4gau2.cpp +++ b/game/reconstructed/btl4gau2.cpp @@ -1411,6 +1411,21 @@ void SubsystemCluster::Execute() failedState = (BTSubsystemDamageLevelOf(subsystem) >= 1.0f); } + if (getenv("BT_TEMPBAR_LOG")) + { + Scalar *t = (Scalar *)AttributePointerOf(subsystem, "CurrentTemperature"); + Scalar *dg = (Scalar *)AttributePointerOf(subsystem, "DegradationTemperature"); + Scalar *fl = (Scalar *)AttributePointerOf(subsystem, "FailureTemperature"); + static int s_tbN = 0; + if (t != 0 && ((++s_tbN) % 30) == 0) + DEBUG_STREAM << "[tempbar] cluster EXECUTING " + << (subsystem ? ((Subsystem *)subsystem)->GetName() : "?") + << " T=" << *t + << " degT=" << (dg ? *dg : -1.0f) + << " failT=" << (fl ? *fl : -1.0f) + << " drawState=" << GetDrawState() << "\n" << std::flush; + } + int state = GetDrawState(); if (state != previousDrawState) {