Fix move_ground() to pass coordinate arguments normalized

move_ground() passes curx, cury to various functions that should
probably be called with normalized coordinate arguments.  Make sure
curx, cury are normalized.
This commit is contained in:
Markus Armbruster 2008-08-23 13:14:18 -04:00
parent 5621f62302
commit 1e6c04a34e

View file

@ -206,8 +206,8 @@ move_ground(struct sctstr *start, struct sctstr *end,
mobility -= sect_mcost; mobility -= sect_mcost;
total_mcost += sect_mcost; total_mcost += sect_mcost;
} }
curx = tmpx; curx = next.sct_x;
cury = tmpy; cury = next.sct_y;
if (cury != start->sct_y) if (cury != start->sct_y)
out = 1; out = 1;
if (curx != start->sct_x) if (curx != start->sct_x)