From bac357a6bed56fb7410921da5734a04234e9770b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 19 Sep 2020 21:31:35 +0200 Subject: [PATCH] - disable the weapon in SW's savepics. The way the weapon drawer is implemented does not work well with save pictures. --- source/glbackend/glbackend.cpp | 1 + source/sw/src/draw.cpp | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index d48cbd8c6..0e6c0f020 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -339,6 +339,7 @@ void WriteSavePic(FileWriter* file, int width, int height) RenderState.EnableDrawBuffers(1, true); screen->SetViewportRects(&bounds); + twodpsp.Clear(); bool didit = gi->GenerateSavePic(); float Brightness = 8.f / (r_scenebrightness + 8.f); diff --git a/source/sw/src/draw.cpp b/source/sw/src/draw.cpp index 0b49ab388..41188c81f 100644 --- a/source/sw/src/draw.cpp +++ b/source/sw/src/draw.cpp @@ -1766,7 +1766,7 @@ drawscreen(PLAYERp pp, double smoothratio) renderSetAspect(viewingRange, divscale16(ydim * 8, xdim * 5)); - UpdatePanel(smoothratio); + if (!ScreenSavePic) UpdatePanel(smoothratio); #define SLIME 2305 // Only animate lava if its picnum is on screen @@ -1782,6 +1782,13 @@ drawscreen(PLAYERp pp, double smoothratio) } #endif + // if doing a screen save don't need to process the rest + if (ScreenSavePic) + { + DrawScreen = false; + return; + } + MarkSectorSeen(pp->cursectnum); @@ -1810,13 +1817,6 @@ drawscreen(PLAYERp pp, double smoothratio) } - // if doing a screen save don't need to process the rest - if (ScreenSavePic) - { - DrawScreen = false; - return; - } - //PrintLocationInfo(pp); //PrintSpriteInfo(pp);