summaryrefslogtreecommitdiff
path: root/newgrf.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-01-07 16:47:59 +0000
committerpeter1138 <peter1138@openttd.org>2006-01-07 16:47:59 +0000
commite1f9b72c8271fc4159e61ddf79e6e384b3f8c5f0 (patch)
tree420d4feed72d14cc6515ef88f8e37e66e0ca4423 /newgrf.c
parent72270695ed34ad984d8f7b35baded405549e5843 (diff)
downloadopenttd-e1f9b72c8271fc4159e61ddf79e6e384b3f8c5f0.tar.xz
(svn r3388) - NewGRF: Allow train running cost class to differ from engine class. Also fix typo in r3384.
Diffstat (limited to 'newgrf.c')
-rw-r--r--newgrf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/newgrf.c b/newgrf.c
index 908e719f9..989677d22 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -262,9 +262,9 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
uint32 base = grf_load_dword(&buf);
switch (base) {
- case 0x4C30: rvi[i].engclass = 0; break;
- case 0x4C36: rvi[i].engclass = 1; break;
- case 0x4C3C: rvi[i].engclass = 2; break;
+ case 0x4C30: rvi[i].running_cost_class = 0; break;
+ case 0x4C36: rvi[i].running_cost_class = 1; break;
+ case 0x4C3C: rvi[i].running_cost_class = 2; break;
}
dewagonize(base, engine + i);
}
@@ -291,7 +291,7 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
if (rvi[i].flags & RVI_MULTIHEAD) {
// adjust power and running cost if needed
rvi[i].power *= 2;
- rvi[i].running_cost_base /= 2;
+ rvi[i].running_cost_base *= 2;
}
rvi[i].flags &= ~RVI_MULTIHEAD;
}