summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-24 12:40:29 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-24 12:40:29 +0100
commite1ef489e08a91cce377617b99f4c3ed3df5e9d92 (patch)
tree93472b45e79bce29c1be696ced78a7ef6affd45e /source/cClientHandle.cpp
parentReverted the previous commit - it is useless, since entities still depend heavily on cWorld (diff)
downloadcuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.tar
cuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.tar.gz
cuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.tar.bz2
cuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.tar.lz
cuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.tar.xz
cuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.tar.zst
cuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.zip
Diffstat (limited to '')
-rw-r--r--source/cClientHandle.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp
index 3df4b36b2..37dab9caf 100644
--- a/source/cClientHandle.cpp
+++ b/source/cClientHandle.cpp
@@ -95,11 +95,7 @@ int cClientHandle::s_ClientCount = 0;
cClientHandle::cClientHandle(const cSocket & a_Socket, int a_ViewDistance)
: m_ViewDistance(a_ViewDistance)
-#if (MINECRAFT_1_2_2 == 1)
, m_ProtocolVersion(28)
-#else
- , m_ProtocolVersion(23)
-#endif
, m_Socket(a_Socket)
, m_bDestroyed(false)
, m_Player(NULL)
@@ -302,9 +298,6 @@ void cClientHandle::Authenticate(void)
LoginResponse.m_ProtocolVersion = m_Player->GetUniqueID();
//LoginResponse.m_Username = "";
LoginResponse.m_ServerMode = m_Player->GetGameMode(); // set gamemode from player.
-#if (MINECRAFT_1_2_2 != 1)
- LoginResponse.m_MapSeed = cRoot::Get()->GetWorld()->GetWorldSeed();
-#endif
LoginResponse.m_Dimension = 0;
LoginResponse.m_MaxPlayers = (unsigned char)cRoot::Get()->GetDefaultWorld()->GetMaxPlayers();
LoginResponse.m_Difficulty = 2;
@@ -624,7 +617,6 @@ void cClientHandle::HandlePing(void)
void cClientHandle::HandleHandshake(cPacket_Handshake * a_Packet)
{
-#if (MINECRAFT_1_2_2 == 1)
AStringVector UserData = StringSplit( a_Packet->m_Username, ";" ); // "FakeTruth;localhost:25565"
if( UserData.size() == 0 )
{
@@ -632,9 +624,6 @@ void cClientHandle::HandleHandshake(cPacket_Handshake * a_Packet)
return;
}
m_Username = UserData[0];
-#else
- m_Username = a_Packet->m_Username;
-#endif
LOG("HANDSHAKE %s", m_Username.c_str());
@@ -1720,13 +1709,8 @@ void cClientHandle::Send(const cPacket & a_Packet, ENUM_PRIORITY a_Priority /* =
// Check chunks being sent, erase them from m_ChunksToSend:
if (a_Packet.m_PacketID == E_MAP_CHUNK)
{
- #if (MINECRAFT_1_2_2 == 1)
int ChunkX = ((cPacket_MapChunk &)a_Packet).m_PosX;
int ChunkZ = ((cPacket_MapChunk &)a_Packet).m_PosZ;
- #else
- int ChunkX = ((cPacket_MapChunk &)a_Packet).m_PosX / cChunkDef::Width;
- int ChunkZ = ((cPacket_MapChunk &)a_Packet).m_PosZ / cChunkDef::Width;
- #endif
bool Found = false;
cCSLock Lock(m_CSChunkLists);
for (cChunkCoordsList::iterator itr = m_ChunksToSend.begin(); itr != m_ChunksToSend.end(); ++itr)