vehicles: a boat nobody rows is moored where it was called or left - its hull put back on the mooring (home_x, home_z, home_yaw) whenever it strays, and no wind on it; the wind drifts only a rowed boat

A called boat and one got out of drifted across the lake on the wind (the user's play of the bundle).
The tests hold a boat at its berth in a full wind for eight seconds, and one dropped out on the lake
where it was left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-29 12:12:44 +03:00
parent b2a45c2fda
commit 66da424b90
6 changed files with 64 additions and 13 deletions

View file

@ -28,6 +28,7 @@ export function vehicle_dismount(vehicles_st: mut VehiclesState) -> bool {
return false
}
VehicleRider.step_off(VehicleRider.safe_x(), VehicleRider.safe_z())
ve_moor(v)
} else {
let wx = v.x + Math.cos(v.yaw) * 1.2
let wz = v.z - Math.sin(v.yaw) * 1.2
@ -49,6 +50,7 @@ export function vehicle_drop(vehicles_st: mut VehiclesState) -> void {
if vehicles_st.ve_cur != null {
vehicles_st.ve_cur.rider = -1
vehicles_st.ve_cur.speed = 0.0
if vehicles_st.ve_cur.kind == VEHICLE_BOAT { ve_moor(vehicles_st.ve_cur) }
}
vehicles_st.ve_cur = null
}