1
0
Fork 0

(svn r16263) -Change: Interpret setting bridge property 08 to 0 as always available.

release/1.0
frosch 2009-05-09 19:48:14 +00:00
parent 8d22e4bec3
commit 294d7ee9d6
1 changed files with 5 additions and 2 deletions

View File

@ -1356,9 +1356,12 @@ static ChangeInfoResult BridgeChangeInfo(uint brid, int numinfo, int prop, byte
BridgeSpec *bridge = &_bridge[brid + i]; BridgeSpec *bridge = &_bridge[brid + i];
switch (prop) { switch (prop) {
case 0x08: // Year of availability case 0x08: { // Year of availability
bridge->avail_year = ORIGINAL_BASE_YEAR + grf_load_byte(&buf); /* We treat '0' as always available */
byte year = grf_load_byte(&buf);
bridge->avail_year = (year > 0 ? ORIGINAL_BASE_YEAR + year : 0);
break; break;
}
case 0x09: // Minimum length case 0x09: // Minimum length
bridge->min_length = grf_load_byte(&buf); bridge->min_length = grf_load_byte(&buf);