From 5e3cb8faa60acc8e3b5f435027ec1462d3e9f926 Mon Sep 17 00:00:00 2001 From: water111 <48171810+water111@users.noreply.github.com> Date: Sat, 16 Nov 2024 17:52:14 -0500 Subject: [PATCH] [jak3] Fix stack layout for car spawn (#3765) Fix for cars spawning under ground or in weird places Co-authored-by: water111 --- decompiler/config/jak3/ntsc_v1/stack_structures.jsonc | 2 +- goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc | 2 +- .../jak3/levels/desert/wvehicle/was-squad-control_REF.gc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc b/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc index a3a4667eb2d..6d8ddeb6f5a 100644 --- a/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc +++ b/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc @@ -1067,7 +1067,7 @@ [208, ["array", "uint32", 1]] ], "(method 35 was-squad-control)": [ - [16, ["inline-array", "matrix", 2]], + [16, ["inline-array", "matrix", 4]], [240, "cquery-with-5vec"] ], "(method 39 vehicle-wheel)": [[16, "rigid-body-move-work"]], diff --git a/goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc b/goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc index d246a255573..1c492e02908 100644 --- a/goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc +++ b/goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc @@ -183,7 +183,7 @@ ) ) (when s4-0 - (let ((s5-1 (new 'stack-no-clear 'inline-array 'matrix 2))) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'matrix 4))) (let* ((s3-0 (-> s5-1 0)) (a2-0 (camera-matrix)) (v1-4 (-> a2-0 rvec quad)) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/was-squad-control_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/was-squad-control_REF.gc index 2672862cb41..afb95280c41 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/was-squad-control_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/was-squad-control_REF.gc @@ -210,7 +210,7 @@ ) ) (when s4-0 - (let ((s5-1 (new 'stack-no-clear 'inline-array 'matrix 2))) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'matrix 4))) (let* ((s3-0 (-> s5-1 0)) (a2-0 (camera-matrix)) (v1-4 (-> a2-0 rvec quad))