equal
deleted
inserted
replaced
327 e->player_avail = (byte)-1; |
327 e->player_avail = (byte)-1; |
328 |
328 |
329 /* Do not introduce new rail wagons */ |
329 /* Do not introduce new rail wagons */ |
330 if (IsWagon(index)) return; |
330 if (IsWagon(index)) return; |
331 |
331 |
332 if (index < NUM_TRAIN_ENGINES) { |
332 if (e->type == VEH_TRAIN) { |
333 /* maybe make another rail type available */ |
333 /* maybe make another rail type available */ |
334 RailType railtype = RailVehInfo(index)->railtype; |
334 RailType railtype = RailVehInfo(index)->railtype; |
335 assert(railtype < RAILTYPE_END); |
335 assert(railtype < RAILTYPE_END); |
336 FOR_ALL_PLAYERS(p) { |
336 FOR_ALL_PLAYERS(p) { |
337 if (p->is_active) SetBit(p->avail_railtypes, railtype); |
337 if (p->is_active) SetBit(p->avail_railtypes, railtype); |
338 } |
338 } |
339 } |
339 } else if (e->type == VEH_ROAD) { |
340 if ((index - NUM_TRAIN_ENGINES) < NUM_ROAD_ENGINES) { |
|
341 /* maybe make another road type available */ |
340 /* maybe make another road type available */ |
342 FOR_ALL_PLAYERS(p) { |
341 FOR_ALL_PLAYERS(p) { |
343 if (p->is_active) SetBit(p->avail_roadtypes, HasBit(EngInfo(index)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD); |
342 if (p->is_active) SetBit(p->avail_roadtypes, HasBit(EngInfo(index)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD); |
344 } |
343 } |
345 } |
344 } |