Skip to content

Commit

Permalink
Limit sprite shadows to only monsters and players
Browse files Browse the repository at this point in the history
  • Loading branch information
nashmuhandes authored and Doom2fan committed Jun 10, 2020
1 parent 03600c2 commit 790b7cb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/rendering/swrenderer/scene/r_opaque_pass.cpp
Expand Up @@ -967,7 +967,13 @@ namespace swrenderer
{
RenderSprite::Project(Thread, thing, sprite.pos, sprite.tex, sprite.spriteScale, sprite.renderflags, fakeside, fakefloor, fakeceiling, sec, thinglightlevel, foggy, thingColormap, false);

if (r_actorshadows)
bool drawSpriteShadows =
(
r_actorshadows &&
((thing->flags3 & MF3_ISMONSTER) || thing->IsKindOf(NAME_PlayerPawn))
);

if (drawSpriteShadows)
{
DVector2 shadowScale = sprite.spriteScale;
shadowScale.Y *= (thing->Scale.Y * 0.1);
Expand Down

0 comments on commit 790b7cb

Please sign in to comment.