equal
deleted
inserted
replaced
3058 } |
3058 } |
3059 |
3059 |
3060 static void Load_ROADSTOP(void) |
3060 static void Load_ROADSTOP(void) |
3061 { |
3061 { |
3062 int index; |
3062 int index; |
3063 Vehicle *v; |
|
3064 |
3063 |
3065 while ((index = SlIterateArray()) != -1) { |
3064 while ((index = SlIterateArray()) != -1) { |
3066 RoadStop *rs; |
3065 RoadStop *rs; |
3067 |
3066 |
3068 if (!AddBlockIfNeeded(&_RoadStop_pool, index)) |
3067 if (!AddBlockIfNeeded(&_RoadStop_pool, index)) |
3069 error("RoadStops: failed loading savegame: too many RoadStops"); |
3068 error("RoadStops: failed loading savegame: too many RoadStops"); |
3070 |
3069 |
3071 rs = GetRoadStop(index); |
3070 rs = GetRoadStop(index); |
3072 SlObject(rs, _roadstop_desc); |
3071 SlObject(rs, _roadstop_desc); |
3073 } |
|
3074 |
|
3075 FOR_ALL_VEHICLES(v) { |
|
3076 if (v->type == VEH_Road && v->u.road.slot != NULL) v->u.road.slot->num_vehicles++; |
|
3077 } |
3072 } |
3078 } |
3073 } |
3079 |
3074 |
3080 extern const ChunkHandler _station_chunk_handlers[] = { |
3075 extern const ChunkHandler _station_chunk_handlers[] = { |
3081 { 'STNS', Save_STNS, Load_STNS, CH_ARRAY }, |
3076 { 'STNS', Save_STNS, Load_STNS, CH_ARRAY }, |