Files
BT411/scratchpad/night12/spotcone.sh
T
Joe DiPrimaandClaude Fable 5 412053d5af Searchlight reconstruction -- the pod's night kit, both halves
The subsystem (sim/toggle/attribute/replication) was already complete; this
lands the missing VISUALS, decoded from MakeMechRenderables @004cef28 case
0xbd8 (raw pseudocode part_014):

- COCKPIT: the 1995 searchlight is a FOG SWAP -- the @00456778/@00456814
  watcher switches DPLRenderer::SetFogStyle between the authored fog= (lit)
  and nosearchlightfog= (dark) sets per map/time page in BTDPL.INI.  The
  engine kept the whole system under its real names; completed the stubbed
  plane application (currentFogNear/Far) and transcribed the watcher (with
  its inverted-cache seed) into TickSearchlight.  CONSEQUENCE: night now
  STARTS on the authentic dark set (near-plane 5u on arena pages) -- our
  builds had rendered the searchlight-ON fog permanently.
- EXTERNAL: spot.bgf beam cone hung on the searchlight SITE joint, shown/
  hidden from the replicated LightOn attribute (@0045612c watcher).  Site
  segments now build geometry-less DCS children (posed + parentable, as the
  1995 graph did) -- previously they were skipped entirely.
- searchlight.hpp: commandedOn @0x1DC identified as mountSegment (resource
  segmentIndex; the cone's mount joint).

Benches: searchfog.sh (solo cockpit: first-tick dark sync, F5/0x14 press ->
SetFogStyle(2), red-fog probe end-to-end), spotcone.sh (2-node: B's button ->
lightState replication -> A logs "[spot] cone SHOWN (seg 20)").  Cone look
(size/aim on the mount) pending an eyeball pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 19:44:23 -05:00

43 lines
1.6 KiB
Bash

#!/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