summaryrefslogtreecommitdiff
path: root/src/mapnode.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-10-12 13:53:38 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-10-12 13:53:38 +0300
commit9e46cbf7ea512330f35d0f2ede0c7c0c085c7cf4 (patch)
treef937a97b67b5ecd0ee65ed9a845e6e4a640bb629 /src/mapnode.cpp
parentb60b58b627f078faba002401d300b522e0077efc (diff)
downloadminetest-9e46cbf7ea512330f35d0f2ede0c7c0c085c7cf4.tar.gz
minetest-9e46cbf7ea512330f35d0f2ede0c7c0c085c7cf4.tar.bz2
minetest-9e46cbf7ea512330f35d0f2ede0c7c0c085c7cf4.zip
Header file tweaking; mainly for speed
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()
{