aboutsummaryrefslogtreecommitdiff
path: root/src/mapnode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapnode.cpp')
-rw-r--r--src/mapnode.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mapnode.cpp b/src/mapnode.cpp
index 956abe5c7..170500f45 100644
--- a/src/mapnode.cpp
+++ b/src/mapnode.cpp
@@ -19,7 +19,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "common_irrlicht.h"
#include "mapnode.h"
+#ifndef SERVER
#include "tile.h"
+#endif
#include "porting.h"
#include <string>
#include "mineral.h"
@@ -31,10 +33,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
ContentFeatures::~ContentFeatures()
{
delete initial_metadata;
+#ifndef SERVER
delete special_material;
delete special_atlas;
+#endif
}
+#ifndef SERVER
void ContentFeatures::setTexture(u16 i, std::string name, u8 alpha)
{
if(g_texturesource)
@@ -81,6 +86,7 @@ void ContentFeatures::setInventoryTextureCube(std::string top,
imgname_full += right;
inventory_texture = g_texturesource->getTextureRaw(imgname_full);
}
+#endif
struct ContentFeatures g_content_features[MAX_CONTENT+1];
@@ -118,7 +124,8 @@ void init_mapnode()
/*
Initialize content feature table
*/
-
+
+#ifndef SERVER
/*
Set initial material type to same in all tiles, so that the
same material can be used in more stuff.
@@ -140,6 +147,7 @@ void init_mapnode()
for(u16 j=0; j<6; j++)
f->tiles[j].material_type = initial_material_type;
}
+#endif
/*
Initially set every block to be shown as an unknown block.
@@ -184,6 +192,7 @@ v3s16 facedir_rotate(u8 facedir, v3s16 dir)
return newdir;
}
+#ifndef SERVER
TileSpec MapNode::getTile(v3s16 dir)
{
if(content_features(*this).param_type == CPT_FACEDIR_SIMPLE)
@@ -235,6 +244,7 @@ TileSpec MapNode::getTile(v3s16 dir)
return spec;
}
+#endif
u8 MapNode::getMineral()
{