diff --git a/game/reconstructed/heatfamily_reslice.cpp b/game/reconstructed/heatfamily_reslice.cpp index 42dca35..c67f899 100644 --- a/game/reconstructed/heatfamily_reslice.cpp +++ b/game/reconstructed/heatfamily_reslice.cpp @@ -977,6 +977,22 @@ void BTRecomputeCondenserValves(Entity *owner) Derivation &condClass = *Condenser::GetClassDerivations(); int count = owner->GetSubsystemCount(); + // DIAG (BT_VALVE=): force every condenser's valve detent so the coolant/jam + // mechanic can be tested at a known coolant level (0=closed/uncooled .. 50=max). + { + const char *fv = getenv("BT_VALVE"); + if (fv && fv[0]) + { + int v = atoi(fv); + for (int i = 0; i < count; ++i) + { + Subsystem *s = owner->GetSubsystem(i); + if (s != 0 && s->IsDerivedFrom(condClass)) + ((Condenser *)s)->valveState = v; + } + } + } + // pass 1: total valve opening across all condensers int total = 0; for (int i = 0; i < count; ++i) diff --git a/game/reconstructed/projweap.cpp b/game/reconstructed/projweap.cpp index 9df8bfc..032adeb 100644 --- a/game/reconstructed/projweap.cpp +++ b/game/reconstructed/projweap.cpp @@ -517,6 +517,16 @@ void Logical ProjectileWeapon::CheckForJam() { + if (getenv("BT_JAM_LOG")) + DEBUG_STREAM << "[jam] " << GetName() + << " T=" << currentTemperature + << " degT=" << degradationTemperature + << " failT=" << failureTemperature + << " alarm=" << (int)heatAlarm.GetLevel() + << " liveFire=" << (int)LiveFireEnabled() + << " p=" << ((_DAT_004bc064 * currentTemperature) / failureTemperature) + << "\n" << std::flush; + if (!LiveFireEnabled()) // *(*(this+0xd0)+400)+0x25c return False;