Skip to content

Commit

Permalink
jak3: fix ragdolls settling too early (#3775)
Browse files Browse the repository at this point in the history
`none` methods strike again

Fixes #3774
  • Loading branch information
Hat-Kid authored Nov 22, 2024
1 parent 8f445bd commit 2ff49b9
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion decompiler/config/jak3/all-types.gc
Original file line number Diff line number Diff line change
Expand Up @@ -23125,7 +23125,7 @@
(disable-for-duration (_type_ time-frame) none) ;; 16
(ragdoll-proc-method-17 (_type_ ragdoll-edit-info) none) ;; 17
(ragdoll-proc-method-18 (_type_ ragdoll-edit-info) none) ;; 18
(ragdoll-proc-method-19 (_type_) none) ;; 19
(ragdoll-proc-method-19 (_type_) symbol) ;; 19
)
)

Expand Down
2 changes: 1 addition & 1 deletion goal_src/jak3/engine/physics/ragdoll-h.gc
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
(disable-for-duration (_type_ time-frame) none)
(ragdoll-proc-method-17 (_type_ ragdoll-edit-info) none)
(ragdoll-proc-method-18 (_type_ ragdoll-edit-info) none)
(ragdoll-proc-method-19 (_type_) none)
(ragdoll-proc-method-19 (_type_) symbol)
)
)

Expand Down
2 changes: 0 additions & 2 deletions goal_src/jak3/engine/physics/ragdoll.gc
Original file line number Diff line number Diff line change
Expand Up @@ -1567,13 +1567,11 @@
(none)
)

;; WARN: Return type mismatch symbol vs none.
(defmethod ragdoll-proc-method-19 ((this ragdoll-proc))
(if (nonzero? (-> this ragdoll))
(logtest? (-> this ragdoll ragdoll-flags) (ragdoll-flag rf2))
#t
)
(none)
)

(defstate idle (ragdoll-proc)
Expand Down
3 changes: 1 addition & 2 deletions goal_src/jak3/engine/target/flut/flut-racer.gc
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,7 @@
(set! (-> s5-0 danger-level) 0.5)
(set! (-> s5-0 notify-radius) 491520.0)
(set! (-> s5-0 decay-rate) 0.0)
;; og:preserve-this not-yet-implemented
; (add-danger *traffic-engine* s5-0)
(add-danger *traffic-engine* s5-0)
)
(let ((s5-1 (new 'stack-no-clear 'vector)))
(vector-normalize!
Expand Down
2 changes: 1 addition & 1 deletion goal_src/jak3/game.gp
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@
(cgo-file "wasseem.gd" common-dep)
(cgo-file "wca.gd" common-dep)
(cgo-file "wcb.gd" common-dep)
(cgo-file "wasleapr.gd" common-dep)
(cgo-file "wcaseem.gd" common-dep)
(cgo-file "wascast.gd" common-dep)
(cgo-file "cwi.gd" common-dep) ;; ctywide
(cgo-file "wasleapr.gd" common-dep)
(cgo-file "wasall.gd" common-dep)
(cgo-file "desresc.gd" common-dep)
(cgo-file "wsd.gd" common-dep) ;; wasdoors (garage)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions test/decompiler/reference/jak3/engine/physics/ragdoll_REF.gc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2ff49b9

Please sign in to comment.