summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-11-08 18:04:53 +0000
committerfrosch <frosch@openttd.org>2009-11-08 18:04:53 +0000
commitf48f73f060b388ab51fec8112170cfa8d4b8ca17 (patch)
tree69fd79a57fa4ce4a62462c8be34c2b380230bc1b /src/newgrf.cpp
parent5d3fa809317a84528af338cac7d7903250eb959b (diff)
downloadopenttd-f48f73f060b388ab51fec8112170cfa8d4b8ca17.tar.xz
(svn r18016) -Codechange: Move the arbitrary basecost multiplier offset (8) to newgrf loading and make the internal state zero-based instead.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 69a187fd6..caa30ebb4 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -1665,11 +1665,11 @@ static ChangeInfoResult GlobalVarChangeInfo(uint gvid, int numinfo, int prop, by
for (int i = 0; i < numinfo; i++) {
switch (prop) {
case 0x08: { // Cost base factor
- byte factor = grf_load_byte(&buf);
+ int factor = grf_load_byte(&buf);
uint price = gvid + i;
if (price < PR_END) {
- SetPriceBaseMultiplier((Price)price, factor);
+ SetPriceBaseMultiplier((Price)price, factor - 8);
} else {
grfmsg(1, "GlobalVarChangeInfo: Price %d out of range, ignoring", price);
}