mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-16 10:49:07 +00:00
rem unnecessary asserts
This commit is contained in:
parent
fab2c8699c
commit
8280e04b23
1 changed files with 9 additions and 5 deletions
|
@ -404,11 +404,10 @@ CWaterLevel::GetWaterLevel(float fX, float fY, float fZ, float *pfOutLevel, bool
|
||||||
int32 x = WATER_TO_SMALL_SECTOR_X(fX + WATER_X_OFFSET);
|
int32 x = WATER_TO_SMALL_SECTOR_X(fX + WATER_X_OFFSET);
|
||||||
int32 y = WATER_TO_SMALL_SECTOR_Y(fY);
|
int32 y = WATER_TO_SMALL_SECTOR_Y(fY);
|
||||||
|
|
||||||
ASSERT( x >= 0 && x < MAX_SMALL_SECTORS );
|
#ifdef FIX_BUGS
|
||||||
ASSERT( y >= 0 && y < MAX_SMALL_SECTORS );
|
|
||||||
|
|
||||||
if ( x < 0 || x >= MAX_SMALL_SECTORS ) return false;
|
if ( x < 0 || x >= MAX_SMALL_SECTORS ) return false;
|
||||||
if ( y < 0 || y >= MAX_SMALL_SECTORS ) return false;
|
if ( y < 0 || y >= MAX_SMALL_SECTORS ) return false;
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8 nBlock = aWaterFineBlockList[x][y];
|
uint8 nBlock = aWaterFineBlockList[x][y];
|
||||||
|
|
||||||
|
@ -447,8 +446,10 @@ CWaterLevel::GetWaterLevelNoWaves(float fX, float fY, float fZ, float *pfOutLeve
|
||||||
int32 x = WATER_TO_SMALL_SECTOR_X(fX + WATER_X_OFFSET);
|
int32 x = WATER_TO_SMALL_SECTOR_X(fX + WATER_X_OFFSET);
|
||||||
int32 y = WATER_TO_SMALL_SECTOR_Y(fY);
|
int32 y = WATER_TO_SMALL_SECTOR_Y(fY);
|
||||||
|
|
||||||
|
#ifdef FIX_BUGS
|
||||||
if ( x < 0 || x >= MAX_SMALL_SECTORS ) return false;
|
if ( x < 0 || x >= MAX_SMALL_SECTORS ) return false;
|
||||||
if ( y < 0 || y >= MAX_SMALL_SECTORS ) return false;
|
if ( y < 0 || y >= MAX_SMALL_SECTORS ) return false;
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8 nBlock = aWaterFineBlockList[x][y];
|
uint8 nBlock = aWaterFineBlockList[x][y];
|
||||||
|
|
||||||
|
@ -1857,6 +1858,9 @@ CWaterLevel::PreCalcWaterGeometry(void)
|
||||||
int32 BlockX = WATER_TO_SMALL_SECTOR_X(fCamX + WATER_X_OFFSET) + 1;
|
int32 BlockX = WATER_TO_SMALL_SECTOR_X(fCamX + WATER_X_OFFSET) + 1;
|
||||||
int32 BlockY = WATER_TO_SMALL_SECTOR_Y(fCamY ) + 1;
|
int32 BlockY = WATER_TO_SMALL_SECTOR_Y(fCamY ) + 1;
|
||||||
|
|
||||||
|
ASSERT( BlockX >= 0 && BlockX < MAX_SMALL_SECTORS );
|
||||||
|
ASSERT( BlockY >= 0 && BlockY < MAX_SMALL_SECTORS );
|
||||||
|
|
||||||
if ( _IsColideWithBlock(BlockX, BlockY, nBlock) )
|
if ( _IsColideWithBlock(BlockX, BlockY, nBlock) )
|
||||||
{
|
{
|
||||||
float fMaskX = floorf(fCamX / 2.0f) * 2.0f;
|
float fMaskX = floorf(fCamX / 2.0f) * 2.0f;
|
||||||
|
|
Loading…
Reference in a new issue