cadence census item 5: ring registry productionized -- the 16-slot bench-era fixed registry becomes the heat.cpp #119 static-map pattern (unbounded, per-instance, no layout growth). The old registry's silent overflow would have reverted a 17th mech to render-cadence |a| sampling with zero receipts -- exactly the failure class gotcha 32 exists to kill. Smoke bench (identical rig to the sway run): instab median 0.130 vs 0.109, |a| p90 13.8 vs 14.5 -- the same 28Hz signature within run-to-run noise, nowhere near the render-cadence control (16.8/48).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bw71WVsccjwW7uKRg4aWD
This commit is contained in:
Joe DiPrima
2026-08-13 19:54:24 -05:00
co-authored by Claude Fable 5
parent f811c64590
commit 567ffacaae
+14 -25
View File
@@ -159,6 +159,7 @@
#include <matchlog.hpp> // MP match forensics (DEATH/PROJ/SPLASH/RAM event lines)
#include "btinput.hpp" // the CONTROLS.MAP + XInput binding engine
#include <string.h> // [aud-tail] strchr -- BT_FIRE_PULSE "on,off" parse (Gitea #5, instrumentation only)
#include <map> // the ring 28Hz dt-accumulator registry (heat.cpp #119 pattern, census item 5)
#if !defined(PLAYER_HPP)
# include <player.hpp> // Player::VehicleDeadMessage -- the death->respawn notification (task #52)
#endif
@@ -8813,32 +8814,20 @@ void
}
if (s_ringHz > 0.0f)
{
// per-instance dt accumulator (tiny fixed registry -- bench
// scaffolding; a solo bench has one mech, MP a handful)
static const void *s_raKey[16];
static Scalar s_raAcc[16];
int slot = -1, freeSlot = -1;
for (int k = 0; k < 16; ++k)
// per-instance dt accumulator -- the heat.cpp #119 static-map
// pattern (unbounded, keyed per instance, no layout growth).
// Replaces the bench-era 16-slot fixed registry, whose silent
// overflow would have reverted a 17th mech to render-cadence
// sampling (cadence census item 5, night17).
static std::map<const void *, Scalar> s_ringClock;
Scalar &acc = s_ringClock[this];
acc += dt;
if (acc < 1.0f / s_ringHz)
ringPush = 0;
else
{
if (s_raKey[k] == (const void *)this) { slot = k; break; }
if (s_raKey[k] == 0 && freeSlot < 0) freeSlot = k;
}
if (slot < 0 && freeSlot >= 0)
{
slot = freeSlot;
s_raKey[slot] = (const void *)this;
s_raAcc[slot] = 0.0f;
}
if (slot >= 0)
{
s_raAcc[slot] += dt;
if (s_raAcc[slot] < 1.0f / s_ringHz)
ringPush = 0;
else
{
ringDt = s_raAcc[slot];
s_raAcc[slot] = 0.0f;
}
ringDt = acc;
acc = 0.0f;
}
}
}