mirror of
https://github.com/open-goal/jak-project
synced 2026-05-26 07:39:12 -04:00
[high fps] Increase input buffer size and fix cloud scroll speed (#3178)
The game stores the last 3 frames of input (50ms of time at 60fps) and often checks if a button was pressed within those 3 saved frames as a condition. When transitioning states, it often checks if some input was received during the previous state (within those 3 frames) in order to quickly transition out. A good example of this is when transitioning to standing, it checks if you can jump this frame and if you had pressed X recently, and if so, transition immediately to jump. This allows transitions between states to feel more smooth/forgiving by letting you jump at a later time when you are transitioning from falling->standing than if you were only falling. At 165fps the last 3 frames is only 18ms of time so the input windows for these smooth transitions are almost 3x shorter. This PR saves 15 input frames (enough to cover 50ms of time at 300fps) for each controller and adds a (recently-pressed?) macro that checks all 15 frames. However, it only updates the necessary frames in history based on the current frame rate. This way, 60fps continues to only check against 3 input frames, 165fps checks against 9, 240fps checks against 12, and 300fps checks all 15. --------- Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
This commit is contained in:
@@ -113,7 +113,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(update-time-and-speed *sky-work* (-> self time-of-day) (-> self time-ratio))
|
||||
;; og:preserve-this high fps fix
|
||||
(update-time-and-speed *sky-work* (-> self time-of-day) (* (-> self time-ratio) DISPLAY_FPS_RATIO))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -152,7 +152,6 @@ The cpad-set-buzz! function can be used for vibration.
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmacro cpad-type? (type)
|
||||
`(= (shr (-> pad status) 4) (cpad-type ,type))
|
||||
)
|
||||
@@ -215,7 +214,6 @@ The cpad-set-buzz! function can be used for vibration.
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new cpad-list ((allocation symbol) (type-to-make type))
|
||||
"Create a cpad-list for 2 controllers. It's fine to do this even if one or both controllers
|
||||
aren't connected yet."
|
||||
@@ -227,6 +225,36 @@ The cpad-set-buzz! function can be used for vibration.
|
||||
)
|
||||
)
|
||||
|
||||
;; Allocates enough input frames to support counting 50ms of time at 300fps.
|
||||
(deftype cpad-history (basic)
|
||||
((button0-abs pad-buttons 15) ;; bitmask of buttons, pressed or not, with history
|
||||
(button0-rel pad-buttons 15) ;; bitmask of if button going down.
|
||||
)
|
||||
)
|
||||
|
||||
;; List of extended history for controllers at high fps. It always has 4 controllers.
|
||||
(deftype cpad-history-list (basic)
|
||||
((num-cpads int32)
|
||||
(cpads cpad-history 4) ;; modified from 2->4 for PC 4-pad support
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod new cpad-history-list ((allocation symbol) (type-to-make type))
|
||||
"Create a cpad-history-list for 4 controllers. It's fine to do this even if controllers
|
||||
aren't connected yet. "
|
||||
(let ((this (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> this num-cpads) 4)
|
||||
(set! (-> this cpads 0) (new 'global 'cpad-history))
|
||||
(set! (-> this cpads 1) (new 'global 'cpad-history))
|
||||
(set! (-> this cpads 2) (new 'global 'cpad-history))
|
||||
(set! (-> this cpads 3) (new 'global 'cpad-history))
|
||||
this
|
||||
)
|
||||
)
|
||||
|
||||
(defun analog-input ((arg0 int) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
|
||||
"Convert integer input from pad into a float between -out-range and +out-range.
|
||||
The offset is applied directly to the input.
|
||||
@@ -311,6 +339,17 @@ The cpad-set-buzz! function can be used for vibration.
|
||||
|
||||
;; the two controllers
|
||||
(define *cpad-list* (new 'global 'cpad-list))
|
||||
;; the cpad-history for each controller
|
||||
(define *cpad-history-list* (new 'global 'cpad-history-list))
|
||||
|
||||
(desfun generate-frame-checks (pad-idx frames)
|
||||
(if (= frames 0)
|
||||
0
|
||||
`(logior (-> *cpad-history-list* cpads ,pad-idx button0-rel ,(- frames 1))
|
||||
,(generate-frame-checks pad-idx (- frames 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; weird leftover debug thing, enabling overrides the x position of both sticks on both controllers.
|
||||
(define *cpad-debug* #f)
|
||||
@@ -324,7 +363,9 @@ The cpad-set-buzz! function can be used for vibration.
|
||||
"Read from cpads and update vibration"
|
||||
(let ((pads *cpad-list*))
|
||||
(dotimes (i (-> pads num-cpads))
|
||||
(let ((pad (-> *cpad-list* cpads i)))
|
||||
(let ((pad (-> *cpad-list* cpads i))
|
||||
;; og:preserve-this high fps fix
|
||||
(history (-> *cpad-history-list* cpads i)))
|
||||
(set! (-> pad old-leftx 1) (-> pad old-leftx 0))
|
||||
(set! (-> pad old-leftx 0) (-> pad leftx))
|
||||
(set! (-> pad old-lefty 1) (-> pad old-lefty 0))
|
||||
@@ -376,6 +417,48 @@ The cpad-set-buzz! function can be used for vibration.
|
||||
(set! (-> pad button0-abs 1) (-> pad button0-shadow-abs 0))
|
||||
(set! (-> pad button0-rel 2) (-> pad button0-rel 1))
|
||||
(set! (-> pad button0-rel 1) (-> pad button0-rel 0))
|
||||
|
||||
;; og:preserve-this high fps fix
|
||||
(when (>= (-> *pc-settings* target-fps) 300)
|
||||
(set! (-> history button0-abs 14) (-> history button0-abs 13))
|
||||
(set! (-> history button0-abs 13) (-> history button0-abs 12))
|
||||
(set! (-> history button0-abs 12) (-> history button0-abs 11))
|
||||
|
||||
(set! (-> history button0-rel 14) (-> history button0-rel 13))
|
||||
(set! (-> history button0-rel 13) (-> history button0-rel 12))
|
||||
(set! (-> history button0-rel 12) (-> history button0-rel 11))
|
||||
)
|
||||
(when (>= (-> *pc-settings* target-fps) 240)
|
||||
(set! (-> history button0-abs 11) (-> history button0-abs 10))
|
||||
(set! (-> history button0-abs 10) (-> history button0-abs 9))
|
||||
(set! (-> history button0-abs 9) (-> history button0-abs 8))
|
||||
(set! (-> history button0-rel 11) (-> history button0-rel 10))
|
||||
(set! (-> history button0-rel 10) (-> history button0-rel 9))
|
||||
(set! (-> history button0-rel 9) (-> history button0-rel 8))
|
||||
)
|
||||
(when (>= (-> *pc-settings* target-fps) 165)
|
||||
(set! (-> history button0-abs 8) (-> history button0-abs 7))
|
||||
(set! (-> history button0-abs 7) (-> history button0-abs 6))
|
||||
(set! (-> history button0-abs 6) (-> history button0-abs 5))
|
||||
(set! (-> history button0-rel 8) (-> history button0-rel 7))
|
||||
(set! (-> history button0-rel 7) (-> history button0-rel 6))
|
||||
(set! (-> history button0-rel 6) (-> history button0-rel 5))
|
||||
)
|
||||
(when (>= (-> *pc-settings* target-fps) 120)
|
||||
(set! (-> history button0-abs 5) (-> history button0-abs 4))
|
||||
(set! (-> history button0-abs 4) (-> history button0-abs 3))
|
||||
(set! (-> history button0-rel 5) (-> history button0-rel 4))
|
||||
(set! (-> history button0-rel 4) (-> history button0-rel 3))
|
||||
)
|
||||
(when (>= (-> *pc-settings* target-fps) 75)
|
||||
(set! (-> history button0-abs 3) (-> history button0-abs 2))
|
||||
(set! (-> history button0-rel 3) (-> history button0-rel 2))
|
||||
)
|
||||
(set! (-> history button0-abs 2) (-> history button0-abs 1))
|
||||
(set! (-> history button0-abs 1) (-> pad button0-shadow-abs 0))
|
||||
(set! (-> history button0-rel 2) (-> history button0-rel 1))
|
||||
(set! (-> history button0-rel 1) (-> pad button0-rel 0))
|
||||
|
||||
(when (= (-> pad status) 115)
|
||||
(set! (-> pad abutton 0) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons right))
|
||||
255
|
||||
@@ -515,8 +598,12 @@ The cpad-set-buzz! function can be used for vibration.
|
||||
)
|
||||
(set! (-> pad button0-shadow-abs 0) buttons-pushed)
|
||||
(set! (-> pad button0-abs 0) buttons-pushed)
|
||||
(set! (-> history button0-abs 0) (-> pad button0-abs 0))
|
||||
)
|
||||
(set! (-> pad button0-rel 0) (logclear (-> pad button0-abs 0) (-> pad button0-abs 1)))
|
||||
(set! (-> history button0-rel 0) (-> pad button0-rel 0))
|
||||
|
||||
|
||||
(when *cpad-debug*
|
||||
(set! (-> pad leftx) (the-as uint 255))
|
||||
(set! (-> pad rightx) (the-as uint 255))
|
||||
@@ -579,6 +666,11 @@ The cpad-set-buzz! function can be used for vibration.
|
||||
`(logtest? (cpad-pressed ,pad-idx) (pad-buttons ,@buttons))
|
||||
)
|
||||
|
||||
(defmacro recently-pressed? (&key (pad-idx (-> self control cpad number)) &key (frames 15) &rest buttons)
|
||||
"Checks if a (pad-button) was pressed within the last 50ms, based on frames"
|
||||
`(logtest? ,(generate-frame-checks pad-idx frames) (pad-buttons ,@buttons))
|
||||
)
|
||||
|
||||
(defmacro cpad-hold? (pad-idx &rest buttons)
|
||||
`(logtest? (cpad-hold ,pad-idx) (pad-buttons ,@buttons))
|
||||
)
|
||||
|
||||
@@ -584,13 +584,8 @@
|
||||
)
|
||||
(go target-board-duck-stance)
|
||||
)
|
||||
(when (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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(when (and (recently-pressed? x)
|
||||
(can-jump? 'board)
|
||||
)
|
||||
(let ((gp-0 (vector-flatten!
|
||||
@@ -760,13 +755,8 @@
|
||||
)
|
||||
(go target-board-stance)
|
||||
)
|
||||
(when (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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(when (and (recently-pressed? x)
|
||||
(can-jump? 'board)
|
||||
)
|
||||
(let ((gp-0 (vector-flatten!
|
||||
@@ -1923,13 +1913,8 @@
|
||||
)
|
||||
:exit target-board-exit
|
||||
:trans (behavior ()
|
||||
(when (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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(when (and (recently-pressed? x)
|
||||
(can-jump? 'board)
|
||||
)
|
||||
(flush-trick-list (-> self board))
|
||||
@@ -2020,13 +2005,8 @@
|
||||
)
|
||||
:exit target-board-exit
|
||||
:trans (behavior ()
|
||||
(when (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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(when (and (recently-pressed? x)
|
||||
(can-jump? 'board)
|
||||
)
|
||||
(flush-trick-list (-> self board))
|
||||
@@ -2168,13 +2148,8 @@
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(when (and (recently-pressed? x)
|
||||
(can-jump? 'board)
|
||||
)
|
||||
(let ((v1-15 (/ (- (current-time) (-> self board ride-start-time)) 300)))
|
||||
|
||||
@@ -79,35 +79,20 @@
|
||||
(remove-exit)
|
||||
(go target-duck-stance #f)
|
||||
)
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(target-jump-go)
|
||||
)
|
||||
(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 - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? circle)
|
||||
(can-feet? #t)
|
||||
)
|
||||
(go target-attack)
|
||||
)
|
||||
(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 square)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? square)
|
||||
(can-hands? #t)
|
||||
)
|
||||
(go target-running-attack)
|
||||
@@ -350,13 +335,8 @@
|
||||
(if (want-to-darkjak?)
|
||||
(go target-darkjak-get-on (darkjak-stage active))
|
||||
)
|
||||
(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 l1)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? l1)
|
||||
(and (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) (can-roll?))
|
||||
)
|
||||
(go target-roll)
|
||||
@@ -366,35 +346,20 @@
|
||||
(remove-exit)
|
||||
(go target-duck-walk #f)
|
||||
)
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(target-jump-go)
|
||||
)
|
||||
(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 - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? circle)
|
||||
(can-feet? #t)
|
||||
)
|
||||
(go target-attack)
|
||||
)
|
||||
(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 square)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? square)
|
||||
(can-hands? #t)
|
||||
)
|
||||
(go target-running-attack)
|
||||
|
||||
@@ -430,13 +430,8 @@
|
||||
(if (cpad-pressed? (-> self control cpad number) r1)
|
||||
(go target-carry-drop)
|
||||
)
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(go target-carry-jump (-> *TARGET-bank* carry-jump-height-min) (-> *TARGET-bank* carry-jump-height-max) #f)
|
||||
@@ -483,13 +478,8 @@
|
||||
(if (cpad-pressed? (-> self control cpad number) r1)
|
||||
(go target-carry-drop)
|
||||
)
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(go target-carry-jump (-> *TARGET-bank* carry-jump-height-min) (-> *TARGET-bank* carry-jump-height-max) #f)
|
||||
@@ -604,13 +594,8 @@
|
||||
(logclear! (-> self state-flags) (state-flags lleg-still rleg-still))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(go target-carry-jump (-> *TARGET-bank* carry-jump-height-min) (-> *TARGET-bank* carry-jump-height-max) #f)
|
||||
|
||||
@@ -2224,40 +2224,20 @@
|
||||
(let ((v1-75 (-> self gun gun-type)))
|
||||
(or (and (cond
|
||||
((= v1-75 (pickup-type eco-yellow))
|
||||
(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 down)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(recently-pressed? down)
|
||||
)
|
||||
((= v1-75 (pickup-type eco-red))
|
||||
(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 up)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(recently-pressed? up)
|
||||
)
|
||||
((= v1-75 (pickup-type eco-blue))
|
||||
(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 left)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(recently-pressed? left)
|
||||
)
|
||||
(else
|
||||
(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 right)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(recently-pressed? right)
|
||||
)
|
||||
)
|
||||
(and (not (cpad-hold? (-> self control cpad number) r1))
|
||||
|
||||
@@ -38,13 +38,8 @@
|
||||
(if (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0)
|
||||
(go target-wade-walk)
|
||||
)
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(target-jump-go)
|
||||
@@ -90,13 +85,8 @@
|
||||
(if (and (cpad-hold? (-> self control cpad number) l1) (can-duck?))
|
||||
(go target-duck-walk #f)
|
||||
)
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(target-jump-go)
|
||||
@@ -409,25 +399,15 @@
|
||||
(go target-stance)
|
||||
)
|
||||
)
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
(time-elapsed? (-> self water enter-swim-time) (seconds 0.1))
|
||||
)
|
||||
(go target-swim-jump (-> *TARGET-bank* swim-jump-height-min) (-> *TARGET-bank* swim-jump-height-max))
|
||||
)
|
||||
(when (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 square)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(when (and (recently-pressed? circle square)
|
||||
(< (-> *TARGET-bank* min-dive-depth) (target-height-above-ground))
|
||||
)
|
||||
(spawn-ripples (-> self water) 0.7 (-> self control trans) 1 *null-vector* #t)
|
||||
@@ -526,25 +506,15 @@
|
||||
(go target-stance)
|
||||
)
|
||||
)
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
(time-elapsed? (-> self water enter-swim-time) (seconds 0.1))
|
||||
)
|
||||
(go target-swim-jump (-> *TARGET-bank* swim-jump-height-min) (-> *TARGET-bank* swim-jump-height-max))
|
||||
)
|
||||
(when (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 square)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(when (and (recently-pressed? circle square)
|
||||
(< (-> *TARGET-bank* min-dive-depth) (target-height-above-ground))
|
||||
)
|
||||
(spawn-ripples (-> self water) 0.7 (-> self control trans) 1 *null-vector* #t)
|
||||
|
||||
@@ -682,13 +682,8 @@
|
||||
)
|
||||
:exit (-> target-tube-start exit)
|
||||
:trans (behavior ()
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(go target-tube-jump (-> *TARGET-bank* tube-jump-height-min) (-> *TARGET-bank* tube-jump-height-max))
|
||||
|
||||
@@ -81,35 +81,21 @@
|
||||
(remove-exit)
|
||||
(go target-duck-stance #f)
|
||||
)
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(target-jump-go)
|
||||
)
|
||||
(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 - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? circle)
|
||||
(can-feet? #t)
|
||||
)
|
||||
(go target-attack)
|
||||
)
|
||||
(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 square)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? square)
|
||||
(can-hands? #t)
|
||||
)
|
||||
(go target-running-attack)
|
||||
@@ -122,14 +108,9 @@
|
||||
)
|
||||
(go target-gun-stance)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (logtest? (-> self game features) (game-feature carry))
|
||||
(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 r1)
|
||||
)
|
||||
(recently-pressed? r1)
|
||||
)
|
||||
(go target-carry-pickup)
|
||||
)
|
||||
@@ -160,13 +141,8 @@
|
||||
(remove-exit)
|
||||
(go target-ice-walk)
|
||||
)
|
||||
(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 l1)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? l1)
|
||||
(and (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) (can-roll?))
|
||||
)
|
||||
(go target-roll)
|
||||
@@ -184,35 +160,20 @@
|
||||
(if (want-to-darkjak?)
|
||||
(go target-darkjak-get-on (darkjak-stage active))
|
||||
)
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(target-jump-go)
|
||||
)
|
||||
(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 - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? circle)
|
||||
(can-feet? #t)
|
||||
)
|
||||
(go target-attack)
|
||||
)
|
||||
(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 square)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? square)
|
||||
(can-hands? #t)
|
||||
)
|
||||
(go target-running-attack)
|
||||
@@ -224,14 +185,9 @@
|
||||
(set! (-> self control transv w) 1.0)
|
||||
(go target-turn-around)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (logtest? (-> self game features) (game-feature carry))
|
||||
(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 r1)
|
||||
)
|
||||
(recently-pressed? r1)
|
||||
)
|
||||
(go target-carry-pickup)
|
||||
)
|
||||
@@ -263,13 +219,8 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(target-jump-go)
|
||||
@@ -454,13 +405,8 @@
|
||||
)
|
||||
(set-time! (-> self control sliding-start-time))
|
||||
)
|
||||
(when (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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(when (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
(!= (-> self state-time) (current-time))
|
||||
)
|
||||
@@ -472,25 +418,15 @@
|
||||
(vector-normalize-copy! (-> self control transv) (-> self control force-turn-to-direction) 40960.0)
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) *slide-jump-mods*)
|
||||
)
|
||||
(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 - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? circle)
|
||||
(can-feet? #t)
|
||||
(!= (-> self state-time) (current-time))
|
||||
)
|
||||
(go target-attack)
|
||||
)
|
||||
(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 square)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? square)
|
||||
(can-hands? #t)
|
||||
(time-elapsed? (-> self control last-running-attack-end-time) (seconds 0.7))
|
||||
(!= (-> self state-time) (current-time))
|
||||
@@ -810,13 +746,8 @@
|
||||
(if (want-to-darkjak?)
|
||||
(go target-darkjak-get-on (darkjak-stage active))
|
||||
)
|
||||
(when (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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(when (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(if (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0)
|
||||
@@ -949,13 +880,8 @@
|
||||
(if (want-to-darkjak?)
|
||||
(go target-darkjak-get-on (darkjak-stage active))
|
||||
)
|
||||
(when (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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(when (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(if (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0)
|
||||
@@ -1463,13 +1389,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(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 square)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? square)
|
||||
(< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 73728.0)
|
||||
(< -61440.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(and (time-elapsed? (-> self control last-time-of-stuck) (the-as time-frame (-> *TARGET-bank* stuck-timeout)))
|
||||
@@ -1834,13 +1755,8 @@
|
||||
(logclear! (-> self state-flags) (state-flags lleg-still rleg-still lleg-no-ik rleg-no-ik))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(target-jump-go)
|
||||
@@ -1854,24 +1770,14 @@
|
||||
(go target-walk)
|
||||
)
|
||||
)
|
||||
(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 - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? circle)
|
||||
(can-feet? #t)
|
||||
)
|
||||
(go target-attack)
|
||||
)
|
||||
(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 square)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? square)
|
||||
(can-hands? #t)
|
||||
)
|
||||
(go target-running-attack)
|
||||
@@ -2092,13 +1998,8 @@
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1))
|
||||
(talker-spawn-func (-> *talker-speech* 328) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
(when (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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(when (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(set-quaternion! (-> self control) (-> self control dir-targ))
|
||||
@@ -3492,13 +3393,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 - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? circle)
|
||||
(can-feet? #f)
|
||||
)
|
||||
(go target-attack-air 'flop)
|
||||
@@ -3664,13 +3560,8 @@
|
||||
(set! (-> self state-hook) (the-as (function none :behavior target) nothing))
|
||||
)
|
||||
(else
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? 'target-roll-flip)
|
||||
)
|
||||
(go target-roll-flip (-> *TARGET-bank* roll-flip-height) (-> *TARGET-bank* roll-flip-dist))
|
||||
@@ -3828,13 +3719,8 @@
|
||||
(set! (-> self state-hook) (the-as (function none :behavior target) nothing))
|
||||
)
|
||||
(else
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
(or (not (-> *TARGET-bank* strafe-duck-jump)) (not (enabled-gun? self)))
|
||||
)
|
||||
|
||||
@@ -531,13 +531,8 @@
|
||||
(set! (-> self control anim-handle) (the-as handle #f))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(when (and (recently-pressed? x)
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
(time-elapsed? (-> self state-time) (seconds 0.4))
|
||||
)
|
||||
@@ -766,13 +761,8 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (and (time-elapsed? (-> self state-time) (seconds 0.2))
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(recently-pressed? x)
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
)
|
||||
(cond
|
||||
@@ -1134,35 +1124,20 @@
|
||||
(if (and (cpad-hold? (-> self control cpad number) l1) (can-duck?))
|
||||
(go target-duck-stance #f)
|
||||
)
|
||||
(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 x)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? x)
|
||||
(can-jump? #f)
|
||||
)
|
||||
(target-jump-go)
|
||||
)
|
||||
(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 - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? circle)
|
||||
(can-feet? #t)
|
||||
)
|
||||
(go target-attack)
|
||||
)
|
||||
(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 square)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (recently-pressed? square)
|
||||
(can-hands? #t)
|
||||
)
|
||||
(go target-running-attack)
|
||||
@@ -1175,14 +1150,9 @@
|
||||
)
|
||||
(go target-gun-stance)
|
||||
)
|
||||
;; og:preserve-this - High FPS Fix - https://github.com/open-goal/jak-project/pull/3178
|
||||
(if (and (logtest? (-> self game features) (game-feature carry))
|
||||
(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 r1)
|
||||
)
|
||||
(recently-pressed? r1)
|
||||
)
|
||||
(go target-carry-pickup)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user