equal
deleted
inserted
replaced
165 |
165 |
166 RailTypes GetPlayerRailtypes(PlayerID p) |
166 RailTypes GetPlayerRailtypes(PlayerID p) |
167 { |
167 { |
168 RailTypes rt = RAILTYPES_NONE; |
168 RailTypes rt = RAILTYPES_NONE; |
169 |
169 |
170 for (EngineID i = 0; i != TOTAL_NUM_ENGINES; i++) { |
170 EngineID i; |
|
171 FOR_ALL_ENGINEIDS_OF_TYPE(i, VEH_TRAIN) { |
171 const Engine* e = GetEngine(i); |
172 const Engine* e = GetEngine(i); |
172 const EngineInfo *ei = EngInfo(i); |
173 const EngineInfo *ei = EngInfo(i); |
173 |
174 |
174 if (e->type == VEH_TRAIN && HasBit(ei->climates, _opt.landscape) && |
175 if (HasBit(ei->climates, _opt.landscape) && |
175 (HasBit(e->player_avail, p) || _date >= e->intro_date + 365)) { |
176 (HasBit(e->player_avail, p) || _date >= e->intro_date + 365)) { |
176 const RailVehicleInfo *rvi = RailVehInfo(i); |
177 const RailVehicleInfo *rvi = RailVehInfo(i); |
177 |
178 |
178 if (rvi->railveh_type != RAILVEH_WAGON) { |
179 if (rvi->railveh_type != RAILVEH_WAGON) { |
179 assert(rvi->railtype < RAILTYPE_END); |
180 assert(rvi->railtype < RAILTYPE_END); |