Improve glass
[oweals/minetest.git] / src / mapblock.h
index 22b3b7db6189d986c947d9ac50c393f4f53fe909..e7fd932b8e2395e7613a53a8f91bdc98fd69fefd 100644 (file)
@@ -30,7 +30,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "serialization.h"
 #include "constants.h"
 #include "voxel.h"
-#include "nodemetadata.h"
 #include "staticobject.h"
 #include "mapblock_nodemod.h"
 #ifndef SERVER
@@ -38,6 +37,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #endif
 
 class Map;
+class NodeMetadataList;
+class IGameDef;
 
 #define BLOCK_TIMESTAMP_UNDEFINED 0xffffffff
 
@@ -118,7 +119,7 @@ public:
 class MapBlock /*: public NodeContainer*/
 {
 public:
-       MapBlock(Map *parent, v3s16 pos, bool dummy=false);
+       MapBlock(Map *parent, v3s16 pos, IGameDef *gamedef, bool dummy=false);
        ~MapBlock();
        
        /*virtual u16 nodeContainerId() const
@@ -391,12 +392,13 @@ public:
                                getNodeParentNoEx(p + face_dir),
                                face_dir);
        }*/
-       u8 getFaceLight2(u32 daynight_ratio, v3s16 p, v3s16 face_dir)
+       u8 getFaceLight2(u32 daynight_ratio, v3s16 p, v3s16 face_dir,
+                       INodeDefManager *nodemgr)
        {
                return getFaceLight(daynight_ratio,
                                getNodeParentNoEx(p),
                                getNodeParentNoEx(p + face_dir),
-                               face_dir);
+                               face_dir, nodemgr);
        }
        
 #ifndef SERVER // Only on client
@@ -575,7 +577,7 @@ public:
        JMutex mesh_mutex;
 #endif
        
-       NodeMetadataList m_node_metadata;
+       NodeMetadataList *m_node_metadata;
        StaticObjectList m_static_objects;
        
 private:
@@ -587,6 +589,8 @@ private:
        Map *m_parent;
        // Position in blocks on parent
        v3s16 m_pos;
+
+       IGameDef *m_gamedef;
        
        /*
                If NULL, block is a dummy block.