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.master
parent
5a3b8e34b3
commit
d5a97e00ea
|
@ -2313,6 +2313,7 @@ void MMVManip::blitBackAll(std::map<v3s16, MapBlock*> *modified_blocks,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
block->copyFrom(*this);
|
block->copyFrom(*this);
|
||||||
|
block->raiseModified(MOD_STATE_WRITE_NEEDED, MOD_REASON_VMANIP);
|
||||||
|
|
||||||
if(modified_blocks)
|
if(modified_blocks)
|
||||||
(*modified_blocks)[p] = block;
|
(*modified_blocks)[p] = block;
|
||||||
|
|
|
@ -63,7 +63,8 @@ class VoxelManipulator;
|
||||||
#define MOD_REASON_STATIC_DATA_REMOVED (1 << 16)
|
#define MOD_REASON_STATIC_DATA_REMOVED (1 << 16)
|
||||||
#define MOD_REASON_STATIC_DATA_CHANGED (1 << 17)
|
#define MOD_REASON_STATIC_DATA_CHANGED (1 << 17)
|
||||||
#define MOD_REASON_EXPIRE_DAYNIGHTDIFF (1 << 18)
|
#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
|
//// MapBlock itself
|
||||||
|
|
Loading…
Reference in New Issue