From 58d957a3052225a4fdbb89749caaf61391ff6936 Mon Sep 17 00:00:00 2001 From: Matt Dallmeyer Date: Sun, 14 Jun 2026 22:23:12 -0700 Subject: [PATCH] [jak3] track-skill: Better check for orbs collected from crate (#4312) The one crate with gold triple orb in temple doesn't update `(-> e extra perm user-int8 1)` the way I was expecting based on how the one crate that drops two orbs behaved. This check fixes that and is a bit simpler --- goal_src/jak3/pc/debug/pc-debug-methods.gc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/goal_src/jak3/pc/debug/pc-debug-methods.gc b/goal_src/jak3/pc/debug/pc-debug-methods.gc index 70c24e436a..5cf6449802 100644 --- a/goal_src/jak3/pc/debug/pc-debug-methods.gc +++ b/goal_src/jak3/pc/debug/pc-debug-methods.gc @@ -143,10 +143,10 @@ (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) + ;; some kind of crate, only track if pickup-type = skill and it doesnt have subtask-complete status (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))) + (not (logtest? (-> e extra perm status) (entity-perm-status subtask-complete)))) (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))) )