From 5f8cc046cca51518bc3fc9f59b8a56d79eaefd64 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Mon, 23 May 2011 14:22:32 +0000 Subject: [PATCH] fix: loop joining/sector splitting with TROR'ed sectors, rendering bugs due to slopes. change keys: [I] toggles invisibility preview, ['I] toggles sprite invisibility bit git-svn-id: https://svn.eduke32.com/eduke32@1893 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/build.c | 7 +++++++ polymer/eduke32/build/src/engine.c | 20 +++++++------------- polymer/eduke32/source/astub.c | 21 +++++++++++++++++---- 3 files changed, 31 insertions(+), 17 deletions(-) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index ae0928bb8..b83d660da 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -5339,7 +5339,14 @@ check_next_sector: ; //clear out old sector's next pointers for clean deletesector for (j=startwall; j<=endwall; j++) + { +#ifdef YAX_ENABLE + // same thing for yax-nextwalls (only forward links!) + yax_setnextwall(j, YAX_CEILING, -1); + yax_setnextwall(j, YAX_FLOOR, -1); +#endif wall[j].nextwall = wall[j].nextsector = -1; + } deletesector(splitsect); //Check pointers diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 9f90885d4..ef83a676a 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -4286,11 +4286,8 @@ static void drawalls(int32_t bunch) { if ((cz[2] <= cz[0]) && (cz[3] <= cz[1])) { - if (globparaceilclip -#ifdef YAX_ENABLE - || (sector[globalcursectnum].ceilingstat&4096) -#endif -) +// if (globparaceilclip) + if (getceilzofslope(sectnum, globalposx, globalposy) <= globalposz) for (x=x1; x<=x2; x++) if (uplc[x] > umost[x]) if (umost[x] <= dmost[x]) @@ -4380,11 +4377,8 @@ static void drawalls(int32_t bunch) { if ((fz[2] >= fz[0]) && (fz[3] >= fz[1])) { - if (globparaflorclip -#ifdef YAX_ENABLE - || (sector[globalcursectnum].floorstat&4096) -#endif - ) +// if (globparaflorclip) + if (getflorzofslope(sectnum, globalposx, globalposy) >= globalposz) for (x=x1; x<=x2; x++) if (dplc[x] < dmost[x]) if (umost[x] <= dmost[x]) @@ -7632,7 +7626,7 @@ void initspritelists(void) void drawrooms(int32_t daposx, int32_t daposy, int32_t daposz, int16_t daang, int32_t dahoriz, int16_t dacursectnum) { - int32_t i, j, cz, fz, closest; + int32_t i, j, /*cz, fz,*/ closest; int16_t *shortptr1, *shortptr2; beforedrawrooms = 0; @@ -7751,13 +7745,13 @@ void drawrooms(int32_t daposx, int32_t daposy, int32_t daposz, return; } } - +/* globparaceilclip = 1; globparaflorclip = 1; getzsofslope(globalcursectnum,globalposx,globalposy,&cz,&fz); if (globalposz < cz) globparaceilclip = 0; if (globalposz > fz) globparaflorclip = 0; - +*/ scansector(globalcursectnum); if (inpreparemirror) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 29d32f551..74392b16c 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -6068,14 +6068,27 @@ static void Keys3d(void) // printext256(1*4,1*8,11,-1,tempbuf,0); } - if (keystatus[KEYSC_QUOTE] && PRESSED_KEYSC(I)) // ' i + if (keystatus[KEYSC_I]) { - showinvisibility = !showinvisibility; + keystatus[KEYSC_I] = 0; + + if (keystatus[KEYSC_QUOTE]) + { + if (AIMING_AT_SPRITE) + { + sprite[searchwall].cstat ^= 32768; + message("Sprite %d made %svisible", searchwall, (sprite[searchwall].cstat&32768) ? "in":""); + } + } + else // ' i + { + showinvisibility = !showinvisibility; #ifndef YAX_ENABLE - message("Show invisible sprites %s", showinvisibility?"enabled":"disabled"); + message("Show invisible sprites %s", showinvisibility?"enabled":"disabled"); #else - message("Show invisible objects %s", showinvisibility?"enabled":"disabled"); + message("Show invisible objects %s", showinvisibility?"enabled":"disabled"); #endif + } } if (keystatus[KEYSC_QUOTE] && PRESSED_KEYSC(X)) // ' x