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:
parent
9696aa242c
commit
879806e5a1
@ -470,6 +470,9 @@ void cProtocolRecognizer::SendData(const char * a_Data, int a_Size)
|
|||||||
|
|
||||||
bool cProtocolRecognizer::TryRecognizeProtocol(void)
|
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:
|
// The first packet should be a Handshake, 0x02:
|
||||||
unsigned char PacketType;
|
unsigned char PacketType;
|
||||||
if (!m_Buffer.ReadByte(PacketType))
|
if (!m_Buffer.ReadByte(PacketType))
|
||||||
|
@ -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 :
|
class cProtocolRecognizer :
|
||||||
public cProtocol
|
public cProtocol
|
||||||
{
|
{
|
||||||
|
@ -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 cChunkDataSerializer;
|
||||||
class cInventory;
|
class cInventory;
|
||||||
class cMonster;
|
class cMonster;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "cFurnaceRecipe.h"
|
#include "cFurnaceRecipe.h"
|
||||||
#include "cTracer.h"
|
#include "cTracer.h"
|
||||||
#include "cWebAdmin.h"
|
#include "cWebAdmin.h"
|
||||||
|
#include "ProtocolRecognizer.h"
|
||||||
|
|
||||||
#include "MersenneTwister.h"
|
#include "MersenneTwister.h"
|
||||||
|
|
||||||
@ -163,7 +164,7 @@ bool cServer::InitServer( int a_Port )
|
|||||||
printf("email: faketruth@gmail.com\n\n");
|
printf("email: faketruth@gmail.com\n\n");
|
||||||
|
|
||||||
LOG("Starting up server.");
|
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
|
if( cSocket::WSAStartup() != 0 ) // Only does anything on Windows, but whatever
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user