|
@@ -4267,19 +4267,19 @@ static ChangeInfoResult RailTypeChangeIn
|
|
|
/* Rail type compatibility bits are added to the existing bits
|
|
|
* to allow multiple GRFs to modify compatibility with the
|
|
|
* default rail types. */
|
|
|
int n = buf->ReadByte();
|
|
|
for (int j = 0; j != n; j++) {
|
|
|
RailTypeLabel label = buf->ReadDWord();
|
|
|
RailType rt = GetRailTypeByLabel(BSWAP32(label), false);
|
|
|
if (rt != INVALID_RAILTYPE) {
|
|
|
RailType resolved_rt = GetRailTypeByLabel(BSWAP32(label), false);
|
|
|
if (resolved_rt != INVALID_RAILTYPE) {
|
|
|
switch (prop) {
|
|
|
case 0x0F: SetBit(rti->powered_railtypes, rt); FALLTHROUGH; // Powered implies compatible.
|
|
|
case 0x0E: SetBit(rti->compatible_railtypes, rt); break;
|
|
|
case 0x18: SetBit(rti->introduction_required_railtypes, rt); break;
|
|
|
case 0x19: SetBit(rti->introduces_railtypes, rt); break;
|
|
|
case 0x0F: SetBit(rti->powered_railtypes, resolved_rt); FALLTHROUGH; // Powered implies compatible.
|
|
|
case 0x0E: SetBit(rti->compatible_railtypes, resolved_rt); break;
|
|
|
case 0x18: SetBit(rti->introduction_required_railtypes, resolved_rt); break;
|
|
|
case 0x19: SetBit(rti->introduces_railtypes, resolved_rt); break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -4481,18 +4481,18 @@ static ChangeInfoResult RoadTypeChangeIn
|
|
|
/* Road type compatibility bits are added to the existing bits
|
|
|
* to allow multiple GRFs to modify compatibility with the
|
|
|
* default road types. */
|
|
|
int n = buf->ReadByte();
|
|
|
for (int j = 0; j != n; j++) {
|
|
|
RoadTypeLabel label = buf->ReadDWord();
|
|
|
RoadType rt = GetRoadTypeByLabel(BSWAP32(label), false);
|
|
|
if (rt != INVALID_ROADTYPE) {
|
|
|
RoadType resolved_rt = GetRoadTypeByLabel(BSWAP32(label), false);
|
|
|
if (resolved_rt != INVALID_ROADTYPE) {
|
|
|
switch (prop) {
|
|
|
case 0x0F: SetBit(rti->powered_roadtypes, rt); break;
|
|
|
case 0x18: SetBit(rti->introduction_required_roadtypes, rt); break;
|
|
|
case 0x19: SetBit(rti->introduces_roadtypes, rt); break;
|
|
|
case 0x0F: SetBit(rti->powered_roadtypes, resolved_rt); break;
|
|
|
case 0x18: SetBit(rti->introduction_required_roadtypes, resolved_rt); break;
|
|
|
case 0x19: SetBit(rti->introduces_roadtypes, resolved_rt); break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
|