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
@@ -557,6 +557,24 @@ Logical
|
||||
return edge;
|
||||
}
|
||||
|
||||
//
|
||||
// @004b9c9c -- vtable slot 17 (vtbl+0x44): the recharge-dial writer (Gitea #12).
|
||||
// Disasm (tools/disas2.py 0x4b9c9c):
|
||||
// fld [eax+0x3dc] ; rechargeRate
|
||||
// fsub [eax+0x3e8] ; - recoil
|
||||
// fdiv [eax+0x3dc] ; / rechargeRate
|
||||
// fstp [eax+0x320] ; -> rechargeLevel
|
||||
// ProjectileWeaponSimulation @004bbd04 dispatches this from its Loading(3) and
|
||||
// unavailable(7) cases, so the launcher-panel recharge dial (SegmentArc270 on
|
||||
// PercentDone/rechargeLevel) is authentically ANIMATED for projectile weapons.
|
||||
// Emitter overrides the slot with ComputeOutputVoltage @004ba738.
|
||||
//
|
||||
void
|
||||
MechWeapon::ComputeOutputVoltage()
|
||||
{
|
||||
rechargeLevel = (rechargeRate - recoil) / rechargeRate; // @0x320 = (@0x3DC - @0x3E8) / @0x3DC
|
||||
}
|
||||
|
||||
//
|
||||
// @004b9cbc -- copy the owning Mech's current target position (entity+0x1c4).
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user