From a2076027ddf1aa9121a5f1db8d7800788fb07909 Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 23 Oct 2015 23:00:02 +0000 Subject: [PATCH] Fix errant use of tsprite extra field to check an enemy's health. git-svn-id: https://svn.eduke32.com/eduke32@5401 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 8752e8b9c..1aa4519e3 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -7361,7 +7361,8 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo continue; default: // NOTE: wall-aligned sprites will never take on ceiling/floor shade... - if ((t->cstat&16) || (A_CheckEnemySprite((const spritetype *)t) && t->extra > 0) || t->statnum == STAT_PLAYER) + if ((t->cstat&16) || (A_CheckEnemySprite((const spritetype *)t) && + (unsigned)t->owner < MAXSPRITES && sprite[t->owner].extra > 0) || t->statnum == STAT_PLAYER) continue; }