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-861f7616d084master
parent
2e66547554
commit
2f049ab0f0
|
@ -4357,8 +4357,8 @@ static void showSensorRange2(BASE_OBJECT *psObj)
|
|||
|
||||
xDif = xDif/4096; // cos it's fixed point
|
||||
yDif = yDif/4096;
|
||||
pos.x = psObj->pos.x - xDif;
|
||||
pos.z = psObj->pos.y - yDif;
|
||||
pos.x = MAX(psObj->pos.x - xDif, 0);
|
||||
pos.z = MAX(psObj->pos.y - yDif, 0);
|
||||
pos.y = map_Height(pos.x,pos.z) + 16;
|
||||
effectGiveAuxVar(80); // half normal plasma size...
|
||||
if(bBuilding)
|
||||
|
|
Loading…
Reference in New Issue