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
This commit is contained in:
helixhorned 2011-05-23 14:22:32 +00:00
parent e92099b2f7
commit 5f8cc046cc
3 changed files with 31 additions and 17 deletions

View file

@ -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

View file

@ -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)

View file

@ -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