File diff r12108:f8d8164485bd → r12109:90df01928018
src/roadveh_gui.cpp
Show inline comments
 
@@ -127,13 +127,13 @@ void DrawRoadVehImage(const Vehicle *v, 
 
	int max_length = (count == 0) ? 80 : count * 8;
 

	
 
	/* Width of highlight box */
 
	int highlight_w = 0;
 

	
 
	for (int dx = 0; v != NULL && dx < max_length ; v = v->Next()) {
 
		int width = ((const RoadVehicle *)v)->rcache.cached_veh_length;
 
		int width = RoadVehicle::From(v)->rcache.cached_veh_length;
 

	
 
		if (dx + width > 0 && dx <= max_length) {
 
			SpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
 
			DrawSprite(v->GetImage(DIR_W), pal, x + 14 + RoadVehLengthToPixels(dx), y + 6);
 

	
 
			if (v->index == selection) {