Skip to content

Commit

Permalink
Prevent firecanyon-end softlock (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedb0T authored May 18, 2024
1 parent a255b0a commit 872c3d8
Showing 1 changed file with 38 additions and 14 deletions.
52 changes: 38 additions & 14 deletions goal_src/jak1/engine/mods/mod-custom-code.gc
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,34 @@

(defun runs-every-frame ()
;;(increase-power-cell-by-one) This is a call to increase-power-cell-by-one defined in mod-common-functions.gc

(rco-run-each-frame)

(if *show-input-display*


(when (and
(string= (the-as string (-> *game-info* current-continue name)) "firecanyon-end")
(not (task-closed? (game-task firecanyon-end) (task-status need-resolution)))
(not (logtest? (-> *target* control root-prim prim-core action) (collide-action racer)))
)
(let ((a1-3
(new 'stack 'font-context *font-default-matrix* 56 160 0.0 (font-color default) (font-flags shadow kerning))
)
)
(let ((v1-5 a1-3))
(set! (-> v1-5 width) (the float 400))
)
(let ((v1-6 a1-3))
(set! (-> v1-6 height) (the float 96))
)
(set! (-> a1-3 flags) (font-flags shadow kerning middle middle-vert large))
;;(print-game-text "PRESS <PAD_TRIANGLE> TO DIE" a1-3 #f 128 22)
(print-game-text "PRESS TRIANGLE TO GO BACK" a1-3 #f 128 22)
)
(when (cpad-pressed? 0 triangle) (start 'play (get-continue-by-name *game-info* "village1-hut")))

)
(if *show-input-display*
(input-display-on)
(input-display-off)
)
Expand Down Expand Up @@ -60,11 +84,11 @@

(defun runs-on-cell-pickup ((cell-event symbol))
(case cell-event
(('pickup)
(('pickup)
;; Code here runs as soon as you pickup a powercell

)
(('cutscene-end)
(('cutscene-end)
;; Code here runs at the end of any powercell cutscene

)
Expand All @@ -78,28 +102,28 @@
;; Code here runs as soon as you pickup ANY eco

(case eco-type
(((pickup-type eco-yellow))
(((pickup-type eco-yellow))
;; Code here runs as soon as you pickup yellow eco

)
(((pickup-type eco-red))
(((pickup-type eco-red))
;; Code here runs as soon as you pickup red eco

)
(((pickup-type eco-blue))
(((pickup-type eco-blue))
;; Code here runs as soon as you pickup blue eco

)
(((pickup-type eco-pill))
(((pickup-type eco-pill))
;; Code here runs as soon as you pickup small green eco

)
(((pickup-type eco-green))
;; Code here runs as soon as you pickup big green eco
(((pickup-type eco-green))
;; Code here runs as soon as you pickup big green eco

)
)

(when from-vent?
;; Code here runs only if the eco was picked up from a vent

Expand All @@ -111,7 +135,7 @@

(defun runs-on-jak-spawn ()
;; Code here runs every time jak spawns (loading a file new game or death)

;;uncomment this to use custom music for custom levels - the function is in mod-common-functions.gc
;;(process-spawn-function process music-manager-proc)
(none)
Expand All @@ -121,14 +145,14 @@
(case death-event
(('dying)
;; Code here runs immediately every time jak dies, before any death animation or death cutscene

)
(('blackout)
;; Code here runs after jak dies (and any death cutscene finishes), during the blackout before he spawns

)
)

(none)
)

Expand Down

0 comments on commit 872c3d8

Please sign in to comment.