mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-23 15:52:41 +02:00
Merge pull request #706 from joshuarwood/shield_light_fix
Fix for light visibility through shields
This commit is contained in:
2 files changed
+11
No files matched your search
@@ -4544,6 +4544,16 @@ void chrTestHit(struct prop *prop, struct shotdata *shotdata, bool isshooting, b
|
|||||||
|
|
||||||
if (hitpart) {
|
if (hitpart) {
|
||||||
if (chrGetShield(chr) > 0.0f) {
|
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;
|
var8005efc0 = 10.0f / model->scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -295,6 +295,7 @@ extern s32 g_JpnMaxCacheItems;
|
|||||||
extern s32 var8009d370jf;
|
extern s32 var8009d370jf;
|
||||||
#ifndef PLATFORM_N64
|
#ifndef PLATFORM_N64
|
||||||
extern bool g_ValidGbcRomFound;
|
extern bool g_ValidGbcRomFound;
|
||||||
|
extern bool g_BgHitXluDisabled;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Reference in new issue
Block a user