Changeset - r19179:9d474aa2c831
[Not reviewed]
master
0 1 0
rubidium - 12 years ago 2012-03-25 19:24:32
rubidium@openttd.org
(svn r24067) -Change/fix: do not redraw up to 25% of the map when making a new vehicle visible for the first time
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -1416,6 +1416,9 @@ void VehicleUpdateViewport(Vehicle *v, b
 
	v->coord.bottom = pt.y + spr->height + 2 * ZOOM_LVL_BASE;
 

	
 
	if (dirty) {
 
		if (old_coord.left == INVALID_COORD) {
 
			MarkSingleVehicleDirty(v);
 
		} else {
 
		MarkAllViewportsDirty(
 
			min(old_coord.left,   v->coord.left),
 
			min(old_coord.top,    v->coord.top),
 
@@ -1424,6 +1427,7 @@ void VehicleUpdateViewport(Vehicle *v, b
 
		);
 
	}
 
}
 
}
 

	
 
/**
 
 * Update the position of the vehicle, and update the viewport.
0 comments (0 inline, 0 general)