forked from Mirrorlandia_minetest/minetest
Merge branch 'upstream/master'
This commit is contained in:
commit
9bc701d194
@ -35,7 +35,15 @@ typedef core::vector2d<s32> v2s32;
|
|||||||
typedef core::vector2d<u32> v2u32;
|
typedef core::vector2d<u32> v2u32;
|
||||||
typedef core::vector2d<f32> v2f32;
|
typedef core::vector2d<f32> v2f32;
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
// Windows
|
||||||
typedef unsigned long long u64;
|
typedef unsigned long long u64;
|
||||||
|
#else
|
||||||
|
// Posix
|
||||||
|
#include <stdint.h>
|
||||||
|
typedef uint64_t u64;
|
||||||
|
//typedef unsigned long long u64;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
17
src/map.cpp
17
src/map.cpp
@ -2026,9 +2026,14 @@ void ServerMap::initBlockMake(mapgen::BlockMakeData *data, v3s16 blockpos)
|
|||||||
|
|
||||||
for(s16 y=-1; y<=1; y++)
|
for(s16 y=-1; y<=1; y++)
|
||||||
{
|
{
|
||||||
MapBlock *block = createBlock(blockpos);
|
//MapBlock *block = createBlock(blockpos);
|
||||||
|
// 1) get from memory, 2) load from disk
|
||||||
|
MapBlock *block = emergeBlock(blockpos, false);
|
||||||
|
// 3) create a blank one
|
||||||
|
if(block == NULL)
|
||||||
|
block = createBlock(blockpos);
|
||||||
|
|
||||||
// Lighting won't be calculated
|
// Lighting will not be valid after make_chunk is called
|
||||||
block->setLightingExpired(true);
|
block->setLightingExpired(true);
|
||||||
// Lighting will be calculated
|
// Lighting will be calculated
|
||||||
//block->setLightingExpired(false);
|
//block->setLightingExpired(false);
|
||||||
@ -2145,10 +2150,18 @@ MapBlock* ServerMap::finishBlockMake(mapgen::BlockMakeData *data,
|
|||||||
TimeTaker t("finishBlockMake lighting update");
|
TimeTaker t("finishBlockMake lighting update");
|
||||||
|
|
||||||
core::map<v3s16, MapBlock*> lighting_update_blocks;
|
core::map<v3s16, MapBlock*> lighting_update_blocks;
|
||||||
|
#if 1
|
||||||
// Center block
|
// Center block
|
||||||
lighting_update_blocks.insert(block->getPos(), block);
|
lighting_update_blocks.insert(block->getPos(), block);
|
||||||
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
// All modified blocks
|
// All modified blocks
|
||||||
|
// NOTE: Should this be done? If this is not done, then the lighting
|
||||||
|
// of the others will be updated in a different place, one by one, i
|
||||||
|
// think... or they might not? Well, at least they are left marked as
|
||||||
|
// "lighting expired"; it seems that is not handled at all anywhere,
|
||||||
|
// so enabling this will slow it down A LOT because otherwise it
|
||||||
|
// would not do this at all. This causes the black trees.
|
||||||
for(core::map<v3s16, MapBlock*>::Iterator
|
for(core::map<v3s16, MapBlock*>::Iterator
|
||||||
i = changed_blocks.getIterator();
|
i = changed_blocks.getIterator();
|
||||||
i.atEnd() == false; i++)
|
i.atEnd() == false; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user