mirror of
https://github.com/open-goal/jak-project
synced 2026-07-31 16:17:16 -04:00
jak2: add vehicle hijack lines PC cheat (#3205)
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
This commit is contained in:
@@ -7381,6 +7381,7 @@
|
||||
(progress-cheats-board-tricks #x1260)
|
||||
(progress-cheats-weather-bad #x1261)
|
||||
(progress-cheats-weather-good #x1262)
|
||||
(progress-cheats-hijack-lines #x1263)
|
||||
(progress-camera-options #x1280)
|
||||
(progress-camera-options-first-horz #x1281)
|
||||
(progress-camera-options-first-vert #x1282)
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
"1260": "JET-Board Trick Display",
|
||||
"1261": "Bad Weather",
|
||||
"1262": "Nice Weather",
|
||||
"1263": "Vehicle Hijack Voice Lines",
|
||||
"1280": "Camera Options",
|
||||
"1281": "Left/Right (1st Person)",
|
||||
"1282": "Up/Down (1st Person)",
|
||||
|
||||
@@ -696,6 +696,7 @@
|
||||
(progress-cheats-board-tricks #x1260)
|
||||
(progress-cheats-weather-bad #x1261)
|
||||
(progress-cheats-weather-good #x1262)
|
||||
(progress-cheats-hijack-lines #x1263)
|
||||
(progress-camera-options #x1280)
|
||||
(progress-camera-options-first-horz #x1281)
|
||||
(progress-camera-options-first-vert #x1282)
|
||||
|
||||
@@ -12,6 +12,19 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; added for hijack lines cheat
|
||||
(define *jak-hijack-speeches* (new 'static 'boxed-array :type string
|
||||
"jak040" "jak041" "jak042" "jak044" "jak045" "jak046"
|
||||
"jak047" "jak048" "jak049" "jak050" "jak051" "jak052"
|
||||
"jak053" "jak054" "jak055"
|
||||
)
|
||||
)
|
||||
|
||||
(define *civ-hijack-speeches* (new 'static 'boxed-array :type string
|
||||
"cit051" "cit053" "cit055" "cit056" "cit057" "cit058"
|
||||
)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *pilot-mods* (new 'static 'surface :name 'empty :seek0 1.0 :seek90 1.0 :seek180 1.0 :fric 1.0))
|
||||
@@ -214,6 +227,20 @@
|
||||
(let ((s3-0 (get-seat-count (the-as vehicle s4-1))))
|
||||
(dotimes (s2-0 s3-0)
|
||||
(let ((a0-20 (get-rider-in-seat (the-as vehicle s4-1) s2-0)))
|
||||
;; og:preserve-this added for hijack lines cheat
|
||||
(when (and a0-20 (or (type-type? (-> a0-20 type) citizen-norm-rider) (type-type? (-> a0-20 type) crimson-guard-rider)))
|
||||
(let ((cheat? (pc-cheats? (-> *pc-settings* cheats) hijack-lines))
|
||||
(chance? (rand-vu-percent? (-> *pc-cheat-state* hijack-speech-chance))))
|
||||
(when (and cheat? chance?)
|
||||
(add-process *gui-control* self (gui-channel jak) (gui-action play)
|
||||
(-> *jak-hijack-speeches* (rand-vu-int-range 0 (1- (-> *jak-hijack-speeches* length)))) -99.0 0)
|
||||
(if (type-type? (-> a0-20 type) citizen-norm-rider)
|
||||
(add-process *gui-control* self (gui-channel jak) (gui-action play)
|
||||
(-> *civ-hijack-speeches* (rand-vu-int-range 0 (1- (-> *civ-hijack-speeches* length)))) -99.0 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and a0-20 (send-event a0-20 'knocked-off))
|
||||
(put-rider-in-seat (the-as vehicle s4-1) s2-0 (the-as process-focusable #f))
|
||||
)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
;; cheats
|
||||
(defconstant PC_CHEAT_MAX 19) ;; number of cheats
|
||||
(defconstant PC_CHEAT_MAX 20) ;; number of cheats
|
||||
(defenum pc-cheats
|
||||
:bitfield #t
|
||||
:type uint64
|
||||
@@ -43,6 +43,7 @@
|
||||
(board-tricks)
|
||||
(weather-bad)
|
||||
(weather-good)
|
||||
(hijack-lines)
|
||||
)
|
||||
|
||||
;; pc enum for languages. this is the game's languages + custom ones.
|
||||
@@ -232,6 +233,7 @@
|
||||
(airlock-speed float)
|
||||
(airlock-close-speed float)
|
||||
(turbo-board-speed float)
|
||||
(hijack-speech-chance float)
|
||||
(flags pc-cheat-state-flag)
|
||||
)
|
||||
)
|
||||
@@ -241,6 +243,7 @@
|
||||
:airlock-speed 1.75
|
||||
:airlock-close-speed 1.75
|
||||
:turbo-board-speed 1.5
|
||||
:hijack-speech-chance 0.45
|
||||
))
|
||||
|
||||
(defmacro cheat-state-flag? (&rest flags)
|
||||
|
||||
Reference in New Issue
Block a user