[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:
Matt Dallmeyer
2026-04-02 18:15:32 -07:00
committed by GitHub
parent 7a7edf64ee
commit c37304c2dd
2 changed files with 13 additions and 0 deletions
@@ -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)
+4
View File
@@ -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))