From af293142fede91cc31e98c7e05d9ecfef752b077 Mon Sep 17 00:00:00 2001 From: smatz Date: Sun, 15 Mar 2009 15:25:18 +0000 Subject: (svn r15725) -Fix: centering on a vehicle didn't respect its z coordinate --- src/smallmap_gui.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/smallmap_gui.cpp') diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 0619f4039..1d5c2baca 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1214,9 +1214,17 @@ void ShowExtraViewPortWindow(TileIndex tile) new ExtraViewportWindow(&_extra_view_port_desc, i, tile); } -bool ScrollMainWindowTo(int x, int y, bool instant) +/** + * Scrolls the main window to given coordinates. + * @param x x coordinate + * @param y y coordinate + * @param z z coordinate; -1 to scroll to terrain height + * @param instant scroll instantly (meaningful only when smooth_scrolling is active) + * @return did the viewport position change? + */ +bool ScrollMainWindowTo(int x, int y, int z, bool instant) { - bool res = ScrollWindowTo(x, y, FindWindowById(WC_MAIN_WINDOW, 0), instant); + bool res = ScrollWindowTo(x, y, z, FindWindowById(WC_MAIN_WINDOW, 0), instant); /* If a user scrolls to a tile (via what way what so ever) and already is on * that tile (e.g.: pressed twice), move the smallmap to that location, -- cgit v1.2.3-54-g00ecf