From 82f09c6ed839378613bcf64cf1745b8aa6559dba Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 3 Mar 2010 18:58:32 +0000 Subject: [PATCH] (svn r19306) -Change: Railtype cost factor from byte to word value --- src/newgrf.cpp | 4 ++-- src/rail.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 512c949a62..4ca71a90ff 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -2572,7 +2572,7 @@ static ChangeInfoResult RailTypeChangeInfo(uint id, int numinfo, int prop, ByteR break; case 0x13: // Construction cost factor - rti->cost_multiplier = buf->ReadByte(); + rti->cost_multiplier = buf->ReadWord(); break; case 0x14: // Speed limit @@ -2623,6 +2623,7 @@ static ChangeInfoResult RailTypeReserveInfo(uint id, int numinfo, int prop, Byte case 0x0B: // Build window caption case 0x0C: // Autoreplace text case 0x0D: // New loco + case 0x13: // Construction cost case 0x14: // Speed limit buf->ReadWord(); break; @@ -2635,7 +2636,6 @@ static ChangeInfoResult RailTypeReserveInfo(uint id, int numinfo, int prop, Byte case 0x10: // Rail Type flags case 0x11: // Curve speed advantage case 0x12: // Station graphic - case 0x13: // Construction cost case 0x15: // Acceleration model buf->ReadByte(); break; diff --git a/src/rail.h b/src/rail.h index 8caf2573dc..049e4286e3 100644 --- a/src/rail.h +++ b/src/rail.h @@ -186,7 +186,7 @@ struct RailtypeInfo { /** * Cost multiplier for building this rail type */ - uint8 cost_multiplier; + uint16 cost_multiplier; /** * Acceleration type of this rail type