changeset 7815:a7db3577709b draft

(svn r11365) -Fix [FS#1288]: when stopping a ship or aircraft, set their speed to 0 so they won't continue at the speed where they were stopped at.
author rubidium <rubidium@openttd.org>
date Wed, 31 Oct 2007 22:09:23 +0000
parents 91405b7333f9
children e5c29f8ae0cd
files src/aircraft_cmd.cpp src/ship_cmd.cpp
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -535,6 +535,7 @@
 		}
 
 		v->vehstatus ^= VS_STOPPED;
+		v->cur_speed = 0;
 		InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
 		InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
 		InvalidateWindowClasses(WC_AIRCRAFT_LIST);
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -964,6 +964,7 @@
 		}
 
 		v->vehstatus ^= VS_STOPPED;
+		v->cur_speed = 0;
 		InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
 		InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
 		InvalidateWindowClasses(WC_SHIPS_LIST);