summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-27 19:31:16 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-27 19:31:16 +0200
commit66f4c9e0c08762fb4668792999c6200e9fd78c89 (patch)
treeaf89423afb69f78251a16eb041e88cca9ebef478 /source/cChunk.cpp
parentgit-svn-id: http://mc-server.googlecode.com/svn/trunk@795 0a769ca7-a7f5-676a-18bf-c427514a06d6 (diff)
downloadcuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.tar
cuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.tar.gz
cuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.tar.bz2
cuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.tar.lz
cuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.tar.xz
cuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.tar.zst
cuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.zip
Diffstat (limited to 'source/cChunk.cpp')
-rw-r--r--source/cChunk.cpp109
1 files changed, 0 insertions, 109 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index aec75cd41..351f456af 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -1619,115 +1619,6 @@ void cChunk::GetBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE & a_
-/*
-// _X 2012_02_23: Loading in old format not supported anymore
-/// Loads the chunk from the old-format disk file, erases the file afterwards. Returns true if successful
-bool cChunk::LoadFromDisk()
-{
- AString SourceFile;
- Printf(SourceFile, "world/X%i_Y%i_Z%i.bin", m_PosX, m_PosY, m_PosZ );
-
- cFile f;
- if (!f.Open(SourceFile, cFile::fmRead))
- {
- return false;
- }
-
- if (f.Read(m_BlockData, sizeof(m_BlockData)) != sizeof(m_BlockData))
- {
- LOGERROR("ERROR READING FROM FILE %s", SourceFile.c_str());
- return false;
- }
-
- // Now load Block Entities:
- ENUM_BLOCK_ID BlockType;
- while (f.Read(&BlockType, sizeof(ENUM_BLOCK_ID)) == sizeof(ENUM_BLOCK_ID))
- {
- switch (BlockType)
- {
- case E_BLOCK_CHEST:
- {
- cChestEntity * ChestEntity = new cChestEntity( 0, 0, 0, m_World );
- if (!ChestEntity->LoadFromFile(f))
- {
- LOGERROR("ERROR READING CHEST FROM FILE %s", SourceFile.c_str());
- delete ChestEntity;
- return false;
- }
- m_BlockEntities.push_back( ChestEntity );
- break;
- }
-
- case E_BLOCK_FURNACE:
- {
- cFurnaceEntity* FurnaceEntity = new cFurnaceEntity( 0, 0, 0, m_World );
- if (!FurnaceEntity->LoadFromFile(f))
- {
- LOGERROR("ERROR READING FURNACE FROM FILE %s", SourceFile.c_str());
- delete FurnaceEntity;
- return false;
- }
- m_BlockEntities.push_back( FurnaceEntity );
- break;
- }
-
- case E_BLOCK_SIGN_POST:
- case E_BLOCK_WALLSIGN:
- {
- cSignEntity * SignEntity = new cSignEntity(BlockType, 0, 0, 0, m_World );
- if (!SignEntity->LoadFromFile( f ) )
- {
- LOGERROR("ERROR READING SIGN FROM FILE %s", SourceFile.c_str());
- delete SignEntity;
- return false;
- }
- m_BlockEntities.push_back( SignEntity );
- break;
- }
-
- default:
- {
- ASSERT(!"Unhandled block entity in file");
- break;
- }
- }
- }
- f.Close();
-
- // Delete old format file
- if (std::remove(SourceFile.c_str()) != 0)
- {
- LOGERROR("Could not delete file %s", SourceFile.c_str());
- }
- else
- {
- LOGINFO("Successfully deleted old format file \"%s\"", SourceFile.c_str());
- }
- m_IsDirty = false;
- return true;
-}
-*/
-
-
-
-
-
-void cChunk::Broadcast( const cPacket * a_Packet, cClientHandle* a_Exclude)
-{
- for (cClientHandleList::const_iterator itr = m_LoadedByClient.begin(); itr != m_LoadedByClient.end(); ++itr )
- {
- if (*itr == a_Exclude)
- {
- continue;
- }
- (*itr)->Send(*a_Packet);
- } // for itr - LoadedByClient[]
-}
-
-
-
-
-
void cChunk::BroadcastPlayerAnimation(const cPlayer & a_Player, char a_Animation, const cClientHandle * a_Exclude)
{
for (cClientHandleList::const_iterator itr = m_LoadedByClient.begin(); itr != m_LoadedByClient.end(); ++itr )