summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-01-27 13:24:06 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-27 19:01:51 +0300
commit0f3c2f65414f332fad510fb8651dd59d506aad2e (patch)
treedda3c34cf10d3e3458830cb53820866f4d535c3a /src/map.cpp
parent56496ad5d8a7662b0ae5c9f25d1348cb7b677b65 (diff)
downloadminetest-0f3c2f65414f332fad510fb8651dd59d506aad2e.tar.gz
minetest-0f3c2f65414f332fad510fb8651dd59d506aad2e.tar.bz2
minetest-0f3c2f65414f332fad510fb8651dd59d506aad2e.zip
voxalgo::clearLightAndCollectSources
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/map.cpp b/src/map.cpp
index dce3bdc09..1ab2b32ae 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -690,9 +690,11 @@ void Map::updateLighting(enum LightBank bank,
core::map<v3s16, bool> light_sources;
core::map<v3s16, u8> unlight_from;
+
+ int num_bottom_invalid = 0;
{
- //TimeTaker t("first stuff");
+ TimeTaker t("first stuff");
core::map<v3s16, MapBlock*>::Iterator i;
i = a_blocks.getIterator();
@@ -758,6 +760,9 @@ void Map::updateLighting(enum LightBank bank,
{
bool bottom_valid = block->propagateSunlight(light_sources);
+ if(!bottom_valid)
+ num_bottom_invalid++;
+
// If bottom is valid, we're done.
if(bottom_valid)
break;
@@ -792,6 +797,8 @@ void Map::updateLighting(enum LightBank bank,
}
}
+
+ infostream<<"num_bottom_invalid="<<num_bottom_invalid<<std::endl;
/*
Enable this to disable proper lighting for speeding up map
@@ -885,15 +892,15 @@ void Map::updateLighting(enum LightBank bank,
}
{
- TimeTaker timer("unSpreadLight");
+ //TimeTaker timer("unSpreadLight");
vmanip.unspreadLight(bank, unlight_from, light_sources, nodemgr);
}
{
- TimeTaker timer("spreadLight");
+ //TimeTaker timer("spreadLight");
vmanip.spreadLight(bank, light_sources, nodemgr);
}
{
- TimeTaker timer("blitBack");
+ //TimeTaker timer("blitBack");
vmanip.blitBack(modified_blocks);
}
/*infostream<<"emerge_time="<<emerge_time<<std::endl;