- removed the error messages in GetOverlapSector(2).

These can actually be triggered in legitimate scenarios by hitscans so just returning 0 looks like the best way of handling it.
This commit is contained in:
Christoph Oelckers 2022-01-05 09:22:00 +01:00
parent eca3c29261
commit e1d32bdbf5

View file

@ -3866,10 +3866,11 @@ int GetOverlapSector(int x, int y, sectortype** over, sectortype** under)
if (!found)
{
I_Error("GetOverlapSector x = %d, y = %d, over %d, under %d", x, y, sectnum(*over), sectnum(*under));
// Contrary to expectations, this *CAN* happen in valid scenarios and therefore should not abort.
//I_Error("GetOverlapSector x = %d, y = %d, over %d, under %d", x, y, sectnum(*over), sectnum(*under));
return 0;
}
PRODUCTION_ASSERT(found != 0);
PRODUCTION_ASSERT(found <= 2);
// the are overlaping - check the z coord
@ -3955,10 +3956,11 @@ int GetOverlapSector2(int x, int y, sectortype** over, sectortype** under)
if (!found)
{
I_Error("GetOverlapSector2 x = %d, y = %d, over %d, under %d", x, y, sectnum(*over), sectnum(*under));
// Contrary to expectations, this *CAN* happen in valid scenarios and therefore should not abort.
//I_Error("GetOverlapSector2 x = %d, y = %d, over %d, under %d", x, y, sectnum(*over), sectnum(*under));
return 0;
}
PRODUCTION_ASSERT(found != 0);
PRODUCTION_ASSERT(found <= 2);
// the are overlaping - check the z coord