(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.
authorrubidium
Wed, 31 Oct 2007 22:09:23 +0000
changeset 8311 058851bb0b5e
parent 8310 2bb5c255f4ff
child 8312 48bd7541f6ae
(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.
src/aircraft_cmd.cpp
src/ship_cmd.cpp
--- a/src/aircraft_cmd.cpp	Wed Oct 31 18:53:49 2007 +0000
+++ b/src/aircraft_cmd.cpp	Wed Oct 31 22:09:23 2007 +0000
@@ -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	Wed Oct 31 18:53:49 2007 +0000
+++ b/src/ship_cmd.cpp	Wed Oct 31 22:09:23 2007 +0000
@@ -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);