#!/usr/bin/env python3 """Death-camera forensics on the saved networked death: per draw frame, where is the CHAIN camera eye vs the player vehicle root? Does the chain legitimately transit >100m away (portal ride) -- i.e. is the fp_cam <100m sanity guard what forces the escape-pod-interior view? Also log view-flush params (fog near/far/rgb + full float head) around the transit to find a robust 'death sequence active' gate.""" import struct, sys, os sys.path.insert(0, r'c:\VWE\TeslaRel410\dpl3-revive\patha') os.environ.setdefault('SDL_VIDEODRIVER', 'dummy') import numpy as np from vrboard import VirtualBoard, Msg from vrview import Renderer path = os.path.join(os.path.dirname(__file__), '..', 'captures', 'netdeath-20260708.fifodump') data = open(path, 'rb').read() board = VirtualBoard() r = Renderer(w=64, h=40) frames = 0 created = {} fogs = [] # (frame, floats[:24]) track = [] # (frame, chain_eye, veh_t, dist) o = 0 while o + 8 <= len(data): if data[o:o+4] != b'VPXM': o += 1; continue ln = struct.unpack_from(' len(data): break body = data[o+8:o+8+ln]; o += 8 + ln if len(body) < 4: continue a = struct.unpack_from('= 0x100: continue p = body[4:] if a == 1 and len(p) >= 8: created[struct.unpack_from('= 96: h = struct.unpack_from('100m (the guard threshold) first_far = next((i for i, (f, ec, t, d) in enumerate(track) if d > 100.0), None) print(f"first frame with chain-vehicle distance >100m: " + (f"f{track[first_far][0]}" if first_far is not None else "NONE")) # print the trajectory every ~30 frames over the last 1200 frames print("\n-- chain eye vs vehicle root (tail):") tail = track[-1200:] for i in range(0, len(tail), 30): f, ec, t, d = tail[i] ts = "None" if t is None else f"({t[0]:8.1f},{t[1]:7.1f},{t[2]:8.1f})" print(f" f{f}: eye=({ec[0]:8.1f},{ec[1]:7.1f},{ec[2]:8.1f}) veh={ts} dist={d:8.1f}") # fog/view flushes in the tail window, with the full float head for gate hunting if track: cut = track[-1200][0] if len(track) >= 1200 else track[0][0] print(f"\n-- view flushes after f{cut} (floats 14..23):") last = None for f, fl in fogs: if f < cut: continue k = tuple(round(x, 2) for x in fl[14:24]) if k != last: print(f" f{f}: " + " ".join(f"{x:.2f}" for x in k)) last = k