aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-07-23 16:55:26 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-07-23 16:55:26 +0300
commit90d793f8f369bf1431d7a915198cd49b98bbe2d7 (patch)
treeef04c10888584488cf931e9abcbf962448b24052 /src/server.cpp
parentf706644a50b9bc62de39f571b044c7f7c55078e4 (diff)
downloadminetest-90d793f8f369bf1431d7a915198cd49b98bbe2d7.tar.gz
minetest-90d793f8f369bf1431d7a915198cd49b98bbe2d7.tar.bz2
minetest-90d793f8f369bf1431d7a915198cd49b98bbe2d7.zip
extended content-type range
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server.cpp b/src/server.cpp
index c2433e1af..e3c6ce4d9 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -2494,7 +2494,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
// Mandatory parameter; actually used for nothing
core::map<v3s16, MapBlock*> modified_blocks;
- u8 material = CONTENT_IGNORE;
+ content_t material = CONTENT_IGNORE;
u8 mineral = MINERAL_NONE;
bool cannot_remove_node = false;
@@ -2505,7 +2505,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
// Get mineral
mineral = n.getMineral();
// Get material at position
- material = n.d;
+ material = n.getContent();
// If not yet cancelled
if(cannot_remove_node == false)
{
@@ -2705,7 +2705,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
<<" because privileges are "<<getPlayerPrivs(player)
<<std::endl;
- if(content_buildable_to(n2.d) == false
+ if(content_features(n2).buildable_to == false
|| no_enough_privs)
{
// Client probably has wrong data.
@@ -2736,14 +2736,14 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
// Create node data
MaterialItem *mitem = (MaterialItem*)item;
MapNode n;
- n.d = mitem->getMaterial();
+ n.setContent(mitem->getMaterial());
// Calculate direction for wall mounted stuff
- if(content_features(n.d).wall_mounted)
- n.dir = packDir(p_under - p_over);
+ if(content_features(n).wall_mounted)
+ n.param2 = packDir(p_under - p_over);
// Calculate the direction for furnaces and chests and stuff
- if(content_features(n.d).param_type == CPT_FACEDIR_SIMPLE)
+ if(content_features(n).param_type == CPT_FACEDIR_SIMPLE)
{
v3f playerpos = player->getPosition();
v3f blockpos = intToFloat(p_over, BS) - playerpos;