(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.

This commit is contained in:
rubidium 2007-10-31 22:09:23 +00:00
parent 2b4d1fff89
commit f486486dd8
2 changed files with 2 additions and 0 deletions

View File

@ -535,6 +535,7 @@ CommandCost CmdStartStopAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32
}
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);

View File

@ -964,6 +964,7 @@ CommandCost CmdStartStopShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
}
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);