From b4ac9d702bcf958c7a658e7204306734e68058ad Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 24 Dec 2012 22:09:01 +0000 Subject: Added the 1.4.6 protocol git-svn-id: http://mc-server.googlecode.com/svn/trunk@1099 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Protocol/ProtocolRecognizer.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'source/Protocol/ProtocolRecognizer.cpp') diff --git a/source/Protocol/ProtocolRecognizer.cpp b/source/Protocol/ProtocolRecognizer.cpp index 19c40c5a3..43ed82a36 100644 --- a/source/Protocol/ProtocolRecognizer.cpp +++ b/source/Protocol/ProtocolRecognizer.cpp @@ -9,7 +9,7 @@ #include "ProtocolRecognizer.h" #include "Protocol125.h" #include "Protocol132.h" -#include "Protocol142.h" +#include "Protocol14x.h" #include "../ClientHandle.h" #include "../Root.h" #include "../World.h" @@ -47,6 +47,7 @@ AString cProtocolRecognizer::GetVersionTextFromInt(int a_ProtocolVersion) case PROTO_VERSION_1_3_2: return "1.3.2"; case PROTO_VERSION_1_4_2: return "1.4.2"; case PROTO_VERSION_1_4_4: return "1.4.4"; + case PROTO_VERSION_1_4_6: return "1.4.6"; } ASSERT(!"Unknown protocol version"); return Printf("Unknown protocol (%d)", a_ProtocolVersion); @@ -415,10 +416,10 @@ void cProtocolRecognizer::SendSpawnMob(const cMonster & a_Mob) -void cProtocolRecognizer::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, short a_SpeedX, short a_SpeedY, short a_SpeedZ) +void cProtocolRecognizer::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, short a_SpeedX, short a_SpeedY, short a_SpeedZ, Byte a_Yaw, Byte a_Pitch) { ASSERT(m_Protocol != NULL); - m_Protocol->SendSpawnObject(a_Entity, a_ObjectType, a_ObjectData, a_SpeedX, a_SpeedY, a_SpeedZ); + m_Protocol->SendSpawnObject(a_Entity, a_ObjectType, a_ObjectData, a_SpeedX, a_SpeedY, a_SpeedZ, a_Yaw, a_Pitch); } @@ -593,6 +594,11 @@ bool cProtocolRecognizer::TryRecognizeProtocol(void) m_Protocol = new cProtocol142(m_Client); return true; } + case PROTO_VERSION_1_4_6: + { + m_Protocol = new cProtocol146(m_Client); + return true; + } } m_Protocol = new cProtocol125(m_Client); return true; @@ -623,6 +629,7 @@ void cProtocolRecognizer::HandleServerPing(void) case PROTO_VERSION_1_4_2: case PROTO_VERSION_1_4_4: + case PROTO_VERSION_1_4_6: { // The server list ping now has 1 more byte of "magic". Mojang just loves to complicate stuff. // http://wiki.vg/wiki/index.php?title=Protocol&oldid=3101#Server_List_Ping_.280xFE.29 -- cgit v1.2.3