Changeset - r19316:626739e68dd9
[Not reviewed]
master
0 1 0
rubidium - 12 years ago 2012-05-09 19:11:09
rubidium@openttd.org
(svn r24219) -Fix [FS#5152]: immediately do the cargo payment on vehicle crashes instead of when they are cleared
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -197,12 +197,15 @@ uint Vehicle::Crash(bool flooded)
 
	/* Dirty some windows */
 
	InvalidateWindowClassesData(GetWindowClassForVehicleType(this->type), 0);
 
	SetWindowWidgetDirty(WC_VEHICLE_VIEW, this->index, WID_VV_START_STOP);
 
	SetWindowDirty(WC_VEHICLE_DETAILS, this->index);
 
	SetWindowDirty(WC_VEHICLE_DEPOT, this->tile);
 

	
 
	delete this->cargo_payment;
 
	this->cargo_payment = NULL;
 

	
 
	return RandomRange(pass + 1); // Randomise deceased passengers.
 
}
 

	
 

	
 
/**
 
 * Displays a "NewGrf Bug" error message for a engine, and pauses the game if not networking.
0 comments (0 inline, 0 general)