diff options
author | rubidium <rubidium@openttd.org> | 2012-05-09 19:11:09 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2012-05-09 19:11:09 +0000 |
commit | 5bfed864a08dce717e2658786948e6659872b8d4 (patch) | |
tree | 8710031cb4842cf8dcf872ee398b0ddf14966850 | |
parent | 334c0e897c60205542c7163d39c605241e49a2fd (diff) | |
download | openttd-5bfed864a08dce717e2658786948e6659872b8d4.tar.xz |
(svn r24219) -Fix [FS#5152]: immediately do the cargo payment on vehicle crashes instead of when they are cleared
-rw-r--r-- | src/vehicle.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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. } |