Skip to content

Commit 396fd63

Browse files
authored
[jak3] Include orbs in crates for track skill debug option (open-goal#4275)
<img width="2756" height="2066" alt="image" src="https://github.com/user-attachments/assets/88034b10-c502-4df0-b5b8-6d6357eed433" />
1 parent faa9b91 commit 396fd63

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

goal_src/jak3/pc/debug/pc-debug-methods.gc

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,25 @@
135135
(when (nonzero? actors)
136136
(dotimes (ii (-> actors length))
137137
(let ((e (-> actors data ii actor)))
138-
(when (and (= (-> e etype symbol) 'skill) (or (not (-> e extra)) (zero? (-> e extra)) (not (logtest? (-> e extra perm status) (entity-perm-status dead)))))
139-
(add-debug-line #t (bucket-id debug-no-zbuf1) start-pos (-> e trans) (new 'static 'rgba :r #xff :a #x80) #f (the-as rgba -1))
140-
(format *stdcon* "~S at ~m ~m ~m (~m away)~%" (res-lump-struct e 'name string) (-> e trans x) (-> e trans y) (-> e trans z) (vector-vector-distance start-pos (-> e trans)))
138+
(when (or (not (-> e extra)) (zero? (-> e extra)) (not (logtest? (-> e extra perm status) (entity-perm-status dead))))
139+
(case (-> e etype symbol)
140+
(('skill)
141+
;; standalone orb, always track
142+
(add-debug-line #t (bucket-id debug-no-zbuf1) start-pos (-> e trans) (new 'static 'rgba :r #xff :a #x80) #f (the-as rgba -1))
143+
(format *stdcon* "~S at ~m ~m ~m (~m away)~%" (res-lump-struct e 'name string) (-> e trans x) (-> e trans y) (-> e trans z) (vector-vector-distance start-pos (-> e trans)))
144+
)
145+
(('crate 'market-crate 'market-sack-a 'market-sack-b 'market-basket-a 'market-basket-b 'wascity-market-crate 'wascity-market-sack-a 'wascity-market-sack-b 'wascity-market-basket-a 'wascity-market-basket-b 'urn-a 'urn-b 'urn-c)
146+
;; some kind of crate, only track if pickup-type = skill and pickup-amount != collected amount (there is one crate that spawns 2 orbs, one crate that spawns a golden triple orb)
147+
(let ((e-info (res-lump-data e 'eco-info (pointer int32) :time 0.0)))
148+
(when (and (= (-> e-info 0) (pickup-type skill))
149+
(!= (-> e-info 1) (-> e extra perm user-int8 1)))
150+
(add-debug-line #t (bucket-id debug-no-zbuf1) start-pos (-> e trans) (new 'static 'rgba :r #xff :a #x80) #f (the-as rgba -1))
151+
(format *stdcon* "~S at ~m ~m ~m (~m away)~%" (res-lump-struct e 'name string) (-> e trans x) (-> e trans y) (-> e trans z) (vector-vector-distance start-pos (-> e trans)))
152+
)
153+
)
154+
)
141155
)
156+
)
142157
)
143158
)
144159
)

0 commit comments

Comments
 (0)