forked from Ports/goldeneye-pc-port
Unbreakable glass decals fix
This commit is contained in:
1 parent
06856ed973
commit
fd7800cf80
1 file changed
+15
@@ -2133,6 +2133,21 @@ void explosionCreateBulletImpact(struct coord3d *pos, struct coord3d *arg1, s16
|
||||
impact_type = 0x10;
|
||||
}
|
||||
|
||||
#ifdef PORT
|
||||
/* Glass objects: the bulletproof/unbreakable ones take the texture-based
|
||||
* hole, a decal drawn in the opaque pass. Transparent glass writes no
|
||||
* depth there, so the decal depth test (RDP ZMODE_DEC, emulated exactly)
|
||||
* rejects every pixel. Use the window crack the breakable glass gets: it
|
||||
* is drawn after the glass in the translucent pass, without the decal
|
||||
* test. */
|
||||
if ((prop != NULL) && (impact_type != 0x10)
|
||||
&& ((prop->obj->type == PROPDEF_GLASS) || (prop->obj->type == PROPDEF_TINTED_GLASS))
|
||||
&& ((g_ImpactTypes[impact_type].unk2 >= 2) || (g_ImpactTypes[impact_type].unk1 != 2)))
|
||||
{
|
||||
impact_type = (randomGetNext() % 3) + 0x11;
|
||||
}
|
||||
#endif
|
||||
|
||||
spA0.f[0] = pos->f[0];
|
||||
spA0.f[1] = pos->f[1];
|
||||
spA0.f[2] = pos->f[2];
|
||||
|
||||
Reference in new issue
Block a user