Mercurial > hg > openttd
changeset 11869:6d78be1df586 draft
(svn r16263) -Change: Interpret setting bridge property 08 to 0 as always available.
author | frosch <frosch@openttd.org> |
---|---|
date | Sat, 09 May 2009 19:48:14 +0000 |
parents | 4f029fd2d3e5 |
children | 59434952c0b0 |
files | src/newgrf.cpp |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1356,9 +1356,12 @@ BridgeSpec *bridge = &_bridge[brid + i]; switch (prop) { - case 0x08: // Year of availability - bridge->avail_year = ORIGINAL_BASE_YEAR + grf_load_byte(&buf); - break; + 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);