aboutsummaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp
index b1e7da29a..caebb5161 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -2835,6 +2835,17 @@ void ClientMap::deSerializeSector(v2s16 p2d, std::istream &is)
sector->deSerialize(is);
}
+void ClientMap::OnRegisterSceneNode()
+{
+ if(IsVisible)
+ {
+ SceneManager->registerNodeForRendering(this, scene::ESNRP_SOLID);
+ SceneManager->registerNodeForRendering(this, scene::ESNRP_TRANSPARENT);
+ }
+
+ ISceneNode::OnRegisterSceneNode();
+}
+
void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
{
//m_dout<<DTIME<<"Rendering map..."<<std::endl;
@@ -2971,6 +2982,8 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
{
// If block is far away, don't draw it
if(d > viewing_range_nodes * BS)
+ // This is nicer when fog is used
+ //if((dforward+d)/2 > viewing_range_nodes * BS)
continue;
}