From 23aafa4ffac2d3e4c22e4549bc3d7163bc9353ed Mon Sep 17 00:00:00 2001 From: joshuarwood Date: Thu, 12 Mar 2026 18:31:17 -0500 Subject: [PATCH] use texturenum -1 for chr hits because cheap version of chrTestHit returns an uninitialized value --- src/game/prop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/prop.c b/src/game/prop.c index 3ed8cafc8..bdc01ee86 100644 --- a/src/game/prop.c +++ b/src/game/prop.c @@ -1071,7 +1071,7 @@ 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; + texturenum = (prop->type == PROPTYPE_CHR || prop->type == PROPTYPE_PLAYER) ? -1 : 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 && texturenum != 10000 &&