diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-12 16:21:07 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-12 16:21:07 +0200 |
commit | 29567c56107c86b70da130f995564beb2eaf424c (patch) | |
tree | be7b996042b28d8ebac0c7c665963d1d7e991600 /src/Protocol/Protocol125.cpp | |
parent | Merge branch 'master' into portals (diff) | |
download | cuberite-29567c56107c86b70da130f995564beb2eaf424c.tar cuberite-29567c56107c86b70da130f995564beb2eaf424c.tar.gz cuberite-29567c56107c86b70da130f995564beb2eaf424c.tar.bz2 cuberite-29567c56107c86b70da130f995564beb2eaf424c.tar.lz cuberite-29567c56107c86b70da130f995564beb2eaf424c.tar.xz cuberite-29567c56107c86b70da130f995564beb2eaf424c.tar.zst cuberite-29567c56107c86b70da130f995564beb2eaf424c.zip |
Diffstat (limited to 'src/Protocol/Protocol125.cpp')
-rw-r--r-- | src/Protocol/Protocol125.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp index 5796ba271..f33965cb9 100644 --- a/src/Protocol/Protocol125.cpp +++ b/src/Protocol/Protocol125.cpp @@ -833,23 +833,23 @@ void cProtocol125::SendRemoveEntityEffect(const cEntity & a_Entity, int a_Effect -void cProtocol125::SendRespawn(const cWorld & a_World) +void cProtocol125::SendRespawn(eDimension a_Dimension) { cCSLock Lock(m_CSPacket); - if (m_LastSentDimension == a_World.GetDimension()) + if (m_LastSentDimension == a_Dimension) { // Must not send a respawn for the world with the same dimension, the client goes cuckoo if we do return; } cPlayer * Player = m_Client->GetPlayer(); WriteByte (PACKET_RESPAWN); - WriteInt ((int)(a_World.GetDimension())); + WriteInt ((int)(a_Dimension)); WriteByte (2); // TODO: Difficulty; 2 = Normal WriteChar ((char)Player->GetGameMode()); WriteShort (256); // Current world height WriteString("default"); Flush(); - m_LastSentDimension = a_World.GetDimension(); + m_LastSentDimension = a_Dimension; } |