diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index c62ab592e..2a63e944b 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -664,20 +664,38 @@ static void yax_tweakpicnums(int32_t bunchnum, int32_t cf, int32_t restore) for (SECTORS_OF_BUNCH(bunchnum, cf, i)) { dastat = (SECTORFLD(i,stat, cf)&(128+256)); - if (dastat==0) + + if (dastat==0 || (restore==1 && opicnum[cf][i]&0x8000)) { if (!restore) { opicnum[cf][i] = SECTORFLD(i,picnum, cf); if (editstatus && showinvisibility) SECTORFLD(i,picnum, cf) = MAXTILES-1; - else if ((dastat&(128+256))==0) + else //if ((dastat&(128+256))==0) SECTORFLD(i,picnum, cf) = 13; //FOF; } else { SECTORFLD(i,picnum, cf) = opicnum[cf][i]; } +#ifdef POLYMER + // will be called only in editor + if (rendmode==4) + { + if (!restore) + { + SECTORFLD(i,stat, cf) |= 128; + opicnum[cf][i] |= 0x8000; + } + else + { + SECTORFLD(i,stat, cf) &= ~128; + SECTORFLD(i,picnum, cf) &= 0x7fff; + opicnum[cf][i] = 0; + } + } +#endif } } } @@ -7964,6 +7982,16 @@ void drawrooms(int32_t daposx, int32_t daposy, int32_t daposz, # ifdef POLYMER if (rendmode == 4) { + // BEGIN TWEAK ceiling/floor fake 'TROR' pics + if (editstatus && showinvisibility) + { + for (i=0; i