@@ -164,17 +164,18 @@ RailType GetBestRailtype(const PlayerID
}
RailTypes GetPlayerRailtypes(PlayerID p)
{
RailTypes rt = RAILTYPES_NONE;
for (EngineID i = 0; i != TOTAL_NUM_ENGINES; i++) {
EngineID i;
FOR_ALL_ENGINEIDS_OF_TYPE(i, VEH_TRAIN) {
const Engine* e = GetEngine(i);
const EngineInfo *ei = EngInfo(i);
if (e->type == VEH_TRAIN && HasBit(ei->climates, _opt.landscape) &&
if (HasBit(ei->climates, _opt.landscape) &&
(HasBit(e->player_avail, p) || _date >= e->intro_date + 365)) {
const RailVehicleInfo *rvi = RailVehInfo(i);
if (rvi->railveh_type != RAILVEH_WAGON) {
assert(rvi->railtype < RAILTYPE_END);
SetBit(rt, rvi->railtype);
@@ -93,17 +93,18 @@ bool ValParamRoadType(const RoadType rt)
RoadTypes GetPlayerRoadtypes(PlayerID p)
RoadTypes rt = ROADTYPES_NONE;
FOR_ALL_ENGINEIDS_OF_TYPE(i, VEH_ROAD) {
if (e->type == VEH_ROAD && HasBit(ei->climates, _opt.landscape) &&
SetBit(rt, HasBit(ei->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD);
return rt;
Status change: