diff src/vehicle.cpp @ 9184:a7020e34c67b draft

(svn r13047) -Codechange: remove vp_d
author glx <glx@openttd.org>
date Sun, 11 May 2008 15:08:44 +0000
parents 34811fd37a7e
children 9a9e2d4fa821
line wrap: on
line diff
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -591,9 +591,9 @@
 	}
 
 	Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
-	if (w != NULL && WP(w, vp_d).follow_vehicle == this->index) {
+	if (w != NULL && w->viewport->follow_vehicle == this->index) {
 		ScrollMainWindowTo(this->x_pos, this->y_pos, true); // lock the main view on the vehicle's last position
-		WP(w, vp_d).follow_vehicle = INVALID_VEHICLE;
+		w->viewport->follow_vehicle = INVALID_VEHICLE;
 	}
 }