summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol19x.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-08-27 08:37:54 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-08-29 10:16:06 +0200
commitc088f7ff0a336703fb19038eef36f736a4e388f7 (patch)
treef1d9104b186d02f5da8f31ed8ce124bfbff3f6b2 /src/Protocol/Protocol19x.cpp
parentFixed SendUnloadChunk bug (#3353) (diff)
downloadcuberite-c088f7ff0a336703fb19038eef36f736a4e388f7.tar
cuberite-c088f7ff0a336703fb19038eef36f736a4e388f7.tar.gz
cuberite-c088f7ff0a336703fb19038eef36f736a4e388f7.tar.bz2
cuberite-c088f7ff0a336703fb19038eef36f736a4e388f7.tar.lz
cuberite-c088f7ff0a336703fb19038eef36f736a4e388f7.tar.xz
cuberite-c088f7ff0a336703fb19038eef36f736a4e388f7.tar.zst
cuberite-c088f7ff0a336703fb19038eef36f736a4e388f7.zip
Diffstat (limited to 'src/Protocol/Protocol19x.cpp')
-rw-r--r--src/Protocol/Protocol19x.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/Protocol/Protocol19x.cpp b/src/Protocol/Protocol19x.cpp
index d8c86cf6b..456ca8a91 100644
--- a/src/Protocol/Protocol19x.cpp
+++ b/src/Protocol/Protocol19x.cpp
@@ -117,8 +117,7 @@ cProtocol190::cProtocol190(cClientHandle * a_Client, const AString & a_ServerAdd
m_ServerPort(a_ServerPort),
m_State(a_State),
m_ReceivedData(32 KiB),
- m_IsEncrypted(false),
- m_LastSentDimension(dimNotSet)
+ m_IsEncrypted(false)
{
// BungeeCord handling:
@@ -640,7 +639,6 @@ void cProtocol190::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
Pkt.WriteString("default"); // Level type - wtf?
Pkt.WriteBool(false); // Reduced Debug Info - wtf?
}
- m_LastSentDimension = a_World.GetDimension();
// Send the spawn position:
{
@@ -1110,21 +1108,14 @@ void cProtocol190::SendResetTitle(void)
-void cProtocol190::SendRespawn(eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks)
+void cProtocol190::SendRespawn(eDimension a_Dimension)
{
- if ((m_LastSentDimension == a_Dimension) && !a_ShouldIgnoreDimensionChecks)
- {
- // Must not send a respawn for the world with the same dimension, the client goes cuckoo if we do (unless we are respawning from death)
- return;
- }
-
cPacketizer Pkt(*this, 0x33); // Respawn packet
cPlayer * Player = m_Client->GetPlayer();
Pkt.WriteBEInt32(static_cast<Int32>(a_Dimension));
Pkt.WriteBEUInt8(2); // TODO: Difficulty (set to Normal)
Pkt.WriteBEUInt8(static_cast<Byte>(Player->GetEffectiveGameMode()));
Pkt.WriteString("default");
- m_LastSentDimension = a_Dimension;
}
@@ -4058,7 +4049,6 @@ void cProtocol191::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
Pkt.WriteString("default"); // Level type - wtf?
Pkt.WriteBool(false); // Reduced Debug Info - wtf?
}
- m_LastSentDimension = a_World.GetDimension();
// Send the spawn position:
{