diff options
author | Michael Lutz <michi@icosahedron.de> | 2020-04-11 17:12:26 +0200 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2020-06-28 15:33:37 +0200 |
commit | 6d3c2edc599c3f74cf1aa3e69ddb6d301af62fa0 (patch) | |
tree | b8a42af45490c959096d72843ffc51766837a3dd /src/industry_cmd.cpp | |
parent | 7a09413a1aabc934c201c19bcae3ad03d7b801c7 (diff) | |
download | openttd-6d3c2edc599c3f74cf1aa3e69ddb6d301af62fa0.tar.xz |
Add: [NewGRF] Industry behaviour flag to override second cargo production clamping for water industries when using smooth economy.
Smooth economy is only used when the corresponding setting is enabled and the industries does not use the production callback.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 35def4609..bd1d28ef6 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -2677,7 +2677,7 @@ static void ChangeIndustryProduction(Industry *i, bool monthly) /* Prevent production to overflow or Oil Rig passengers to be over-"produced" */ new_prod = Clamp(new_prod, 1, 255); - if (((indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER) != 0) && j == 1) { + if (((indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER) != 0) && j == 1 && !(indspec->behaviour & INDUSTRYBEH_WATER_NO_CLAMP_PROD)) { new_prod = Clamp(new_prod, 0, 16); } |