src/oldloader.cpp
changeset 7389 08d6a6265ced
parent 7334 ed9a43cf642a
child 7390 16fb97ba8133
equal deleted inserted replaced
7388:0a3a9cc1a98b 7389:08d6a6265ced
   518 	if (!AddBlockIfNeeded(&_Depot_pool, num))
   518 	if (!AddBlockIfNeeded(&_Depot_pool, num))
   519 		error("Depots: failed loading savegame: too many depots");
   519 		error("Depots: failed loading savegame: too many depots");
   520 
   520 
   521 	if (!LoadChunk(ls, GetDepot(num), depot_chunk)) return false;
   521 	if (!LoadChunk(ls, GetDepot(num), depot_chunk)) return false;
   522 
   522 
   523 	if (IsValidDepot(GetDepot(num))) {
   523 	if (IsValidDepotID(num)) {
   524 		GetDepot(num)->town_index = REMAP_TOWN_IDX(_old_town_index);
   524 		GetDepot(num)->town_index = REMAP_TOWN_IDX(_old_town_index);
   525 	}
   525 	}
   526 
   526 
   527 	return true;
   527 	return true;
   528 }
   528 }