diff --git a/game/reconstructed/mech4.cpp b/game/reconstructed/mech4.cpp index cd459ed..8674b6e 100644 --- a/game/reconstructed/mech4.cpp +++ b/game/reconstructed/mech4.cpp @@ -5627,7 +5627,12 @@ void // shooting us. (Live damage knocks the power bus down, which is exactly // the signal a respawn test is trying to read.) static int s_sdSpent = 0; - if (IsMechDestroyed()) + // Latch off at the VIEWPOINT mech's first death only. (The latch used + // to be fed by EVERY mech's update -- a mission that generated any + // destroyed mech/wreck entity tripped it at frame one and the harness + // silently never fired; random per mission roll.) + if ((Entity *)this == application->GetViewpointEntity() + && IsMechDestroyed()) s_sdSpent = 1; if ((Entity *)this == application->GetViewpointEntity() && getenv("BT_SELF_DAMAGE") && !s_sdSpent @@ -5635,6 +5640,20 @@ void { static float s_sdAccum = 0.0f; static int s_sdTicks = 0; + // BT_SELF_DAMAGE_DELAY=: hold the harness off for the first n + // seconds of the mission (capture/demo: healthy walking first). + static float s_sdDelay = -1.0f; + if (s_sdDelay < 0.0f) + { + const char *de = getenv("BT_SELF_DAMAGE_DELAY"); + s_sdDelay = (de != 0 && *de != '\0') ? (float)atof(de) : 0.0f; + } + if (s_sdDelay > 0.0f) + { + s_sdDelay -= dt; + if (s_sdDelay < 0.0f) s_sdDelay = 0.0f; // NOT below: <0 is the + s_sdAccum = 0.0f; // "read the env" sentinel -- + } // underflow re-armed the delay forever // BT_SELF_DAMAGE_TICKS=: stop after n hits (bench: ramp a leg // PAST LegHalfStructure then hold, so the limp window is unbounded // instead of the 1 s between half and destroyed at high dps). diff --git a/run/limpdemo.cmd b/run/limpdemo.cmd new file mode 100644 index 0000000..a3a0b7f --- /dev/null +++ b/run/limpdemo.cmd @@ -0,0 +1,20 @@ +@echo off +rem #78 OBS capture demo: Black Hawk walks ~12 s, right leg crosses half on +rem the FINAL damage tick (one clean trigger edge), then: klaxon, klaxon, +rem "REVERSE DISABLED" + the limp. Auto-walks via GOTO -- the only input +rem needed is V (or BACKTICK) once, for the 3rd-person chase view. +setlocal +set BT_FE_SOLO=1 +set BT_GOTO=8000 8000 +set BT_GOTO_THR=0.9 +set BT_SELF_DAMAGE=6 +set BT_SELF_DAMAGE_ZONE=18 +set BT_SELF_DAMAGE_TICKS=12 +set BT_SELF_DAMAGE_DELAY=30 +set BT_KEY_NOFOCUS=1 +cd /d "%~dp0..\content" +powershell -NoProfile -Command "(Get-Content DEV.EGG) -replace '^experience=.*','experience=novice' | Set-Content LIMPDEMO.EGG" +echo [limpdemo] auto-walk, 6x12 into zone 18 (crossing on the last tick), novice +"%~dp0..\build\Release\btl4.exe" -egg LIMPDEMO.EGG +del LIMPDEMO.EGG 2>nul +if errorlevel 1 pause