Make sure we handle droid position close to origin correctly in updateDroidOrientation()

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4308 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2008-03-24 16:06:43 +00:00
parent 775637ef95
commit a95fd43c19
1 changed files with 2 additions and 2 deletions

View File

@ -739,9 +739,9 @@ void updateDroidOrientation(DROID *psDroid)
w = 20;
hx0 = map_Height(psDroid->pos.x + w, psDroid->pos.y);
hx1 = map_Height(psDroid->pos.x - w, psDroid->pos.y);
hx1 = map_Height(MAX(0, psDroid->pos.x - w), psDroid->pos.y);
hy0 = map_Height(psDroid->pos.x, psDroid->pos.y + w);
hy1 = map_Height(psDroid->pos.x, psDroid->pos.y - w);
hy1 = map_Height(psDroid->pos.x, MAX(0, psDroid->pos.y - w));
//update height in case were in the bottom of a trough
if (((hx0 +hx1)/2) > (SDWORD)psDroid->pos.z)