diff --git a/game/reconstructed/heat.cpp b/game/reconstructed/heat.cpp index e79fcd4..c373d2b 100644 --- a/game/reconstructed/heat.cpp +++ b/game/reconstructed/heat.cpp @@ -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) { diff --git a/game/reconstructed/mech4.cpp b/game/reconstructed/mech4.cpp index 5f84b27..3d5cdf8 100644 --- a/game/reconstructed/mech4.cpp +++ b/game/reconstructed/mech4.cpp @@ -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;