# HG changeset patch # User rubidium # Date 2012-05-09 19:11:09 # Node ID 626739e68dd9d1eedf8f489cbb521747fc12b23f # Parent c2e004443f09f9602f5047d00c4334afbf1a2043 (svn r24219) -Fix [FS#5152]: immediately do the cargo payment on vehicle crashes instead of when they are cleared diff --git a/src/vehicle.cpp b/src/vehicle.cpp --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -200,6 +200,9 @@ uint Vehicle::Crash(bool flooded) 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. }