Mercurial > hg > openttd
changeset 2836:5f84086ceca4 draft
(svn r3384) - NewGRF fix: running cost should be halved for dual head vehicles.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Sat, 07 Jan 2006 13:20:02 +0000 |
parents | 417f3838a2a4 |
children | 6e5179e1d731 |
files | newgrf.c |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/newgrf.c +++ b/newgrf.c @@ -250,6 +250,9 @@ FOR_EACH_OBJECT { uint8 runcostfact = grf_load_byte(&buf); + if (rvi[i].flags & RVI_MULTIHEAD) + runcostfact /= 2; + rvi[i].running_cost_base = runcostfact; dewagonize(runcostfact, engine + i); } @@ -278,12 +281,18 @@ uint8 dual = grf_load_byte(&buf); if (dual != 0) { - if (!(rvi[i].flags & RVI_MULTIHEAD)) // adjust power if needed + 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].flags |= RVI_MULTIHEAD; } else { - if (rvi[i].flags & RVI_MULTIHEAD) // adjust power if needed + 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].flags &= ~RVI_MULTIHEAD; } }