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-861f7616d084master
parent
775637ef95
commit
a95fd43c19
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue