Fix crash when map_Height is given negative coordinates.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4336 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2008-03-25 21:30:35 +00:00
parent 2e66547554
commit 2f049ab0f0
1 changed files with 2 additions and 2 deletions

View File

@ -4357,8 +4357,8 @@ static void showSensorRange2(BASE_OBJECT *psObj)
xDif = xDif/4096; // cos it's fixed point xDif = xDif/4096; // cos it's fixed point
yDif = yDif/4096; yDif = yDif/4096;
pos.x = psObj->pos.x - xDif; pos.x = MAX(psObj->pos.x - xDif, 0);
pos.z = psObj->pos.y - yDif; pos.z = MAX(psObj->pos.y - yDif, 0);
pos.y = map_Height(pos.x,pos.z) + 16; pos.y = map_Height(pos.x,pos.z) + 16;
effectGiveAuxVar(80); // half normal plasma size... effectGiveAuxVar(80); // half normal plasma size...
if(bBuilding) if(bBuilding)