1
0

Officially added 1.3.2 protocol support

git-svn-id: http://mc-server.googlecode.com/svn/trunk@839 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-09-06 12:39:07 +00:00
parent 9696aa242c
commit 879806e5a1
4 changed files with 13 additions and 8 deletions

View File

@ -470,6 +470,9 @@ void cProtocolRecognizer::SendData(const char * a_Data, int a_Size)
bool cProtocolRecognizer::TryRecognizeProtocol(void)
{
// NOTE: If a new protocol is added or an old one is removed, adjust MCS_CLIENT_VERSIONS and
// MCS_PROTOCOL_VERSIONS macros in the header file
// The first packet should be a Handshake, 0x02:
unsigned char PacketType;
if (!m_Buffer.ReadByte(PacketType))

View File

@ -17,6 +17,14 @@
// Adjust these if a new protocol is added or an old one is removed:
#define MCS_CLIENT_VERSIONS "1.2.4, 1.2.5, 1.3.1, 1.3.2"
#define MCS_PROTOCOL_VERSIONS "29, 39"
class cProtocolRecognizer :
public cProtocol
{

View File

@ -21,13 +21,6 @@
#define MCS_PROTOCOL_VERSION 29 // Synchronize this with MCS_CLIENT_VERSION below!
#define MCS_CLIENT_VERSION "1.2.4, 1.2.5"
class cChunkDataSerializer;
class cInventory;
class cMonster;

View File

@ -21,6 +21,7 @@
#include "cFurnaceRecipe.h"
#include "cTracer.h"
#include "cWebAdmin.h"
#include "ProtocolRecognizer.h"
#include "MersenneTwister.h"
@ -163,7 +164,7 @@ bool cServer::InitServer( int a_Port )
printf("email: faketruth@gmail.com\n\n");
LOG("Starting up server.");
LOGINFO("Compatible clients: %s, protocol version %d", MCS_CLIENT_VERSION, MCS_PROTOCOL_VERSION);
LOGINFO("Compatible clients: %s, protocol versions %s", MCS_CLIENT_VERSIONS, MCS_PROTOCOL_VERSIONS);
if( cSocket::WSAStartup() != 0 ) // Only does anything on Windows, but whatever
{