diff --git a/game/reconstructed/mech4.cpp b/game/reconstructed/mech4.cpp index 32498bd..ae60ad5 100644 --- a/game/reconstructed/mech4.cpp +++ b/game/reconstructed/mech4.cpp @@ -1062,8 +1062,13 @@ int { if (seg->GetIndex() == seg_index) { - AffineMatrix mw; - mw.Multiply(seg->GetSegmentToEntity(), m->localToWorld); + // #141 sweep: go through the engine accessor, which is the + // binary's FUN_00424da8 (the joints->segments refresh). A hand + // composed GetSegmentToEntity() x localToWorld reads a STALE + // cache on any mech whose segments were not refreshed this frame + // -- i.e. every REPLICANT. See BTResolveWeaponMuzzle. + LinearMatrix mw; + m->GetSegmentToWorld(*seg, &mw); p = mw; // Point3D = matrix translation break; } @@ -2144,8 +2149,11 @@ void { if (seg->GetIndex() == segment_index) { - AffineMatrix mw; - mw.Multiply(seg->GetSegmentToEntity(), mech->localToWorld); + // #141 sweep: engine accessor (== the binary's FUN_00424da8), + // not a hand-composed product -- otherwise a peer's damage + // effect anchors to the BIND-POSE segment. + LinearMatrix mw; + mech->GetSegmentToWorld(*seg, &mw); fxPos = mw; // Point3D = matrix translation break; } @@ -8912,9 +8920,12 @@ void } if (s_portCache[energyOrdinal] != 0) { - AffineMatrix mw; - mw.Multiply(s_portCache[energyOrdinal]->GetSegmentToEntity(), - localToWorld); + // #141 sweep: engine accessor (== the binary's FUN_00424da8). + // This is the BEAM muzzle -- the same stale-cache exposure the + // missile launch had, so a peer's beam would also originate + // from the bind-pose gun port instead of the twisted torso. + LinearMatrix mw; + GetSegmentToWorld(*s_portCache[energyOrdinal], &mw); mz = mw; // Point3D = matrix translation } }