mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- SW: replaced some asserts with proper value checks.
These asserts can actually be triggered by some maps with incorrect setups.
This commit is contained in:
parent
ae94fb921c
commit
bde644f77f
1 changed files with 17 additions and 10 deletions
|
@ -838,14 +838,18 @@ FindCeilingView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum
|
|||
if (*sectnum < 0)
|
||||
return false;
|
||||
|
||||
ASSERT(sp);
|
||||
ASSERT(sp->hitag == VIEW_THRU_FLOOR);
|
||||
if (!sp || sp->hitag != VIEW_THRU_FLOOR)
|
||||
{
|
||||
*sectnum = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
pix_diff = labs(z - sector[sp->sectnum].floorz) >> 8;
|
||||
newz = sector[sp->sectnum].floorz + ((pix_diff / 128) + 1) * Z(128);
|
||||
|
||||
if (!testnewrenderer)
|
||||
{
|
||||
pix_diff = labs(z - sector[sp->sectnum].floorz) >> 8;
|
||||
newz = sector[sp->sectnum].floorz + ((pix_diff / 128) + 1) * Z(128);
|
||||
|
||||
it.Reset(STAT_FAF);
|
||||
while ((i = it.NextIndex()) >= 0)
|
||||
{
|
||||
|
@ -932,15 +936,18 @@ FindFloorView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum)
|
|||
if (*sectnum < 0)
|
||||
return false;
|
||||
|
||||
ASSERT(sp);
|
||||
ASSERT(sp->hitag == VIEW_THRU_CEILING);
|
||||
if (!sp || sp->hitag != VIEW_THRU_CEILING)
|
||||
{
|
||||
*sectnum = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!testnewrenderer)
|
||||
{
|
||||
// move ceiling multiple of 128 so that the wall tile will line up
|
||||
pix_diff = labs(z - sector[sp->sectnum].ceilingz) >> 8;
|
||||
newz = sector[sp->sectnum].ceilingz - ((pix_diff / 128) + 1) * Z(128);
|
||||
|
||||
if (!testnewrenderer)
|
||||
{
|
||||
it.Reset(STAT_FAF);
|
||||
while ((i = it.NextIndex()) >= 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue