Remove some overzealous asserts

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2163 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2007-07-23 10:47:26 +00:00
parent ca6d31dc6c
commit 59768447c6
2 changed files with 5 additions and 17 deletions

View File

@ -2409,11 +2409,6 @@ static void moveUpdateDroidPos( DROID *psDroid, float dx, float dy )
{
SDWORD iX = 0, iY = 0;
ASSERT( psDroid->x < (mapWidth << TILE_SHIFT),
"moveUpdateDroidPos: droid is already off the map in the x direction" );
ASSERT( psDroid->y < (mapHeight<< TILE_SHIFT),
"moveUpdateDroidPos: droid is already off the map in the y direction" );
if (psDroid->sMove.Status == MOVEPAUSE)
{
// don't actually move if the move is paused
@ -2460,11 +2455,6 @@ static void moveUpdateDroidPos( DROID *psDroid, float dx, float dy )
psDroid->y = 1;
}
}
ASSERT( psDroid->x < (mapWidth << TILE_SHIFT),
"moveUpdateDroidPos: droid just moved off the map in the x direction" );
ASSERT( psDroid->y < (mapHeight<< TILE_SHIFT),
"moveUpdateDroidPos: droid just moved off the map in the y direction" );
}
/* Update a tracked droids position and speed given target values */

View File

@ -269,7 +269,11 @@ BOOL recvDroidDisEmbark(NETMSG *pMsg)
//add it back into the world at the x/y
psDroid->x = x;
psDroid->y = y;
ASSERT(worldOnMap(x,y), "droid not disembarked on map");
if (!worldOnMap(x, y))
{
debug(LOG_ERROR, "recvDroidDisEmbark: droid not disembarked on map");
return FALSE;
}
updateDroidOrientation(psDroid);
//initialise the movement data
initDroidMovement(psDroid);
@ -847,12 +851,6 @@ BOOL sendWholeDroid(DROID *pD, UDWORD dest)
BOOL bNoTarget;
uint16_t direction = pD->direction * 32; // preserve precision
// these asserts are done on the receiving side too
ASSERT( pD->x < (mapWidth << TILE_SHIFT),
"sendWholeDroid: x coordinate bigger than map width" );
ASSERT( pD->y < (mapHeight<< TILE_SHIFT),
"sendWholeDroid: y coordinate bigger than map height" );
if (pD->numWeaps == 0)
{
if (pD->asWeaps[0].nStat > 0) // build some bits for the template.