summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeterN <peter1138@openttd.org>2021-04-24 22:27:47 +0100
committerGitHub <noreply@github.com>2021-04-24 22:27:47 +0100
commitfbc232569c149518911ca66fa8d71e2ef2183439 (patch)
tree4ff8fe315c3680539c6452d6862ac5ad6d78dcc8 /src
parentfda1a590f6978f906ed21b6732f80c9aefa02b47 (diff)
downloadopenttd-fbc232569c149518911ca66fa8d71e2ef2183439.tar.xz
Fix #9097: Upper 16 bits of cargo base payment rate were discarded. (#9098)
NewGRF spec says that base payment rate is 32 bits, but it was loaded into a 16 bit variable. This value is loaded into Money variable after inflation is applied.
Diffstat (limited to 'src')
-rw-r--r--src/cargotype.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cargotype.h b/src/cargotype.h
index 9645bf7c5..f6b3eaead 100644
--- a/src/cargotype.h
+++ b/src/cargotype.h
@@ -59,7 +59,7 @@ struct CargoSpec {
uint8 rating_colour;
uint8 weight; ///< Weight of a single unit of this cargo type in 1/16 ton (62.5 kg).
uint16 multiplier; ///< Capacity multiplier for vehicles. (8 fractional bits)
- uint16 initial_payment;
+ uint32 initial_payment; ///< Initial payment rate before inflation is applied.
uint8 transit_days[2];
bool is_freight; ///< Cargo type is considered to be freight (affects train freight multiplier).