changeset 9988:ec811ed91664 draft

(svn r14145) -Fix (r14135, r14141): When savegame conversion cannot determine a owner of a greyed waypoint, ensure that the owner is assigned when the waypoint is rebuild.
author frosch <frosch@openttd.org>
date Sat, 23 Aug 2008 19:14:27 +0000
parents 86dc2b5c28b4
children 10fd2a3a4a1c
files src/waypoint.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/waypoint.cpp
+++ b/src/waypoint.cpp
@@ -231,7 +231,6 @@
 			wp->town_index = INVALID_TOWN;
 			wp->name = NULL;
 			wp->town_cn = 0;
-			wp->owner = owner;
 		} else {
 			/* Move existing (recently deleted) waypoint to the new location */
 
@@ -251,6 +250,7 @@
 			wp->xy = tile;
 			InvalidateWindowData(WC_WAYPOINT_VIEW, wp->index);
 		}
+		wp->owner = owner;
 
 		const StationSpec* statspec;