Files
BT412/game
arcattackandClaude Opus 4.8 d07dd0bf4e Respawn visuals: warp was in the wrong render pass; render never un-wrecked
Two render bugs behind "warp never appears" + "respawned mech stays a sunk wreck":

1. Warp invisible: the tsphere was drawn in PASS_ALPHABLEND, but DrawMesh skips
   any op whose alphaTest != (pass==PASS_ALPHABLEND) (L4D3D.cpp:1045) and
   tsphere's op is opaque -> every op skipped, nothing drawn. Flag the sphere's
   ops for the alpha pass, and draw it as an explicit translucent-blue ADDITIVE
   glow (state saved+restored) so it reads as a warp shimmer, not an opaque ball
   or (as shipped) nothing. Tint via BT_WARP_COLOR.

2. Render stays wrecked on respawn: SwapToWreck hides the body + hangs a sinking
   dbr hulk with render_tree.wrecked a one-way latch; Mech::Reset healed the sim
   but nothing reversed the render, so the reborn mech kept rendering as the sunk
   hulk. Add RebuildMechRenderables (the heal direction of RemakeEntity): drop the
   hulk/debris, clear wrecked, restore every body segment to its now-intact mesh.
   Mech::Reset calls it via BTRebuildMechModel.

Smoke-verified: tsphere loads with its op alpha-flagged; on each respawn
"[BTrender] respawn: rebuilt intact model (12 segs restored, hulk dropped)"; no
crash. Both are local render (the respawning node's own screen); remote-observer
replication of the warp+un-wreck rides the deferred WriteUpdateRecord death path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 07:26:48 -05:00
..