MP cross-pod damage ROOT-CAUSED: EntityID localID corrupted by hostID on the wire (task #47)
Traced the dispatched-message delivery end to end with BT_MP_NET / BT_MP_FORCE_DMG. Everything works except one wire step: - A's Entity::Dispatch reroutes the replicant's TakeDamage (application->SendMessage(ownerID=3, EntityManager, msg)); POST-Dispatch the message carries entityID=3:22 (host:local) -- the replicant's own ID, matching B's master (GetEntityID()==3:22). VERIFIED sent. - On B the message ARRIVES, GetEntityPointer finds an entity, Posts it, the event drains (ProcessEventTask = ProcessOneEvent(0)), Event::Process runs, Receive finds+calls a handler. VERIFIED the full deliver chain. - BUG: B receives entityID=3:19, NOT 3:22 -- the localID dropped by exactly the hostID (3) between A's send and B's receive. So GetEntityPointer(3:19) returns the WRONG entity (classID 48, not the mech 0xBB9), whose base handler ignores the unaimed hit -> 0 damage. Auto-replicated UPDATE records (msgID 18) arrive with the correct 3:22 and find the mech, so the corruption is specific to the dispatched- message wire path/direction. Next: the host-relative EntityID (de)serialization on the dispatched-msg path (RoutePacket / packet EntityID encoding) -- diff vs the update path which translates correctly. Diagnostics retained (all BT_MP_NET-gated, off in solo -- verified: solo 22 hits, 0 probe noise). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
a9c3e96f20
commit
c78662a0f1
@@ -548,6 +548,17 @@ void
|
||||
Mech::TakeDamageMessageHandler(TakeDamageMessage *message)
|
||||
{
|
||||
Check(message);
|
||||
|
||||
// MP DIAGNOSTIC (task #47): confirm the handler runs on the OWNING MASTER
|
||||
// for a cross-pod (network-delivered) TakeDamage + what state it carries.
|
||||
if (getenv("BT_MP_NET"))
|
||||
DEBUG_STREAM << "[mp-hdlr] TakeDamageHandler this=" << (void*)this
|
||||
<< " inst=" << (int)GetInstance()
|
||||
<< " invalidZone=" << (int)message->invalidDamageZone
|
||||
<< " amount=" << message->damageData.damageAmount
|
||||
<< " table=" << (void*)damageLookupTable
|
||||
<< " zones=" << damageZoneCount << "\n" << std::flush;
|
||||
|
||||
// Maintain the last-attacker bookkeeping (mech[0x43c]): read by the
|
||||
// DamageZone LOD router (same-attacker redirect reuse, mechdmg.cpp:374)
|
||||
// and by the damage-band effect orientation. Was declared but never
|
||||
|
||||
Reference in New Issue
Block a user