Fix BT_SPAWN_AT terrain embed + add BT_COOL_LOG probe
BT_SPAWN_AT teleport set only X/Z, keeping the old (dropzone) Y -- so teleporting to a new spot embedded the mech in sloped terrain (user-reported). Lift the teleport +500 above the old elevation so the authentic per-frame ground SNAP (BoxTree FindBoundingBoxUnder, no gravity) settles it onto the surface next frame (the snap only lowers, so it must start above the surface). Diagnostic only. Also BT_COOL_LOG (heat.cpp): logs a heat subsystem's damageLevel/heatLoad/coolantDraw when it carries damage -- for the 'do damaged mechs leak coolant' investigation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
b533725ae4
commit
530bbeb959
@@ -818,6 +818,15 @@ void
|
||||
coolantDraw = 0.0f;
|
||||
}
|
||||
|
||||
// DIAG (BT_COOL_LOG): fire whenever THIS heat subsystem carries any damage --
|
||||
// answers "does damaging a mech drain its coolant?". Shows the damageLevel the
|
||||
// leak reads (@0xE0), the heat load, the resulting draw, and the live level.
|
||||
if (getenv("BT_COOL_LOG") && zoneDamage > 0.001f)
|
||||
DEBUG_STREAM << "[cool] " << GetName() << " dmg=" << zoneDamage
|
||||
<< " heatLoad=" << heatLoad << " draw=" << coolantDraw
|
||||
<< " coolantLevel=" << coolantLevel << "/" << thermalCapacity
|
||||
<< "\n" << std::flush;
|
||||
|
||||
Scalar amount = coolantDraw * time_slice;
|
||||
if (coolantLevel < amount)
|
||||
{
|
||||
|
||||
@@ -2376,6 +2376,13 @@ void
|
||||
s_spawnAt = 2;
|
||||
localOrigin.linearPosition.x = s_sx;
|
||||
localOrigin.linearPosition.z = s_sz;
|
||||
// FIX (user-reported: teleport embeds the mech in sloped terrain):
|
||||
// BT_SPAWN_AT set only X/Z, keeping the OLD (dropzone) Y -- wrong for
|
||||
// the new ground height. Lift the mech WELL ABOVE local terrain so the
|
||||
// authentic per-frame ground SNAP (BoxTree FindBoundingBoxUnder, no
|
||||
// gravity) settles it onto the surface next frame. The snap only
|
||||
// lowers, so it must start above the surface, not below.
|
||||
localOrigin.linearPosition.y += 500.0f;
|
||||
if (s_haveH)
|
||||
{
|
||||
gDriveHeading = s_sh;
|
||||
|
||||
Reference in New Issue
Block a user