From 1f64cba980370f6171ad03d2c06f60a3d5e82321 Mon Sep 17 00:00:00 2001 From: water111 Date: Sun, 16 Feb 2025 13:59:22 -0500 Subject: [PATCH] fix --- goal_src/jak3/engine/anim/aligner-h.gc | 4 ++-- goal_src/jak3/engine/target/gun/gun-red-shot.gc | 2 ++ goal_src/jak3/engine/target/target-lightjak.gc | 2 +- goal_src/jak3/engine/target/target.gc | 9 ++------- goal_src/jak3/levels/title/title-obs.gc | 4 ++-- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/goal_src/jak3/engine/anim/aligner-h.gc b/goal_src/jak3/engine/anim/aligner-h.gc index 3723846bfa..8b049614dd 100644 --- a/goal_src/jak3/engine/anim/aligner-h.gc +++ b/goal_src/jak3/engine/anim/aligner-h.gc @@ -43,8 +43,8 @@ The animation format has two special parent-like joints: prejoint and align. The prejoint is the parent for all joints, so it causes all bones to move. The align joint has no children, but the convention is that moving align will cause the entire process-drawable's root to move, effectively moving the entire character. -Most of the time, this is the preferable way to move a character as part of an animation - -it will update their velocity and when the animation ends or is canceled, +Most of the time, this is the preferable way to move a character as part of an animation - +it will update their velocity and when the animation ends or is canceled, the offset in position from playing the animation will stay. For example, if Jak punches, his velocity will increase due to the animated align in the punch animation. To implement this, the align-control computes the relative transform between align frames. diff --git a/goal_src/jak3/engine/target/gun/gun-red-shot.gc b/goal_src/jak3/engine/target/gun/gun-red-shot.gc index d11b21e5c3..91152d6c09 100644 --- a/goal_src/jak3/engine/target/gun/gun-red-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-red-shot.gc @@ -228,6 +228,7 @@ (when s1-1 (when (and (!= s4-0 s1-1) (not (focus-test? (the-as process-focusable s1-1) disable dead inactive)) + (pc-check-focus-fix (the-as process-focusable s1-1)) ;; og:preserve-this (logtest? (process-mask crate enemy guard vehicle civilian) (-> s1-1 mask)) (nonzero? (-> (the-as process-focusable s1-1) root root-prim prim-core collide-with)) ) @@ -269,6 +270,7 @@ (when (and s3-1 (< (vector-vector-distance (get-trans s3-1 0) s5-0) (-> s5-0 w))) (when (and (!= s4-0 s3-1) (not (focus-test? s3-1 disable dead inactive)) + (pc-check-focus-fix (the-as process-focusable s3-1)) ;; og:preserve-this (logtest? (process-mask crate enemy guard vehicle civilian) (-> s3-1 mask)) (nonzero? (-> s3-1 control root-prim prim-core collide-with)) ) diff --git a/goal_src/jak3/engine/target/target-lightjak.gc b/goal_src/jak3/engine/target/target-lightjak.gc index 4bcb78aace..590d8f5646 100644 --- a/goal_src/jak3/engine/target/target-lightjak.gc +++ b/goal_src/jak3/engine/target/target-lightjak.gc @@ -2283,7 +2283,7 @@ (f30-0 4096.0) ) (let ((f0-4 (* 0.00013563369 (tan (/ (-> *math-camera* fov) 2)) f30-0))) - (set-vector! (-> this root scale) f0-4 f0-4 f0-4 1.0) + (set-vector! (-> this root scale) (* f0-4 (if (-> *pc-settings* use-vis?) 1.0 (-> *pc-settings* aspect-ratio-scale))) f0-4 f0-4 1.0) ) (vector-copy! gp-0 (camera-pos)) (vector-normalize-copy! s5-0 (-> s3-0 fvec) 1.0) diff --git a/goal_src/jak3/engine/target/target.gc b/goal_src/jak3/engine/target/target.gc index 447b84b247..768f36c3a3 100644 --- a/goal_src/jak3/engine/target/target.gc +++ b/goal_src/jak3/engine/target/target.gc @@ -3692,13 +3692,8 @@ :exit target-exit :trans (behavior () (when (and (!= (-> self control unknown-spool-anim00) 'stuck) (!= (-> self state-time) (current-time))) - (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) - (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) - ) - (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) - ) - (pad-buttons circle) - ) + ;; og:preserve-this - High FPS Fix + (if (and (recently-pressed? circle) (can-feet? #f) ) (go target-attack-air 'flop) diff --git a/goal_src/jak3/levels/title/title-obs.gc b/goal_src/jak3/levels/title/title-obs.gc index 8c493b9287..bb520f802f 100644 --- a/goal_src/jak3/levels/title/title-obs.gc +++ b/goal_src/jak3/levels/title/title-obs.gc @@ -1276,8 +1276,8 @@ (set! (-> self zoom) (fmax (fmin (-> self zoom) (-> self char zoom-max)) (-> self char zoom-min))) ) ) - (let ((f1-11 (the float (-> v1-7 abutton 9))) - (f0-18 (the float (-> v1-7 abutton 8))) + (let ((f1-11 (the float (-> v1-7 abutton (abutton-idx r1)))) ;; og:preserve-this abutton indexing + (f0-18 (the float (-> v1-7 abutton (abutton-idx l1)))) ;; og:preserve-this abutton indexing ) (+! (-> self updown) (* 50.0 (seconds-per-frame) f1-11)) (set! (-> self updown) (- (-> self updown) (* 50.0 (seconds-per-frame) f0-18)))