Skip to content

Commit

Permalink
Revert "use is-vanilla-level helper for actor vis and birth/pause dis…
Browse files Browse the repository at this point in the history
…tance (#…" (#110)

This reverts commit 54fcd8a.
  • Loading branch information
dallmeyer authored Sep 16, 2024
1 parent 54fcd8a commit 19b237d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 21 deletions.
47 changes: 31 additions & 16 deletions goal_src/jak1/engine/level/level.gc
Original file line number Diff line number Diff line change
Expand Up @@ -702,26 +702,41 @@

;; method 27 level

(defun vanilla-level? ((lvl-name symbol))
(case lvl-name :comp name=
(('intro 'title 'demo
'training 'village1 'beach 'jungle 'jungleb 'misty 'firecanyon
'village2 'sunken 'sunkenb 'rolling 'swamp 'ogre
'village3 'snow 'maincave 'darkcave 'robocave 'lavatube
'citadel 'finalboss)
(return #t)
)
)
;; if we get here, it's some custom level
#f
)

;; method 10 level
(defmethod is-object-visible? ((this level) (arg0 int))
"Is arg0 visible? Note that this will return #f if the visibility data is not loaded."
;; og:mod-base anything thats not a vanilla level -> always show actors
(if (not (vanilla-level? (-> this name)))
(return #t))
(case (-> this name)
:comp
name=
(('intro 'title
'demo
'training
'village1
'beach
'jungle
'jungleb
'misty
'firecanyon
'village2
'sunken
'sunkenb
'rolling
'swamp
'ogre
'village3
'snow
'maincave
'darkcave
'robocave
'lavatube
'citadel
'finalboss)
;; vanilla level -> fall through to normal checks
)
(else
;; some custom level -> return true
(return #t)))
;; og:preserve-this pc port added option to show every actor regardless
(with-pc
(if (not (-> *pc-settings* ps2-actor-vis?)) (return #t)))
Expand Down
5 changes: 0 additions & 5 deletions goal_src/jak1/pc/pckernel-common.gc
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,6 @@
(set! (-> *ACTOR-bank* birth-dist) (meters 10000))
(set! (-> *ACTOR-bank* pause-dist) (meters 10000))
(set! (-> *ACTOR-bank* birth-max) 1000))
((not (vanilla-level? (-> (level-get-target-inside *level*) name)))
;; modbase - not in a vanilla level, use big distances
(set! (-> *ACTOR-bank* birth-dist) (meters 10000))
(set! (-> *ACTOR-bank* pause-dist) (meters 10000))
(set! (-> *ACTOR-bank* birth-max) 1000))
((> (-> *ACTOR-bank* birth-dist) (meters 220)) ;; the original caps at 220m, exceeding that means it was using our hacks
(set! (-> *ACTOR-bank* birth-dist) (meters 220))
(set! (-> *ACTOR-bank* pause-dist) (meters 220))))
Expand Down

0 comments on commit 19b237d

Please sign in to comment.