From 20d303ed15fe69dcc202e18a94378cfa5cc7ba42 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 9 Dec 2011 19:11:08 +0000 Subject: [PATCH] engine.c: fix shift by negative value in parascan(). git-svn-id: https://svn.eduke32.com/eduke32@2168 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/engine.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 878497fa3..05036963b 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -4243,6 +4243,15 @@ static void parascan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat, i globalhoriz = mulscale16(globalhoriz-(ydimen>>1),dapyscale) + (ydimen>>1); k = 11 - (picsiz[globalpicnum]&15) - dapskybits; + + // WGR2 SVN: select new episode after playing wgmicky1 with Polymer + // (maybe switched to classic earlier). + // --> rendmode==0, glrendmode==4, we end up with globalpicnum==266, + // picsiz...==9 and dapskybits==3 + // FIXME ? + if (k < 0) + k = 0; + x = -1; for (z=bunchfirst[bunch]; z>=0; z=p2[z])