mirror of
https://github.com/open-goal/jak-project
synced 2026-07-07 06:05:15 -04:00
[jak3] Fix arena token not respawning bug (#4150)
a bit of a hack but I'm not sure what else to do besides completely unload/reload wasstadb-obs. open to suggestions here is the bug https://youtu.be/C1KZlRFbjys?t=50
This commit is contained in:
@@ -742,6 +742,15 @@
|
||||
|
||||
(define *arena-trainer-checkpoint-tokens* (new 'static 'array uint64 2 #xffffffffffffffff #x0))
|
||||
|
||||
;; og:preserve-this helper to reset these globals in between speedruns, otherwise new game can skip straight past tokens
|
||||
(defun reset-arena-trainer-globals ()
|
||||
(set! *arena-trainer-checkpoint-valid* (the-as object #f))
|
||||
(set! *arena-trainer-checkpoint-time* 0.0)
|
||||
(set! (-> *arena-trainer-checkpoint-tokens* 0) #xffffffffffffffff)
|
||||
(set! (-> *arena-trainer-checkpoint-tokens* 1) #x0)
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype task-manager-arena-training (task-manager)
|
||||
((judge-h handle)
|
||||
(arrow-h handle)
|
||||
|
||||
@@ -142,6 +142,7 @@
|
||||
lighteco
|
||||
darkeco))
|
||||
|
||||
(define-extern reset-arena-trainer-globals (function none))
|
||||
(defmethod start-run! ((this speedrun-info))
|
||||
;; turn on speedrun verification display
|
||||
(true! (-> this display-run-info?))
|
||||
@@ -150,6 +151,9 @@
|
||||
(send-event (ppointer->process *speedrun-manager*) 'start-run)
|
||||
;; ensure any required settings are enabled
|
||||
(enforce-settings! this)
|
||||
;; make sure silly arena-trainer globals are reset if we're resetting from arena
|
||||
(when (process-by-name "arena-training-1-collect" *entity-pool*)
|
||||
(reset-arena-trainer-globals))
|
||||
;; finalize any category specific setup code
|
||||
(case (-> this category)
|
||||
(((speedrun-category newgame-normal))
|
||||
|
||||
Reference in New Issue
Block a user