Changeset - r11187:77f33ee07643
[Not reviewed]
master
0 1 0
frosch - 16 years ago 2009-02-21 11:54:25
frosch@openttd.org
(svn r15540) -Fix: Testing of 'only_this' in CmdRefitRoadVeh() could be skipped by 'continue'.
1 file changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/roadveh_cmd.cpp
Show inline comments
 
@@ -2003,7 +2003,7 @@ CommandCost CmdRefitRoadVeh(TileIndex ti
 

	
 
	if (new_cid >= NUM_CARGO) return CMD_ERROR;
 

	
 
	for (; v != NULL; v = v->Next()) {
 
	for (; v != NULL; v = (only_this ? NULL : v->Next())) {
 
		/* XXX: We refit all the attached wagons en-masse if they can be
 
		 * refitted. This is how TTDPatch does it.  TODO: Have some nice
 
		 * [Refit] button near each wagon. */
 
@@ -2065,8 +2065,6 @@ CommandCost CmdRefitRoadVeh(TileIndex ti
 
			InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
 
			InvalidateWindowClassesData(WC_ROADVEH_LIST, 0);
 
		}
 

	
 
		if (only_this) break;
 
	}
 

	
 
	if (flags & DC_EXEC) RoadVehUpdateCache(GetVehicle(p1)->First());
0 comments (0 inline, 0 general)