mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-23 15:52:41 +02:00
Merge pull request #669 from joshuarwood/light_fix_for_xlu_prop
Fix light transparency for tinted glass doors
This commit is contained in:
1 file changed
+6
-1
+6
-1
@@ -992,6 +992,8 @@ bool shotTestLos(struct coord *gunpos2d, struct coord *gundir2d, struct coord *g
|
||||
RoomNum spb8[8];
|
||||
RoomNum *roomsptr;
|
||||
struct prop *prop;
|
||||
s16 texturenum;
|
||||
u32 surfacetype;
|
||||
|
||||
shotdata.gunpos3d.x = gunpos3d->x;
|
||||
shotdata.gunpos3d.y = gunpos3d->y;
|
||||
@@ -1069,8 +1071,11 @@ bool shotTestLos(struct coord *gunpos2d, struct coord *gundir2d, struct coord *g
|
||||
objTestHit(prop, &shotdata);
|
||||
}
|
||||
if (shotdata.hits[0].prop) {
|
||||
texturenum = shotdata.hits[0].hitthing.texturenum;
|
||||
surfacetype = (texturenum >= 0 && texturenum < NUM_TEXTURES) ? g_Textures[texturenum].surfacetype : SURFACETYPE_DEFAULT;
|
||||
// ignore some glass parts and shields
|
||||
if (shotdata.hits[0].slowsbullet && shotdata.hits[0].hitthing.texturenum != 10000) {
|
||||
if (shotdata.hits[0].slowsbullet && texturenum != 10000 &&
|
||||
surfacetype != SURFACETYPE_GLASS && surfacetype != SURFACETYPE_GLASSXLU) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user