diff --git a/game/reconstructed/mech4.cpp b/game/reconstructed/mech4.cpp index a38e070..1447c0e 100644 --- a/game/reconstructed/mech4.cpp +++ b/game/reconstructed/mech4.cpp @@ -6618,23 +6618,46 @@ void { // COMMA-LIST (eject bench): "GeneratorA,GeneratorB,..." kills // each named subsystem; single-name behavior unchanged. + // PARTIAL form (leak bench, #119): "Condenser4=0.5" sets the + // subsystem's own zone to that LEVEL without the crit kill -- + // a deterministic LEAK source (damage x heatLoad drives the + // coolant draw), so the leak alarm/voice path is testable + // without waiting for random cook-offs. char want_list[256]; strncpy(want_list, getenv("BT_KILL_SUBSYS"), sizeof(want_list) - 1); want_list[sizeof(want_list) - 1] = 0; for (char *want = strtok(want_list, ","); want != 0; want = strtok(0, ",")) { + float partial = -1.0f; + char *eq = strchr(want, '='); + if (eq != 0) + { + *eq = 0; + partial = (float)atof(eq + 1); + } for (int i = 2; i < GetSubsystemCount(); ++i) { Subsystem *s = GetSubsystem(i); if (s == 0 || s->GetName() == 0) continue; if (stricmp(s->GetName(), want) != 0) continue; if (!s->IsDerivedFrom(MechSubsystem::ClassDerivations)) continue; - ((MechSubsystem *)s)->SetSubsystemDamageLevel(1.0f); - ((MechSubsystem *)s)->ForceCriticalFailure(); - DEBUG_STREAM << "[killsub] '" << s->GetName() - << "' force-destroyed (statusAlarm=1, zone=1.0)" - << std::endl << std::flush; + if (partial >= 0.0f) + { + ((MechSubsystem *)s)->SetSubsystemDamageLevel(partial); + DEBUG_STREAM << "[killsub] '" << s->GetName() + << "' PARTIAL zone=" << partial + << " (leak source, no crit)" + << std::endl << std::flush; + } + else + { + ((MechSubsystem *)s)->SetSubsystemDamageLevel(1.0f); + ((MechSubsystem *)s)->ForceCriticalFailure(); + DEBUG_STREAM << "[killsub] '" << s->GetName() + << "' force-destroyed (statusAlarm=1, zone=1.0)" + << std::endl << std::flush; + } break; } } diff --git a/game/reconstructed/mechtech.cpp b/game/reconstructed/mechtech.cpp index 2ac2f69..a667644 100644 --- a/game/reconstructed/mechtech.cpp +++ b/game/reconstructed/mechtech.cpp @@ -197,6 +197,15 @@ MechTech::MechTech( wooHooMinimumDuration = model->wooHooMinimumDuration; // res +0x34 -> this+0xF4 wooHooDurationRange = model->wooHooDurationRange; // res +0x38 -> this+0xF8 wooHooChance = model->wooHooChance; // res +0x3C -> this+0xFC + // DIAG (#119 leak-voice dig): the AUTHORED anti-spam latch tuning. + // No armer for the wooHoo latch exists anywhere in the flat export -- + // if the authored chance is 0 the latch was dormant in 4.10 too and + // the repeating warning voice under multiple leaks is AUTHENTIC. + if (getenv("BT_LAMP_LOG")) + DEBUG_STREAM << "[techstat] wooHoo authored: minDur=" + << wooHooMinimumDuration << " range=" << wooHooDurationRange + << " chance=" << wooHooChance + << " alarmModel=" << alarmModel << "\n" << std::flush; // // Walk the owner's subsystem roster and attach a monitor to every