mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-30 04:35:20 +01:00
tinkering around
This commit is contained in:
13
src/map.cpp
13
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user