mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-07 07:55:27 +01:00
Prevent MapBlocks in generation from being unloaded (#16339)
This change prevents issues arising from partial generation of MapChunks, which are liable to be regenerated completely when ungenerated MapBlocks within are encountered. Co-authored-by: Po Lu <luangruo@yahoo.com> Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
@@ -67,6 +67,7 @@ public:
|
||||
/// @param now current game time
|
||||
void finishBlockMake(BlockMakeData *data,
|
||||
std::map<v3s16, MapBlock*> *changed_blocks, u32 now);
|
||||
void cancelBlockMake(BlockMakeData *data);
|
||||
|
||||
/*
|
||||
Get a block from somewhere.
|
||||
@@ -169,6 +170,9 @@ protected:
|
||||
private:
|
||||
friend class ModApiMapgen; // for m_transforming_liquid
|
||||
|
||||
// extra border area during mapgen (in blocks)
|
||||
constexpr static v3s16 EMERGE_EXTRA_BORDER{1, 1, 1};
|
||||
|
||||
// Emerge manager
|
||||
EmergeManager *m_emerge;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user