diff options
author | rubidium <rubidium@openttd.org> | 2007-05-25 22:31:34 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-25 22:31:34 +0000 |
commit | 7ce4b8e29c7d5c588637c1fa5e60e0691ff3cb97 (patch) | |
tree | d8537d2a27a2bb256dc4d5a209577276db658ccc /src | |
parent | a8d9b4e040cf4fd4dd0ceb4e746985aafcb635f8 (diff) | |
download | openttd-7ce4b8e29c7d5c588637c1fa5e60e0691ff3cb97.tar.xz |
(svn r9924) -Fix: update the road vehicle speeds when stopped and/or running just behind another vehicle.
Diffstat (limited to 'src')
-rw-r--r-- | src/roadveh_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 4381572ec..d399264cf 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -261,6 +261,7 @@ int32 CmdStartStopRoadVeh(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); } @@ -1519,6 +1520,7 @@ again: Vehicle* u = RoadVehFindCloseTo(v, x, y, new_dir); if (u != NULL) { + v->cur_speed = u->cur_speed; /* There is a vehicle in front overtake it if possible */ if (v->u.road.overtaking == 0) RoadVehCheckOvertake(v, u); return; |