aboutsummaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2015-01-17 19:19:26 +1000
committerCraig Robbins <kde.psych@gmail.com>2015-01-18 13:39:50 +1000
commit805c8e51e5dd4dfad381a0d40b4388b5de90becf (patch)
treef84388699288e570b3244ce7534fbd7aed684081 /src/map.cpp
parent2f0a8f1c3e6429d0d579093c95b9bf27c32e6fd1 (diff)
downloadminetest-805c8e51e5dd4dfad381a0d40b4388b5de90becf.tar.gz
minetest-805c8e51e5dd4dfad381a0d40b4388b5de90becf.tar.bz2
minetest-805c8e51e5dd4dfad381a0d40b4388b5de90becf.zip
Create empty default constructor for MapNode
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/map.cpp b/src/map.cpp
index fdc35558d..52303cd38 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1189,8 +1189,7 @@ void Map::removeNodeAndUpdate(v3s16 p,
This also clears the lighting.
*/
- MapNode n;
- n.setContent(replace_material);
+ MapNode n(replace_material);
setNode(p, n);
for(s32 i=0; i<2; i++)
@@ -1603,6 +1602,16 @@ struct NodeNeighbor {
NeighborType t;
v3s16 p;
bool l; //can liquid
+
+ NodeNeighbor()
+ : n(CONTENT_AIR)
+ { }
+
+ NodeNeighbor(const MapNode &node, NeighborType n_type, v3s16 pos)
+ : n(node),
+ t(n_type),
+ p(pos)
+ { }
};
void Map::transforming_liquid_add(v3s16 p) {
@@ -1716,7 +1725,7 @@ void Map::transformLiquids(std::map<v3s16, MapBlock*> & modified_blocks)
break;
}
v3s16 npos = p0 + dirs[i];
- NodeNeighbor nb = {getNodeNoEx(npos), nt, npos};
+ NodeNeighbor nb(getNodeNoEx(npos), nt, npos);
switch (nodemgr->get(nb.n.getContent()).liquid_type) {
case LIQUID_NONE:
if (nb.n.getContent() == CONTENT_AIR) {