From 10a30a03e38116fe084138662bd59147331dd883 Mon Sep 17 00:00:00 2001 From: Howaner Date: Mon, 8 Sep 2014 11:35:21 +0200 Subject: Added GetProtocolVersion() to cProtocol. --- src/Protocol/Protocol14x.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/Protocol/Protocol14x.cpp') diff --git a/src/Protocol/Protocol14x.cpp b/src/Protocol/Protocol14x.cpp index 3b6b6a42a..2d737acb4 100644 --- a/src/Protocol/Protocol14x.cpp +++ b/src/Protocol/Protocol14x.cpp @@ -23,6 +23,7 @@ Implements the 1.4.x protocol classes representing these protocols: #include "../UI/Window.h" #include "../Entities/Pickup.h" #include "../Entities/FallingBlock.h" +#include "ProtocolRecognizer.h" #ifdef _MSC_VER #pragma warning(push) @@ -72,6 +73,7 @@ enum cProtocol142::cProtocol142(cClientHandle * a_Client) : super(a_Client) { + m_ProtocolVersion = cProtocolRecognizer::PROTO_VERSION_1_4_2; } @@ -132,12 +134,6 @@ void cProtocol142::SendSoundParticleEffect(int a_EffectID, int a_SrcX, int a_Src void cProtocol142::SendTimeUpdate(Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle) { - if (!a_DoDaylightCycle) - { - // When writing a "-" before the number the client ignores it but it will stop the client-side time expiration. - a_TimeOfDay = std::min(-a_TimeOfDay, -1LL); - } - cCSLock Lock(m_CSPacket); WriteByte (PACKET_UPDATE_TIME); WriteInt64(a_WorldAge); @@ -156,6 +152,7 @@ void cProtocol142::SendTimeUpdate(Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_Do cProtocol146::cProtocol146(cClientHandle * a_Client) : super(a_Client) { + m_ProtocolVersion = cProtocolRecognizer::PROTO_VERSION_1_4_6; } -- cgit v1.2.3 From 6d5a5eb665d8f13dd3e4e7c279967556b0f9fa91 Mon Sep 17 00:00:00 2001 From: Howaner Date: Thu, 11 Sep 2014 22:27:35 +0200 Subject: Removed GetProtocolVersion() from the protocols. --- src/Protocol/Protocol14x.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/Protocol/Protocol14x.cpp') diff --git a/src/Protocol/Protocol14x.cpp b/src/Protocol/Protocol14x.cpp index 2d737acb4..d33314a2f 100644 --- a/src/Protocol/Protocol14x.cpp +++ b/src/Protocol/Protocol14x.cpp @@ -23,7 +23,6 @@ Implements the 1.4.x protocol classes representing these protocols: #include "../UI/Window.h" #include "../Entities/Pickup.h" #include "../Entities/FallingBlock.h" -#include "ProtocolRecognizer.h" #ifdef _MSC_VER #pragma warning(push) @@ -73,7 +72,6 @@ enum cProtocol142::cProtocol142(cClientHandle * a_Client) : super(a_Client) { - m_ProtocolVersion = cProtocolRecognizer::PROTO_VERSION_1_4_2; } @@ -152,7 +150,6 @@ void cProtocol142::SendTimeUpdate(Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_Do cProtocol146::cProtocol146(cClientHandle * a_Client) : super(a_Client) { - m_ProtocolVersion = cProtocolRecognizer::PROTO_VERSION_1_4_6; } -- cgit v1.2.3