Skip to content

Commit

Permalink
automatically re-enable autosave safely when starting a speedrun (#3181)
Browse files Browse the repository at this point in the history
  • Loading branch information
ManDude authored Nov 9, 2023
1 parent b2453fe commit a150e59
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions goal_src/jak2/pc/features/speedruns.gc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
(initialize! *game-info* 'game (the-as game-save #f) "game-start"))
(((speedrun-category newgame-heromode))
(initialize! *game-info* 'game (the-as game-save #f) "game-start-hero")))

(if (!= -1 (-> *game-info* auto-save-which))
(set! (-> *setting-control* user-default auto-save) #t))

(none))

(defmethod enforce-settings! ((this speedrun-info))
Expand Down Expand Up @@ -142,19 +146,14 @@
((= *master-mode* 'menu)
(set-master-mode 'game)
(set! (-> this draw-menu?) #f)))
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l1))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons l1))
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1))
(cpad-clear! 0 l1 r1)
;; Track whether or not the menu was opened with start or select...
(cond
((cpad-hold? 0 select)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons select))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons select))
(cpad-clear! 0 select)
(set! (-> this opened-with-start?) #f))
((cpad-hold? 0 start)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons start))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons start))
(cpad-clear! 0 start)
(set! (-> this opened-with-start?) #t)))
(set! (-> this ignore-menu-toggle?) #t))
(when (-> this draw-menu?)
Expand Down

0 comments on commit a150e59

Please sign in to comment.