MP task #47: DISPROVE the Entity-layout root cause; correct the record
The prior commit (c78662a) filed cross-pod damage failure under a "cross-TU Entity/EntityID layout divergence" (and the P5 base-region audit). A compile-time offsetof probe injected into BOTH translation units disproves that: game/reconstructed AND engine/MUNGA compute an IDENTICAL Entity layout -- sizeof(Entity)=444 offsetof(entityID)=380 (0x17C) offsetof(ownerID)=388 offsetof(simulationFlags)=32 offsetof(Mech,entityID)=380 (Entity subobject at 0) So Entity::Dispatch reads this->entityID at the SAME offset mech4's GetEntityID() does -- there is no per-TU read difference, and the logged 3:22 (mech4 candidate) vs 3:19 (engine Dispatch) cannot be one object read two ways. Those lines were different objects/messages, mis-correlated. The distinct, REAL P5 "base-region layout divergence" (HARD_PROBLEMS.md) is about raw-offset stomps at this+0x2d4..0x2f0 -- far above entityID -- and is unrelated to #47. Changes: - Revert the committed BT_MP_NET engine diagnostics (ENTITY/EVENT/ NTTMGR/RECEIVER/L4NET) to the cleana9c3e96baseline -- those are the very instruments that produced the mis-correlated data. - mech4 BT_MP_FORCE_DMG hook: dispatch via the real m->Dispatch(&td) path (no false id stamping); comment records the offsetof finding. - context/multiplayer.md: layout-divergence RULED OUT; 3:22/3:19 marked unconfirmed; leading hypotheses reframed as H2 (wire host-relative (de)serialization) vs H3 (replicant id != master's registered key), to be distinguished by a 2-node run with per-message correlation. Solo un-regressed (mech walks + targets, 0 faults). Cross-pod delivery remains open, but the investigation is redirected off the wrong (large, structural) layout-audit path onto the EntityID wire/id-assignment path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
c78662a0f1
commit
04a2049ce2
@@ -2390,6 +2390,10 @@ void
|
||||
static float s_candLog = 0.0f; s_candLog += dt;
|
||||
const int candLog = (getenv("BT_MP_LOG") && s_candLog >= 1.0f);
|
||||
if (candLog) s_candLog = 0.0f;
|
||||
if (candLog)
|
||||
DEBUG_STREAM << "[mp-self] MY mech entityID=" << GetEntityID()
|
||||
<< " inst=" << (int)GetInstance() << " (" << nc << " candidates)\n"
|
||||
<< std::flush;
|
||||
if (candLog)
|
||||
for (int ci = 0; ci < nc; ++ci)
|
||||
{
|
||||
@@ -2405,10 +2409,16 @@ void
|
||||
<< " zones=" << m->damageZoneCount << "\n" << std::flush;
|
||||
}
|
||||
|
||||
// CROSS-POD DAMAGE PROOF HOOK (BT_MP_FORCE_DMG, task #46): once a
|
||||
// second, dispatch a real TakeDamage at the first live REPLICANT
|
||||
// candidate -- isolating the Dispatch-reroute-to-owning-master path
|
||||
// from the MP interactive aim/drive plumbing.
|
||||
// CROSS-POD DAMAGE PROOF HOOK (BT_MP_FORCE_DMG, task #46/#47): once a
|
||||
// second, dispatch a real unaimed TakeDamage at the first live
|
||||
// REPLICANT candidate through the SAME engine path a beam hit uses
|
||||
// (Entity::Dispatch -> replicant reroute -> SendMessage(ownerID)).
|
||||
// This isolates the cross-pod delivery from the interactive aim/drive
|
||||
// plumbing so a 2-node test can watch the wire without having to line
|
||||
// up a boresight. It does NOT stamp/patch the id -- Entity::Dispatch
|
||||
// reads this->entityID at offset 0x17C, which the [mp-layout] probe
|
||||
// proved is IDENTICAL in the reconstructed and engine TUs (both 380,
|
||||
// sizeof(Entity)=444), so no cross-TU translation is needed or done.
|
||||
if (getenv("BT_MP_FORCE_DMG"))
|
||||
{
|
||||
static float s_fd = 0.0f; s_fd += dt;
|
||||
@@ -2430,11 +2440,10 @@ void
|
||||
Entity::TakeDamageMessageID,
|
||||
sizeof(Entity::TakeDamageMessage),
|
||||
GetEntityID(), -1, dmg);
|
||||
DEBUG_STREAM << "[mp-force] PRE m->GetEntityID()=" << m->GetEntityID()
|
||||
<< " td.entityID=" << td.entityID << "\n" << std::flush;
|
||||
((Entity *)m)->Dispatch(&td);
|
||||
DEBUG_STREAM << "[mp-force] POST td.entityID=" << td.entityID
|
||||
<< " (== what Dispatch put on the wire)\n" << std::flush;
|
||||
DEBUG_STREAM << "[mp-force] " << (void*)m
|
||||
<< " Dispatch unaimed TakeDamage id=" << m->GetEntityID()
|
||||
<< " ownerID=" << (int)m->GetOwnerID() << "\n" << std::flush;
|
||||
m->Dispatch(&td);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user