Refresh viewport-relative y-sort layers for all world sprites
Tim Falken authored 2 months ago
Only baked chunk rows and per-frame entity placement re-applied the
viewport-relative depth layer, so unbaked tall blocks, doors, ground items
and static FX kept the layer they got at draw time. As the camera moved the
y-sort origin drifted away from it, letting blocks north of a southbound
player draw over him.
Also settle the camera and y-sort origin before any layer is computed in
update(); entities were previously placed against the previous frame's
origin while baked rows used the new one.
Co-authored-by: Cursor <cursoragent@cursor.com>