From ecebeed296a4a2b22f3a3c6d32b69a2f6c1d1f4b Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Fri, 16 Dec 2016 22:16:24 +0100 Subject: [PATCH] Fix player sprites disappearing when a texture camera is visible --- src/r_poly_playersprite.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/r_poly_playersprite.cpp b/src/r_poly_playersprite.cpp index 381f2e203..bf5c2767c 100644 --- a/src/r_poly_playersprite.cpp +++ b/src/r_poly_playersprite.cpp @@ -35,11 +35,8 @@ EXTERN_CVAR(Bool, st_scale) void RenderPolyPlayerSprites::Render() { - // In theory, everything in this function could be moved to RenderRemainingSprites. - // Just in case there's some hack elsewhere that relies on this happening as part - // of the main rendering we do it exactly as the old software renderer did. - - ScreenSprites.clear(); + // This code cannot be moved directly to RenderRemainingSprites because the engine + // draws the canvas textures between this call and the final call to RenderRemainingSprites.. if (!r_drawplayersprites || !camera || @@ -90,6 +87,7 @@ void RenderPolyPlayerSprites::RenderRemainingSprites() { for (auto &sprite : ScreenSprites) sprite.Render(); + ScreenSprites.clear(); } void RenderPolyPlayerSprites::RenderSprite(DPSprite *sprite, AActor *owner, float bobx, float boby, double wx, double wy, double ticfrac)