check surfacetype to better skip glass props

This commit is contained in:
joshuarwood committed 2025-11-07 19:50:42 -06:00
1 parent 7a728c7feb
commit 42ef08d662
1 file changed
+3 -1
+3 -1
View File
@@ -1070,7 +1070,9 @@ bool shotTestLos(struct coord *gunpos2d, struct coord *gundir2d, struct coord *g
}
if (shotdata.hits[0].prop) {
// ignore some glass parts and shields
if (shotdata.hits[0].slowsbullet && shotdata.hits[0].hitthing.texturenum != 10000) {
if (shotdata.hits[0].slowsbullet && shotdata.hits[0].hitthing.texturenum != 10000 &&
g_Textures[shotdata.hits[0].hitthing.texturenum].surfacetype != SURFACETYPE_GLASS &&
g_Textures[shotdata.hits[0].hitthing.texturenum].surfacetype != SURFACETYPE_GLASSXLU) {
return false;
}
}