Skip to content
Permalink
Browse files

Fix blocks written by vmanip not being marked as modified

This bug can be triggered by e.g. calling minetest.place_schematic()
and stopping the server immediately afterwards.
  • Loading branch information...
sfan5 committed Sep 23, 2017
1 parent 5a3b8e3 commit d5a97e00eaac54def16fb53b68cfed7300af0854
Showing with 3 additions and 1 deletion.
  1. +1 −0 src/map.cpp
  2. +2 −1 src/mapblock.h
@@ -2313,6 +2313,7 @@ void MMVManip::blitBackAll(std::map<v3s16, MapBlock*> *modified_blocks,
continue;

block->copyFrom(*this);
block->raiseModified(MOD_STATE_WRITE_NEEDED, MOD_REASON_VMANIP);

if(modified_blocks)
(*modified_blocks)[p] = block;
@@ -63,7 +63,8 @@ class VoxelManipulator;
#define MOD_REASON_STATIC_DATA_REMOVED (1 << 16)
#define MOD_REASON_STATIC_DATA_CHANGED (1 << 17)
#define MOD_REASON_EXPIRE_DAYNIGHTDIFF (1 << 18)
#define MOD_REASON_UNKNOWN (1 << 19)
#define MOD_REASON_VMANIP (1 << 19)
#define MOD_REASON_UNKNOWN (1 << 20)

////
//// MapBlock itself

3 comments on commit d5a97e0

@paramat

This comment has been minimized.

Copy link
Member

replied Sep 24, 2017

@sfan5 Fixes #5408 ?

@nerzhul

This comment has been minimized.

Copy link
Member

replied Sep 24, 2017

no, it just permit to trigger a save

@HybridDog

This comment has been minimized.

Copy link
Contributor

replied Sep 24, 2017

the bug happened when rejoining

Please sign in to comment.
You can’t perform that action at this time.