SW: Fix assertions and OOB so that the player can noclip OOB

git-svn-id: https://svn.eduke32.com/eduke32@8348 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2019-12-03 09:44:51 +00:00 committed by Christoph Oelckers
parent f19848a1b3
commit 823e47f3e8
9 changed files with 157 additions and 60 deletions

View file

@ -7347,7 +7347,6 @@ pDisplaySprites(PLAYERp pp)
int smoothratio;
unsigned i;
SECT_USERp sectu = SectUser[pp->cursectnum];
uint8_t pal = 0;
short ang;
int flags;
@ -7488,17 +7487,23 @@ pDisplaySprites(PLAYERp pp)
// if its a weapon sprite and the view is set to the outside don't draw the sprite
if (TEST(psp->flags, PANF_WEAPON_SPRITE))
{
pal = sector[pp->cursectnum].floorpal;
if (sector[pp->cursectnum].floorpal != PALETTE_DEFAULT)
SECT_USERp sectu = nullptr;
int16_t floorshade = 0;
if (pp->cursectnum >= 0)
{
SECT_USERp sectu = SectUser[pp->cursectnum];
if (sectu && TEST(sectu->flags, SECTFU_DONT_COPY_PALETTE))
pal = PALETTE_DEFAULT;
}
sectu = SectUser[pp->cursectnum];
pal = sector[pp->cursectnum].floorpal;
floorshade = sector[pp->cursectnum].floorshade;
if (pal == PALETTE_FOG || pal == PALETTE_DIVE || pal == PALETTE_DIVE_LAVA)
pal = psp->pal; // Set it back
if (pal != PALETTE_DEFAULT)
{
if (sectu && TEST(sectu->flags, SECTFU_DONT_COPY_PALETTE))
pal = PALETTE_DEFAULT;
}
if (pal == PALETTE_FOG || pal == PALETTE_DIVE || pal == PALETTE_DIVE_LAVA)
pal = psp->pal; // Set it back
}
///////////
@ -7508,7 +7513,7 @@ pDisplaySprites(PLAYERp pp)
}
//shade = overlay_shade = DIV2(sector[pp->cursectnum].floorshade + sector[pp->cursectnum].ceilingshade);
shade = overlay_shade = sector[pp->cursectnum].floorshade - 10;
shade = overlay_shade = floorshade - 10;
if (TEST(psp->PlayerP->Flags, PF_VIEW_FROM_OUTSIDE))
{