diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/client.cpp | 5 | ||||
-rw-r--r-- | src/client/client.h | 1 | ||||
-rw-r--r-- | src/client/clientenvironment.cpp | 15 | ||||
-rw-r--r-- | src/client/clientmap.cpp | 2 | ||||
-rw-r--r-- | src/client/mapblock_mesh.cpp | 27 | ||||
-rw-r--r-- | src/client/mapblock_mesh.h | 5 |
6 files changed, 1 insertions, 54 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp index 7fafe0da9..0bd98b256 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -1665,11 +1665,6 @@ ClientEvent *Client::getClientEvent() return event; } -bool Client::connectedToServer() -{ - return m_con->Connected(); -} - const Address Client::getServerAddress() { return m_con->GetPeerAddress(PEER_ID_SERVER); diff --git a/src/client/client.h b/src/client/client.h index 8f4aac6e3..bffdc7ec6 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -338,7 +338,6 @@ public: u16 getProtoVersion() { return m_proto_ver; } - bool connectedToServer(); void confirmRegistration(); bool m_is_registration_confirmation_state = false; bool m_simple_singleplayer_mode; diff --git a/src/client/clientenvironment.cpp b/src/client/clientenvironment.cpp index 0b7e92325..f831978a8 100644 --- a/src/client/clientenvironment.cpp +++ b/src/client/clientenvironment.cpp @@ -368,21 +368,6 @@ bool isFreeClientActiveObjectId(const u16 id, } -u16 getFreeClientActiveObjectId(ClientActiveObjectMap &objects) -{ - // try to reuse id's as late as possible - static u16 last_used_id = 0; - u16 startid = last_used_id; - for(;;) { - last_used_id ++; - if (isFreeClientActiveObjectId(last_used_id, objects)) - return last_used_id; - - if (last_used_id == startid) - return 0; - } -} - u16 ClientEnvironment::addActiveObject(ClientActiveObject *object) { // Register object. If failed return zero id diff --git a/src/client/clientmap.cpp b/src/client/clientmap.cpp index 3e4ab2e94..3124313e7 100644 --- a/src/client/clientmap.cpp +++ b/src/client/clientmap.cpp @@ -36,7 +36,7 @@ ClientMap::ClientMap( MapDrawControl &control, s32 id ): - Map(dout_client, client), + Map(client), scene::ISceneNode(RenderingEngine::get_scene_manager()->getRootSceneNode(), RenderingEngine::get_scene_manager(), id), m_client(client), diff --git a/src/client/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp index b59679523..f9332e399 100644 --- a/src/client/mapblock_mesh.cpp +++ b/src/client/mapblock_mesh.cpp @@ -81,33 +81,6 @@ void MeshMakeData::fill(MapBlock *block) } } -void MeshMakeData::fillSingleNode(MapNode *node) -{ - m_blockpos = v3s16(0,0,0); - - v3s16 blockpos_nodes = v3s16(0,0,0); - VoxelArea area(blockpos_nodes-v3s16(1,1,1)*MAP_BLOCKSIZE, - blockpos_nodes+v3s16(1,1,1)*MAP_BLOCKSIZE*2-v3s16(1,1,1)); - s32 volume = area.getVolume(); - s32 our_node_index = area.index(1,1,1); - - // Allocate this block + neighbors - m_vmanip.clear(); - m_vmanip.addArea(area); - - // Fill in data - MapNode *data = new MapNode[volume]; - for(s32 i = 0; i < volume; i++) - { - if (i == our_node_index) - data[i] = *node; - else - data[i] = MapNode(CONTENT_AIR, LIGHT_MAX, 0); - } - m_vmanip.copyFrom(data, area, area.MinEdge, area.MinEdge, area.getExtent()); - delete[] data; -} - void MeshMakeData::setCrack(int crack_level, v3s16 crack_pos) { if (crack_level >= 0) diff --git a/src/client/mapblock_mesh.h b/src/client/mapblock_mesh.h index 6af23a656..f8aed40dc 100644 --- a/src/client/mapblock_mesh.h +++ b/src/client/mapblock_mesh.h @@ -63,11 +63,6 @@ struct MeshMakeData void fill(MapBlock *block); /* - Set up with only a single node at (1,1,1) - */ - void fillSingleNode(MapNode *node); - - /* Set the (node) position of a crack */ void setCrack(int crack_level, v3s16 crack_pos); |