From 364888bcc91264efac810891791db42862aed3fa Mon Sep 17 00:00:00 2001 From: Orkuncakilkaya Date: Mon, 28 Sep 2026 13:52:30 +0300 Subject: [PATCH] fix(ludic.physics): a hull owns its box, so a boat called and sent away takes its shape with it Co-Authored-By: Claude Opus 5.5 --- packages/ludic.physics/hull.ludic | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ludic.physics/hull.ludic b/packages/ludic.physics/hull.ludic index 65f93453..cd29d487 100644 --- a/packages/ludic.physics/hull.ludic +++ b/packages/ludic.physics/hull.ludic @@ -3,8 +3,10 @@ # hx, hy, hz its half width, depth and length; buoyancy over 1 floats it (4: a quarter under) export function phys_hull_add(physics_st: mut PhysicsState, x: float, y: float, z: float, yaw: float, hx: float, hy: float, hz: float, mass: float, buoyancy: float, drag: float) -> int { - let id = phys_body_add(physics_st, phys_box(physics_st, hx, hy, hz), x, y, z, yaw, mass) + let s = phys_box(physics_st, hx, hy, hz) + let id = phys_body_add(physics_st, s, x, y, z, yaw, mass) if id < 0 { return -1 } + phys_own(physics_st, id, s) phys_float(physics_st, id, buoyancy, drag, drag * 1.5) return id }