From 0946cd18c674f5a56a24a12b47bee25ffcf42c94 Mon Sep 17 00:00:00 2001 From: joshuarwood Date: Thu, 12 Mar 2026 23:59:10 -0500 Subject: [PATCH 1/2] disable bbox padding when performing light los test to prevent shield transparency from blocking light artifacts --- src/game/chr.c | 5 ++++- src/include/bss.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/game/chr.c b/src/game/chr.c index 3e8f78571..d3454a608 100644 --- a/src/game/chr.c +++ b/src/game/chr.c @@ -4544,7 +4544,10 @@ void chrTestHit(struct prop *prop, struct shotdata *shotdata, bool isshooting, b if (hitpart) { if (chrGetShield(chr) > 0.0f) { - var8005efc0 = 10.0f / model->scale; +#ifndef PLATFORM_N64 + if (g_BgHitXluDisabled == false) +#endif + var8005efc0 = 10.0f / model->scale; } child = prop->child; diff --git a/src/include/bss.h b/src/include/bss.h index 5382431b1..63dc22fb9 100644 --- a/src/include/bss.h +++ b/src/include/bss.h @@ -295,6 +295,7 @@ extern s32 g_JpnMaxCacheItems; extern s32 var8009d370jf; #ifndef PLATFORM_N64 extern bool g_ValidGbcRomFound; +extern bool g_BgHitXluDisabled; #endif #endif From fc70da875eee44e0622da84f51b11929431c78f1 Mon Sep 17 00:00:00 2001 From: joshuarwood Date: Fri, 13 Mar 2026 18:01:10 -0500 Subject: [PATCH 2/2] add a comment describing PC specific shield handling --- src/game/chr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/game/chr.c b/src/game/chr.c index d3454a608..c9ba3ed50 100644 --- a/src/game/chr.c +++ b/src/game/chr.c @@ -4545,6 +4545,13 @@ void chrTestHit(struct prop *prop, struct shotdata *shotdata, bool isshooting, b if (hitpart) { if (chrGetShield(chr) > 0.0f) { #ifndef PLATFORM_N64 + /** + * var8005efc0 > 0.0f adds a padding to bbox hit detection + * in modelTestBboxNodeForHit() that accounts for a character's + * surrounding shield. We skip this step on PC when checking + * line-of-sight hits to light artifacts because lights should + * be visible through the transparent shield. + */ if (g_BgHitXluDisabled == false) #endif var8005efc0 = 10.0f / model->scale;