From 396fd63c93e013b08d7d2b4a273fd00ae915504c Mon Sep 17 00:00:00 2001 From: Matt Dallmeyer Date: Wed, 10 Jun 2026 16:48:38 -0700 Subject: [PATCH] [jak3] Include orbs in crates for track skill debug option (#4275) image --- goal_src/jak3/pc/debug/pc-debug-methods.gc | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/goal_src/jak3/pc/debug/pc-debug-methods.gc b/goal_src/jak3/pc/debug/pc-debug-methods.gc index 8f426fabf8..70c24e436a 100644 --- a/goal_src/jak3/pc/debug/pc-debug-methods.gc +++ b/goal_src/jak3/pc/debug/pc-debug-methods.gc @@ -135,10 +135,25 @@ (when (nonzero? actors) (dotimes (ii (-> actors length)) (let ((e (-> actors data ii actor))) - (when (and (= (-> e etype symbol) 'skill) (or (not (-> e extra)) (zero? (-> e extra)) (not (logtest? (-> e extra perm status) (entity-perm-status dead))))) - (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)) - (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))) + (when (or (not (-> e extra)) (zero? (-> e extra)) (not (logtest? (-> e extra perm status) (entity-perm-status dead)))) + (case (-> e etype symbol) + (('skill) + ;; standalone orb, always track + (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)) + (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))) + ) + (('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) + ;; 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) + (let ((e-info (res-lump-data e 'eco-info (pointer int32) :time 0.0))) + (when (and (= (-> e-info 0) (pickup-type skill)) + (!= (-> e-info 1) (-> e extra perm user-int8 1))) + (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)) + (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))) + ) + ) + ) ) + ) ) ) )