diff options
Diffstat (limited to 'src/voxel.h')
-rw-r--r-- | src/voxel.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/voxel.h b/src/voxel.h index eced43ed5..2e8015eb1 100644 --- a/src/voxel.h +++ b/src/voxel.h @@ -373,6 +373,34 @@ public: return m_data[m_area.index(p)]; } + MapNode getNodeNoEx(v3s16 p) + { + emerge(p); + + if(m_flags[m_area.index(p)] & VOXELFLAG_INEXISTENT) + { + return MapNode(CONTENT_IGNORE); + } + + return m_data[m_area.index(p)]; + } + MapNode & getNodeRef(v3s16 p) + { + emerge(p); + + if(m_flags[m_area.index(p)] & VOXELFLAG_INEXISTENT) + { + dstream<<"EXCEPT: VoxelManipulator::getNode(): " + <<"p=("<<p.X<<","<<p.Y<<","<<p.Z<<")" + <<", index="<<m_area.index(p) + <<", flags="<<(int)m_flags[m_area.index(p)] + <<" is inexistent"<<std::endl; + throw InvalidPositionException + ("VoxelManipulator: getNode: inexistent"); + } + + return m_data[m_area.index(p)]; + } void setNode(v3s16 p, MapNode &n) { emerge(p); @@ -525,7 +553,7 @@ public: /* Some settings */ - bool m_disable_water_climb; + //bool m_disable_water_climb; private: }; |