1
1
#include "game.h"
2
+ #include "map_memory.h"
2
3
3
4
#include <algorithm>
4
5
#include <bitset>
@@ -12751,6 +12752,7 @@ bool game::travel_to_dimension( const std::string &new_prefix )
12751
12752
if( !save_maps() ) {
12752
12753
return false;
12753
12754
}
12755
+ player.save_map_memory();
12754
12756
for( int z = -OVERMAP_DEPTH; z <= OVERMAP_HEIGHT; z++ ) {
12755
12757
here.clear_vehicle_list( z );
12756
12758
}
@@ -12764,10 +12766,10 @@ bool game::travel_to_dimension( const std::string &new_prefix )
12764
12766
}
12765
12767
// Load in data specific to the dimension (like weather)
12766
12768
//if( !load_dimension_data() ) {
12767
- // dimension data file not found/created yet
12768
- /* handle weather instance switching when I have dimensions with different region settings,
12769
- right now they're all the same and it's hard to tell if it's working or not. */
12770
- // weather.set_nextweather( calendar::turn );
12769
+ // dimension data file not found/created yet
12770
+ /* handle weather instance switching when I have dimensions with different region settings,
12771
+ right now they're all the same and it's hard to tell if it's working or not. */
12772
+ // weather.set_nextweather( calendar::turn );
12771
12773
//}
12772
12774
// Ensure the new world has compression files
12773
12775
world_generator->active_world->assure_compression_files_present();
@@ -12780,6 +12782,10 @@ bool game::travel_to_dimension( const std::string &new_prefix )
12780
12782
overmap_buffer.clear();
12781
12783
// load/create new overmap
12782
12784
overmap_buffer.get( point_abs_om{} );
12785
+ // clear map memory from the previous dimension
12786
+ player.clear_map_memory();
12787
+ // Load map memory in new dimension, if there is any
12788
+ player.load_map_memory();
12783
12789
// Loads submaps and invalidate related caches
12784
12790
here.load( tripoint_abs_sm( here.get_abs_sub() ), false );
12785
12791
0 commit comments