#!/usr/bin/env bash # SEARCHLIGHT bench 2 (external spot cone + replication): night 2-node. # A walks to 40u of B and stands (facing B). B presses the searchlight button # (BT_BTNTEST 0x14) at poll 300. B's lightState replicates (subsystem record # 0x14) -> A's replicant Searchlight LightOn flips -> A's TickSearchlight shows # the spot.bgf cone on B's mech. # PASS: A log "[spot] searchlight pass: ... (external: spot cone)" for B's mech # + "[spot] cone SHOWN (seg N)" after B's press; A BT_SHOT frames brighten near # B post-toggle. B log: "[light] ... requested ON" + lightState 0 -> 1. set -x . /c/git/bt411/scratchpad/night6/bench_common.sh cd /c/git/bt411/content || exit 1 bt_assert_player_env taskkill //F //IM btl4.exe > /dev/null 2>&1 sleep 2 rm -f cone_a.log cone_b.log cone_relay.log coneA_*.png bt_expert_egg MP.EGG SG3.EGG sed -i "s/^map=.*/map=grass/; s/^time=.*/time=night/; s/^vehicle=.*/vehicle=madcat/" SG3.EGG ( export BT_BTNTEST=0x14,900,960 export BT_FIRE_LOG=1 BT_FOG_LOG=1 BT_DEATH_LOG=1 BT_MP_LOG=1 bt_launch cone_b.log SG3.EGG 0x0C -net 1601 ) sleep 2 ( export BT_GOTO=enemy BT_GOTO_STOP=40 BT_KEY_NOFOCUS=1 export BT_SHOT_EVERY=60 BT_SHOT_PREFIX=coneA export BT_FIRE_LOG=1 BT_FOG_LOG=1 BT_MP_LOG=1 bt_launch cone_a.log SG3.EGG 0x03 -net 1501 ) sleep 5 python ../tools/btconsole.py SG3.EGG 127.0.0.1:1501 127.0.0.1:1601 > cone_relay.log 2>&1 & RELAY=$! sleep 90 kill $RELAY 2>/dev/null taskkill //F //IM btl4.exe > /dev/null 2>&1 sleep 3 echo "=== B (lamp owner):" grep -aE "\[light\]|btntest|\[spot\]" cone_b.log | head -8 echo "=== A (observer -- cone events):" grep -aE "\[spot\]" cone_a.log | head -8