mirror of
https://github.com/open-goal/jak-project
synced 2026-07-31 08:16:02 -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:
@@ -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