Changeset - r6692:6f753e42b5f0
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-05-25 22:31:34
rubidium@openttd.org
(svn r9924) -Fix: update the road vehicle speeds when stopped and/or running just behind another vehicle.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/roadveh_cmd.cpp
Show inline comments
 
@@ -261,6 +261,7 @@ int32 CmdStartStopRoadVeh(TileIndex tile
 
		}
 

	
 
		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;
0 comments (0 inline, 0 general)