Fix 1 (Gitea #12): disasm-exact ProjectileWeaponSimulation @004bbd04 + the dirty-bit sweep
Replace the RivetGun-modeled ProjectileWeaponSimulation body with the fully recovered binary machine (capstone disasm, every branch address-cited): - gate 1 @4bbd36: simulationState@0x40==1 (destroyed) || heatAlarm==FailureHeat || owner disabled -> recoil=rechargeRate + alarm 7 (was: simulationFlags==1) - gate 2 @4bbd71: bin alarm 2/3 or bin destroyed -> alarm 7 re-pinned per frame - Loaded @4bbec2: DENIED shots (viewFireEnable off / no owner target) blip SetLevel(4);SetLevel(2) and STAY LOADED, no ammo pull (the old FireWeapon early-returns under an unconditionally-cycling caller faked a full firing pip cycle -- the "missiles cycle but never launch" incident mechanic); the ammo pull is bin->FeedAmmo @4bbee6 in the CALLER; both updateModel|=1 marks (@4bbf05/@4bbf4c = ForceUpdate) bracket FireWeapon; recoil set @4bbf51 - Loading @4bbdd2: recoil bleeds ONLY here at electrical Ready and CLAMPS at 0 (it ran to -114 before); bin Loaded -> weapon Loaded - 7 @4bbe4d: binary-faithful roach motel (re-asserted unconditionally; recovery = ResetToInitialState only) - slot 17 @004b9c9c reconstructed as MechWeapon::ComputeOutputVoltage (rechargeLevel=(rechargeRate-recoil)/rechargeRate, Emitter overrides with @4ba738) and called from Loading/7 -- the launcher recharge dial ANIMATES (the old "authentically static" claim was wrong) FireWeapon bodies stripped to heat+spawn only per @004bcc60 (no view gate, no ConsumeRound, no recoil); ConsumeRound retired (not a binary method). Gotcha #20 sweep (all sites disasm-verified): simulationFlags|=0x1 == engine DelayWatchersFlag (audio watchers muted forever) removed everywhere -- projweap/mislanch fire marks, ProjectileWeapon::ResetToInitialState (@4bbb47 = updateModel|=1); Emitter::SetDirty retired and split per binary site into ForceUpdate() (@4bafaa/@4ba55d) vs ExecuteOnUpdate() (@4ba99a/@4ba943); Emitter fault gate GetFlags()==1 -> simulationState==1 (@4baab9). AmmoBin::GetAmmoState() accessor added (named-member read of ammoAlarm@0x1A8). BT_LOOK_TEST=<frame> scripted verify added (mech4.cpp): holds the rear-view button 300f on/300f off to drive viewFireEnable headlessly. Verified solo ARENA1 (bhk1, autofire): 54-60 [projectile] PUSH + impact smoke; look-back denial window = trigger pulses, state stays 2, zero launches, resumes on release; enemy (disabled) mech launchers pinned 7 + full recoil; STREAK-6 recharge dial sweeps across BT_SHOT frames; lasers fire throughout; zero gauge faults. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
2215932016
commit
2edde29671
@@ -2698,6 +2698,28 @@ void
|
||||
// button (releases back to the forward view). Rear-mounted
|
||||
// weapons (blackhawk/owens back racks) fire only in it.
|
||||
gBTLookBehind = gBTInput.lookBehind;
|
||||
// Gitea #12 scripted verify (BT_LOOK_TEST=<frame>): from the
|
||||
// given frame, HOLD the rear-view button for 300 frames /
|
||||
// release 300, repeating -- drives the authentic look-state
|
||||
// chain (mapper -> BTCommitLookState -> viewFireEnable) so
|
||||
// the recovered denied-shot blip (front weapons stay Loaded,
|
||||
// launch NOTHING while looking back) is verifiable headless.
|
||||
{
|
||||
static int sLookTestFrom = -2;
|
||||
if (sLookTestFrom == -2)
|
||||
{
|
||||
const char *lt = getenv("BT_LOOK_TEST");
|
||||
sLookTestFrom = (lt != 0) ? atoi(lt) : -1;
|
||||
}
|
||||
if (sLookTestFrom >= 0)
|
||||
{
|
||||
static int sLookFrame = 0;
|
||||
++sLookFrame;
|
||||
if (sLookFrame >= sLookTestFrom
|
||||
&& (((sLookFrame - sLookTestFrom) / 300) % 2) == 0)
|
||||
gBTLookBehind = 1;
|
||||
}
|
||||
}
|
||||
static float sTwist = 0.0f;
|
||||
if (gBTInput.twistAbsolute)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user