@@ -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)
Status change: