summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-05-09 19:48:14 +0000
committerfrosch <frosch@openttd.org>2009-05-09 19:48:14 +0000
commit294d7ee9d6b7e00a2db7affb4f155d027cfe8308 (patch)
treeb9a5576ee68dda50995910ccbe74bb966f96b650 /src
parent8d22e4bec3d21f2f99c2d6094d14aaa88865bcb8 (diff)
downloadopenttd-294d7ee9d6b7e00a2db7affb4f155d027cfe8308.tar.xz
(svn r16263) -Change: Interpret setting bridge property 08 to 0 as always available.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 508e8305c..bca7afacf 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -1356,9 +1356,12 @@ static ChangeInfoResult BridgeChangeInfo(uint brid, int numinfo, int prop, byte
BridgeSpec *bridge = &_bridge[brid + i];
switch (prop) {
- case 0x08: // Year of availability
- bridge->avail_year = ORIGINAL_BASE_YEAR + grf_load_byte(&buf);
+ case 0x08: { // Year of availability
+ /* We treat '0' as always available */
+ byte year = grf_load_byte(&buf);
+ bridge->avail_year = (year > 0 ? ORIGINAL_BASE_YEAR + year : 0);
break;
+ }
case 0x09: // Minimum length
bridge->min_length = grf_load_byte(&buf);