From 2e3c2124445d85d2e8e1599b77d1c3bdc98f059a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 11 Nov 2021 23:32:49 +0100 Subject: [PATCH] - Duke: moved the temtempsector* arrays into the only function using them --- source/games/duke/src/_polymost.cpp | 7 +++---- source/games/duke/src/render.cpp | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/source/games/duke/src/_polymost.cpp b/source/games/duke/src/_polymost.cpp index 25d3f103a..27bf55075 100644 --- a/source/games/duke/src/_polymost.cpp +++ b/source/games/duke/src/_polymost.cpp @@ -1,9 +1,5 @@ BEGIN_DUKE_NS -extern int tempsectorz[MAXSECTORS]; -extern int tempsectorpicnum[MAXSECTORS]; - - void SE40_Draw(int tag, spritetype *spr, int x, int y, int z, binangle a, fixedhoriz h, int smoothratio) { int i, j = 0, k = 0; @@ -17,6 +13,9 @@ void SE40_Draw(int tag, spritetype *spr, int x, int y, int z, binangle a, fixedh tileDelete(FOF); if (!testgotpic(FOF, true)) return; + TArray tempsectorz(numsectors, true); + TArray tempsectorpicnum(numsectors, true); + floor1 = spr; if (spr->lotag == tag + 2) fofmode = tag + 0; diff --git a/source/games/duke/src/render.cpp b/source/games/duke/src/render.cpp index f730c92c0..600609f34 100644 --- a/source/games/duke/src/render.cpp +++ b/source/games/duke/src/render.cpp @@ -64,9 +64,6 @@ BEGIN_DUKE_NS // //--------------------------------------------------------------------------- -/*static*/ int tempsectorz[MAXSECTORS]; -/*static*/ int tempsectorpicnum[MAXSECTORS]; - void renderView(spritetype* playersprite, int sectnum, int x, int y, int z, binangle a, fixedhoriz h, binangle rotscrnang, int smoothratio) { if (!testnewrenderer)