Changeset - r19239:1aef34079c1f
[Not reviewed]
master
0 1 0
michi_cc - 12 years ago 2012-04-17 19:44:47
michi_cc@openttd.org
(svn r24142) -Feature [FS#3576]: Randomise count of passengers killed in a crash. (riffraffselbow)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -191,25 +191,25 @@ uint Vehicle::Crash(bool flooded)
 
	for (Vehicle *v = this; v != NULL; v = v->Next()) {
 
		if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) pass += v->cargo.Count();
 
		v->vehstatus |= VS_CRASHED;
 
		MarkSingleVehicleDirty(v);
 
	}
 

	
 
	/* 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);
 

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

	
 

	
 
/**
 
 * Displays a "NewGrf Bug" error message for a engine, and pauses the game if not networking.
 
 * @param engine The engine that caused the problem
 
 * @param part1  Part 1 of the error message, taking the grfname as parameter 1
 
 * @param part2  Part 2 of the error message, taking the engine as parameter 2
 
 * @param bug_type Flag to check and set in grfconfig
 
 * @param critical Shall the "OpenTTD might crash"-message be shown when the player tries to unpause?
 
 */
 
void ShowNewGrfVehicleError(EngineID engine, StringID part1, StringID part2, GRFBugs bug_type, bool critical)
0 comments (0 inline, 0 general)