From aa6787579263015207789dda82c8873bf693a70f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 12 Jun 2020 21:46:24 +0200 Subject: [PATCH] - enabled r_shadows in Blood. This was the only game not allowing to switch off the shadows. --- source/blood/src/view.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/source/blood/src/view.cpp b/source/blood/src/view.cpp index 54a889636..5b190eaba 100644 --- a/source/blood/src/view.cpp +++ b/source/blood/src/view.cpp @@ -2149,17 +2149,20 @@ tspritetype *viewAddEffect(int nTSprite, VIEW_EFFECT nViewEffect) } case VIEW_EFFECT_0: { - auto pNSprite = viewInsertTSprite(pTSprite->sectnum, 32767, pTSprite); - pNSprite->z = getflorzofslope(pTSprite->sectnum, pNSprite->x, pNSprite->y); - pNSprite->shade = 127; - pNSprite->cstat |= 2; - pNSprite->xrepeat = pTSprite->xrepeat; - pNSprite->yrepeat = pTSprite->yrepeat>>2; - pNSprite->picnum = pTSprite->picnum; - pNSprite->pal = 5; - int height = tilesiz[pNSprite->picnum].y; - int center = height / 2 + tileTopOffset(pNSprite->picnum); - pNSprite->z -= (pNSprite->yrepeat<<2)*(height-center); + if (r_shadows) + { + auto pNSprite = viewInsertTSprite(pTSprite->sectnum, 32767, pTSprite); + pNSprite->z = getflorzofslope(pTSprite->sectnum, pNSprite->x, pNSprite->y); + pNSprite->shade = 127; + pNSprite->cstat |= 2; + pNSprite->xrepeat = pTSprite->xrepeat; + pNSprite->yrepeat = pTSprite->yrepeat >> 2; + pNSprite->picnum = pTSprite->picnum; + pNSprite->pal = 5; + int height = tilesiz[pNSprite->picnum].y; + int center = height / 2 + tileTopOffset(pNSprite->picnum); + pNSprite->z -= (pNSprite->yrepeat << 2) * (height - center); + } break; } case VIEW_EFFECT_1: