saveload.c
changeset 4972 af023b864bad
parent 4712 273ec3b182bf
child 4974 c962d0622bc1
equal deleted inserted replaced
4971:0a3653c45b5a 4972:af023b864bad
  1251 			if (!AddBlockIfNeeded(&_order_pool, index))
  1251 			if (!AddBlockIfNeeded(&_order_pool, index))
  1252 				error("Orders: failed loading savegame: too many orders");
  1252 				error("Orders: failed loading savegame: too many orders");
  1253 			return GetOrder(index);
  1253 			return GetOrder(index);
  1254 		}
  1254 		}
  1255 		case REF_VEHICLE: {
  1255 		case REF_VEHICLE: {
  1256 			if (!AddBlockIfNeeded(&_vehicle_pool, index))
  1256 			if (!AddBlockIfNeeded(&_Vehicle_pool, index))
  1257 				error("Vehicles: failed loading savegame: too many vehicles");
  1257 				error("Vehicles: failed loading savegame: too many vehicles");
  1258 			return GetVehicle(index);
  1258 			return GetVehicle(index);
  1259 		}
  1259 		}
  1260 		case REF_STATION: {
  1260 		case REF_STATION: {
  1261 			if (!AddBlockIfNeeded(&_station_pool, index))
  1261 			if (!AddBlockIfNeeded(&_station_pool, index))
  1284 			 * and the index was not - 1.. correct for this */
  1284 			 * and the index was not - 1.. correct for this */
  1285 			index++;
  1285 			index++;
  1286 			if (index == INVALID_VEHICLE)
  1286 			if (index == INVALID_VEHICLE)
  1287 				return NULL;
  1287 				return NULL;
  1288 
  1288 
  1289 			if (!AddBlockIfNeeded(&_vehicle_pool, index))
  1289 			if (!AddBlockIfNeeded(&_Vehicle_pool, index))
  1290 				error("Vehicles: failed loading savegame: too many vehicles");
  1290 				error("Vehicles: failed loading savegame: too many vehicles");
  1291 			return GetVehicle(index);
  1291 			return GetVehicle(index);
  1292 		}
  1292 		}
  1293 		default: NOT_REACHED();
  1293 		default: NOT_REACHED();
  1294 	}
  1294 	}