1
0
Fork 0

(svn r14139) -Fix (r12044): GetSlopeZ() gets a virtual coordinate, not a tile.

release/0.7
frosch 2008-08-23 16:09:06 +00:00
parent 0816d2cf20
commit 5216223f45
1 changed files with 1 additions and 1 deletions

View File

@ -2068,7 +2068,7 @@ void PlaceObject()
bool ScrollWindowTo(int x , int y, Window *w, bool instant)
{
/* The slope cannot be acquired outside of the map, so make sure we are always within the map. */
Point pt = MapXYZToViewport(w->viewport, x, y, GetSlopeZ(Clamp(x, 0, MapSizeX()), Clamp(y, 0, MapSizeY())));
Point pt = MapXYZToViewport(w->viewport, x, y, GetSlopeZ(Clamp(x, 0, MapSizeX() * TILE_SIZE), Clamp(y, 0, MapSizeY() * TILE_SIZE)));
w->viewport->follow_vehicle = INVALID_VEHICLE;
if (w->viewport->dest_scrollpos_x == pt.x && w->viewport->dest_scrollpos_y == pt.y)