From 2b80874646c89ea5a4cd3487240a0d912f4deb0b Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Wed, 19 Mar 2014 23:40:02 +0000 Subject: [PATCH] MD2's replacing skinned mobj fix MD2's that replace mobjs that have a skin, but the skin doesn't have an MD2 now display. --- src/hardware/hw_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 18a287ee4..61e50f926 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3836,7 +3836,7 @@ static void HWR_DrawSprites(void) HWR_DrawPrecipitationSprite(spr); else #endif - if (spr->mobj->skin) + if (spr->mobj && spr->mobj->skin && spr->mobj->sprite == SPR_PLAY) { if (!cv_grmd2.value || (cv_grmd2.value && md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound == true)) HWR_DrawSprite(spr); @@ -3865,7 +3865,7 @@ static void HWR_DrawMD2S(void) if (!spr->precip) { #endif - if (spr->mobj && spr->mobj->skin) + if (spr->mobj && spr->mobj->skin && spr->mobj->sprite == SPR_PLAY) { if ((md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound == false) && (md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale > 0.0f)) HWR_DrawMD2(spr);