mirror of
https://github.com/open-goal/jak-project
synced 2026-05-27 08:09:29 -04:00
small jak 2 bug fixes (#2649)
- elec gates now always render at max quality if you have PS2 lods disabled. the original render distances are so low that the one in caspad is impossible to see in normal gameplay. - `fort-entry-gate-11` and `com-airlock-outer-13` are specifically banned from the all actors hack because they are placed in a bad spot and Naughty Dog did not program the airlocks very well. - fixed NPC talk distance being bad for 1 frame. - fix `sew-scare-grunt` erroneously keeping its spool anim active if you killed the enemy.
This commit is contained in:
@@ -34853,8 +34853,8 @@
|
||||
(part-off sparticle-launch-control :offset-assert 368)
|
||||
(part-spawner-left part-spawner :offset-assert 372)
|
||||
(part-spawner-right part-spawner :offset-assert 376)
|
||||
(on-start basic :offset-assert 380)
|
||||
(on-stop basic :offset-assert 384)
|
||||
(on-start pair :offset-assert 380)
|
||||
(on-stop pair :offset-assert 384)
|
||||
(dividing-wall elec-wall :inline :offset-assert 400)
|
||||
(plane elec-wall 2 :inline :offset-assert 432)
|
||||
(wall-y float :offset-assert 496)
|
||||
|
||||
@@ -2231,7 +2231,10 @@
|
||||
(dotimes (s1-1 s2-3)
|
||||
(set! sv-48 (-> s3-4 data s1-1))
|
||||
(cond
|
||||
((and (#if PC_PORT (or (with-pc (-> *pc-settings* force-actors?)) (is-object-visible? s4-1 (-> sv-48 vis-id)))
|
||||
((and (#if PC_PORT (or (with-pc (and (-> *pc-settings* force-actors?) (not (let ((name (res-lump-struct (-> sv-48 entity) 'name string)))
|
||||
(or (string= name "fort-entry-gate-11")
|
||||
(string= name "com-airlock-outer-13"))))))
|
||||
(is-object-visible? s4-1 (-> sv-48 vis-id)))
|
||||
(is-object-visible? s4-1 (-> sv-48 vis-id)))
|
||||
(not (logtest? (-> sv-48 perm status) (entity-perm-status bit-9 bit-10)))
|
||||
(not (logtest? (-> sv-48 kill-mask) sv-32))
|
||||
|
||||
@@ -1761,9 +1761,6 @@ into 7 sections, which might explain the weird sizes in the center.
|
||||
(defmethod is-object-visible? level ((obj level) (arg0 int))
|
||||
"Is drawable arg0 visible? Note that this will return #f if the visibility data is not loaded."
|
||||
|
||||
;; note : pc port added option to show every actor regardless
|
||||
(with-pc (if (-> *pc-settings* force-actors?) (return #t)))
|
||||
|
||||
;; check the vis bits!
|
||||
(let* (;; lwu v1, 388(a0)
|
||||
(vis-data (-> obj vis-bits))
|
||||
|
||||
@@ -216,7 +216,9 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
)
|
||||
)
|
||||
)
|
||||
(< (vector-vector-distance (target-pos 0) s5-0) f30-0)
|
||||
;; PC PORT NOTE : added check so we don't use the wrong position for the distance check
|
||||
(and (logtest? (-> self draw status) (draw-control-status lod-set))
|
||||
(< (vector-vector-distance (target-pos 0) s5-0) f30-0))
|
||||
)
|
||||
)
|
||||
(< (- (-> self clock frame-counter) (-> self want-to-say)) (seconds 4))
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
(part-off sparticle-launch-control :offset-assert 368)
|
||||
(part-spawner-left part-spawner :offset-assert 372)
|
||||
(part-spawner-right part-spawner :offset-assert 376)
|
||||
(on-start basic :offset-assert 380)
|
||||
(on-stop basic :offset-assert 384)
|
||||
(on-start pair :offset-assert 380)
|
||||
(on-stop pair :offset-assert 384)
|
||||
(dividing-wall elec-wall :inline :offset-assert 400)
|
||||
(plane elec-wall 2 :inline :offset-assert 432)
|
||||
(wall-y float :offset-assert 496)
|
||||
@@ -256,7 +256,7 @@
|
||||
:enter (behavior ()
|
||||
(process-entity-status! self (entity-perm-status subtask-complete) #f)
|
||||
(if (-> self on-start)
|
||||
(script-eval (the-as pair (-> self on-start)) :vector (-> self root trans))
|
||||
(script-eval (-> self on-start) :vector (-> self root trans))
|
||||
)
|
||||
(dotimes (bolt-idx 5)
|
||||
(let* ((curr-bolt (-> self l-bolt bolt-idx bolt))
|
||||
@@ -480,6 +480,9 @@
|
||||
(set! (-> self lightning-quality)
|
||||
(lerp-scale 0.0 1.0 (vector-vector-distance focus-trans (-> self root trans)) 491520.0 163840.0)
|
||||
)
|
||||
;; changed for PC port so lightning can always render from farther than 2 inches away...
|
||||
(#when PC_PORT
|
||||
(if (not (-> *pc-settings* ps2-lod-dist?)) (set! (-> self lightning-quality) 1.0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -635,7 +638,7 @@
|
||||
(sound-play "elec-gate-off")
|
||||
(blocking-plane-destroy)
|
||||
(if (-> self on-stop)
|
||||
(script-eval (the-as pair (-> self on-stop)) :vector (-> self root trans))
|
||||
(script-eval (-> self on-stop) :vector (-> self root trans))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -725,7 +728,9 @@
|
||||
(defmethod set-elec-scale-if-close! elec-gate ((obj elec-gate) (arg0 float))
|
||||
"If [[target]]'s position is within `80` [[meters]], set the scale to the value provided
|
||||
@see [[elec-gate::29]]"
|
||||
(if (< (vector-vector-distance (-> obj root trans) (target-pos 0)) 327680.0)
|
||||
;; changed for PC port so we can render it at any distance
|
||||
(if (#if PC_PORT (or (not (-> *pc-settings* ps2-lod-dist?)) (< (vector-vector-distance (-> obj root trans) (target-pos 0)) (meters 80)))
|
||||
(< (vector-vector-distance (-> obj root trans) (target-pos 0)) (meters 80)))
|
||||
(set-elec-scale! obj arg0)
|
||||
)
|
||||
0
|
||||
@@ -879,8 +884,8 @@ This commonly includes things such as:
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "electric-gate" :fo-max 70) (-> obj root trans))
|
||||
)
|
||||
(set! (-> obj on-start) (res-lump-struct (-> obj entity) 'on-start basic))
|
||||
(set! (-> obj on-stop) (res-lump-struct (-> obj entity) 'on-stop basic))
|
||||
(set! (-> obj on-start) (res-lump-struct (-> obj entity) 'on-start pair))
|
||||
(set! (-> obj on-stop) (res-lump-struct (-> obj entity) 'on-stop pair))
|
||||
(elec-gate-method-24 obj)
|
||||
(set-palette! obj)
|
||||
(set-state! obj)
|
||||
|
||||
@@ -1667,6 +1667,9 @@ This commonly includes things such as:
|
||||
(logclear! (-> (the-as sew-grill actor-proc) draw status) (draw-control-status no-draw))
|
||||
)
|
||||
)
|
||||
;; pc port note : fix bug where the spool anim never gets aborted
|
||||
(#when PC_PORT
|
||||
(ja-abort-spooled-anim (-> self anim) (the-as art-joint-anim #f) -1))
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
|
||||
+6
-6
@@ -90,8 +90,8 @@
|
||||
(part-off sparticle-launch-control :offset-assert 368)
|
||||
(part-spawner-left part-spawner :offset-assert 372)
|
||||
(part-spawner-right part-spawner :offset-assert 376)
|
||||
(on-start basic :offset-assert 380)
|
||||
(on-stop basic :offset-assert 384)
|
||||
(on-start pair :offset-assert 380)
|
||||
(on-stop pair :offset-assert 384)
|
||||
(dividing-wall elec-wall :inline :offset-assert 400)
|
||||
(plane elec-wall 2 :inline :offset-assert 432)
|
||||
(wall-y float :offset-assert 496)
|
||||
@@ -328,7 +328,7 @@
|
||||
:enter (behavior ()
|
||||
(process-entity-status! self (entity-perm-status subtask-complete) #f)
|
||||
(if (-> self on-start)
|
||||
(script-eval (the-as pair (-> self on-start)) :vector (-> self root trans))
|
||||
(script-eval (-> self on-start) :vector (-> self root trans))
|
||||
)
|
||||
(dotimes (bolt-idx 5)
|
||||
(let* ((curr-bolt (-> self l-bolt bolt-idx bolt))
|
||||
@@ -708,7 +708,7 @@
|
||||
(sound-play "elec-gate-off")
|
||||
(blocking-plane-destroy)
|
||||
(if (-> self on-stop)
|
||||
(script-eval (the-as pair (-> self on-stop)) :vector (-> self root trans))
|
||||
(script-eval (-> self on-stop) :vector (-> self root trans))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -967,8 +967,8 @@ This commonly includes things such as:
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "electric-gate" :fo-max 70) (-> obj root trans))
|
||||
)
|
||||
(set! (-> obj on-start) (res-lump-struct (-> obj entity) 'on-start basic))
|
||||
(set! (-> obj on-stop) (res-lump-struct (-> obj entity) 'on-stop basic))
|
||||
(set! (-> obj on-start) (res-lump-struct (-> obj entity) 'on-start pair))
|
||||
(set! (-> obj on-stop) (res-lump-struct (-> obj entity) 'on-stop pair))
|
||||
(elec-gate-method-24 obj)
|
||||
(set-palette! obj)
|
||||
(set-state! obj)
|
||||
|
||||
Reference in New Issue
Block a user