Skip to content

Commit

Permalink
map: try to correct the disappearing problem in outdoor maps
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Alonso(fr) committed May 1, 2020
1 parent 68ec9dc commit 2536e65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/fileio/fileio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ template<typename T>
void writeArray(std::ostream& to, const T& array, int width, int height) {
using int_type = decltype(typename array_value_type<T>::type() + 1);
for(int y = 0; y < height; y++) {
to << array[0][y];
to << int_type(array[0][y]);
for(int x = 1; x < width; x++)
to << '\t' << int_type(array[x][y]);
to << '\n';
Expand Down
3 changes: 3 additions & 0 deletions src/game/boe.fileio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ void finish_load_party(){

overall_mode = town_restore ? MODE_TOWN : MODE_OUTDOORS;
stat_screen_mode = MODE_INVEN;
// build_outdoors call add_outdoor_maps, so we must update them first
// checkme: true for actual files, unsure for a legacy saved file
save_outdoor_maps();
build_outdoors();
erase_out_specials();

Expand Down

0 comments on commit 2536e65

Please sign in to comment.