summaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-02-01 20:28:21 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-02-01 20:28:21 +0200
commit3d6e71a7d0d100e4d59464adcf8f0a09e6a20ad8 (patch)
treee86a11929252e6253bffa525cf35cfbbed595b73 /src/server.cpp
parent6834b39c96f1e381fef1ad5423864eaafde12c6a (diff)
downloadminetest-3d6e71a7d0d100e4d59464adcf8f0a09e6a20ad8.tar.gz
minetest-3d6e71a7d0d100e4d59464adcf8f0a09e6a20ad8.tar.bz2
minetest-3d6e71a7d0d100e4d59464adcf8f0a09e6a20ad8.zip
end-of-day.
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 669266cf2..d71a6c053 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -568,6 +568,11 @@ void RemoteClient::GetNextBlocks(Server *server, float dtime,
continue;
}
+#if 0
+ /*
+ NOTE: We can't know the ground level this way with the
+ new generator.
+ */
if(haxmode)
{
/*
@@ -586,6 +591,7 @@ void RemoteClient::GetNextBlocks(Server *server, float dtime,
continue;
}
}
+#endif
/*
Check if map has this block
@@ -2093,7 +2099,18 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
// Don't add a node if this is not a free space
MapNode n2 = m_env.getMap().getNode(p_over);
if(content_buildable_to(n2.d) == false)
+ {
+ // Client probably has wrong data.
+ // Set block not sent, so that client will get
+ // a valid one.
+ dstream<<"Client "<<peer_id<<" tried to place"
+ <<" node in invalid position; setting"
+ <<" MapBlock not sent."<<std::endl;
+ RemoteClient *client = getClient(peer_id);
+ v3s16 blockpos = getNodeBlockPos(p_over);
+ client->SetBlockNotSent(blockpos);
return;
+ }
}
catch(InvalidPositionException &e)
{
@@ -3189,7 +3206,7 @@ Player *Server::emergePlayer(const char *name, const char *password,
*/
player->setPosition(intToFloat(v3s16(
0,
- 50,
+ 64,
0
)));
@@ -3227,7 +3244,7 @@ Player *Server::emergePlayer(const char *name, const char *password,
#if 1
player->setPosition(intToFloat(v3s16(
0,
- 50,
+ 64,
0
)));
#endif