From 5bfed864a08dce717e2658786948e6659872b8d4 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 9 May 2012 19:11:09 +0000 Subject: (svn r24219) -Fix [FS#5152]: immediately do the cargo payment on vehicle crashes instead of when they are cleared --- src/vehicle.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/vehicle.cpp') diff --git a/src/vehicle.cpp b/src/vehicle.cpp index bbc370b7a..1513837b3 100644 --- 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. } -- cgit v1.2.3-54-g00ecf