Files
BT411/scratchpad/night18/mp_zone125.sh
T
Joe DiPrimaandClaude Fable 5 91351b94bc #125 FIXED + 2-node benched: peers now see a killed arm WRECK + its gun pod DROP OFF on the FIRST hit. Root pair: (1) the MechDeathHandler Tick transcription carried an INVENTED write -- ApplyDamageGraphicState(descriptor->graphicState) -- where the raw @0042aa2c (part_003.c:10963-93) only PICKS an effect resource (level flag & 4 -> DescriptorForLevel; gstate flag & 8 -> DescriptorForGraphicState(the zone's CURRENT gstate), overwriting the level pick); with the port's pick hardcoded to Destroyed(1) the invention STOMPED every destruction-cascade child's authored Gone(2) back to 1 in the same tick, master-side, BEFORE the record shipped -- the wire itself carried the corruption, so no peer could ever render the pod dropping (receipts: legacy A remade jointrgun to gstate 2 then re-remade it to 1; legacy B received 'dz_rgun gstate 0->1'). Gotcha 36: an added write is worse than a stub -- it actively fights the authentic writers on every node. (2) the destroyed-mesh swap trigger was descriptor-gated (DescriptorForLevel returns NULL past the last threshold; cascade children have gstate edges with NO level edge) -- the binary needed no trigger at all (its renderer re-picked every segment's mesh from zone gstate PER FRAME); the port's built-once render tree now gets the event equivalent: per-zone gstate caches in Tick fire ONE coalesced RemakeEntityRenderables on any edge, which is also the PEER's only trigger for replicated gstate-only beats. Restored authored two-stage story: a directly-killed gun zone hangs its wrecked variant mesh (thrdrgun-family, exterior skeleton; every zone's descriptor table carries lvl=-1 gs=1/gs=2 terminals -- unreachable by level, existing exactly for the gstate picks); a killed ARM swaps to its wrecked variant AND the pod segment vanishes. Effects suppressed on ->Exists edges (the binary's heal writes the cell raw, no flag -> no respawn puff; regression benched 0 heal puffs across a full death/respawn cycle). 2-node benched both ways (night18/mp_zone125.sh + zonedump.sh): fix = peer receives dz_rarm gstate 0->1 + dz_rgun 0->2 on ONE beat, swaps thrdrarm.bgf and HIDES the pod, first-beat remake receipt; legacy = the stomp conviction above. KB: combat-damage.md MechDeathHandler section rewritten to the corrected reading; gotcha 36.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 18:45:12 -05:00

43 lines
2.0 KiB
Bash

#!/usr/bin/env bash
# =========================================================================
# ISSUE #125 -- peers' first destroyed-zone graphic (2-node, thor)
# A (master, thor) self-destroys dz_rarm with ONE 120-pt hit at t=25.
# B observes. PASS receipts on B (the peer):
# [zone-repl] zone 10 'dz_rarm' ... gstate 0->1 (arm Destroyed arrives)
# [zone-repl] zone 17 'dz_rgun' ... gstate 0->2 (pod GONE arrives -- the
# pre-fix master STOMPED this to 1 before the record shipped)
# [BTrender] seg 'jointrgun' slot 6 -> gstate 2 (peer hides the pod)
# [BTrender] RemakeEntity: ... entity=<A's mech> (the peer-side remake
# fired on the FIRST beat -- the pre-fix peer had no trigger at all
# when descriptors misfired, and could never see gstate 2)
# usage: mp_zone125.sh <tag>
# =========================================================================
set -x
cd /c/git/bt411/content || exit 1
taskkill //F //IM btl4.exe > /dev/null 2>&1
sleep 2
TAG=${1:-fix}
rm -f z125_a_${TAG}.log z125_b_${TAG}.log
sed 's/^experience=.*/experience=expert/' MP.EGG > Z125.EGG
sed -i "s/^map=.*/map=grass/; s/^time=.*/time=day/; 0,/^vehicle=.*/s//vehicle=thor/" Z125.EGG
BT_PLATFORM=glass BT_START_INSIDE=1 BT_DEV_GAUGES=1 \
BT_LOG=z125_b_${TAG}.log BT_AFFINITY=0x0C BT_MP_LOG=1 BT_DEATH_LOG=1 \
../build/Release/btl4.exe -egg Z125.EGG -net 1601 &
sleep 2
BT_PLATFORM=glass BT_START_INSIDE=1 BT_DEV_GAUGES=1 \
BT_LOG=z125_a_${TAG}.log BT_AFFINITY=0x03 BT_MP_LOG=1 BT_DEATH_LOG=1 BT_DMG_LOG=1 \
BT_SELF_DAMAGE=120 BT_SELF_DAMAGE_ZONE=dz_rarm BT_SELF_DAMAGE_DELAY=25 BT_SELF_DAMAGE_TICKS=1 \
../build/Release/btl4.exe -egg Z125.EGG -net 1501 &
sleep 4
python ../tools/btconsole.py Z125.EGG 127.0.0.1:1501 127.0.0.1:1601 &
PC=$!
sleep 75
kill $PC 2>/dev/null
taskkill //F //IM btl4.exe > /dev/null 2>&1
echo "=== A (master) ==="
grep -a "dmghit\|cascade\|RemakeEntity\|seg 'jointr" z125_a_${TAG}.log | head -12
echo "=== B (peer) ==="
grep -a "zone-repl\|RemakeEntity\|seg 'jointr\|deathfx\] zone 1[07] level" z125_b_${TAG}.log | head -16