mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-30 20:13:31 +00:00
Delete useless class
This commit is contained in:
@@ -1,33 +0,0 @@
|
|||||||
#include "NATPunchHandler.h"
|
|
||||||
#include "../raknet/TCPInterface.h"
|
|
||||||
#include "../raknet/HTTPConnection.h"
|
|
||||||
#include "PHPDirectoryServer2.h"
|
|
||||||
|
|
||||||
using namespace RakNet;
|
|
||||||
NATPuchHandler::NATPuchHandler() {
|
|
||||||
tcpInterface = new TCPInterface;
|
|
||||||
}
|
|
||||||
NATPuchHandler::~NATPuchHandler() {
|
|
||||||
delete tcpInterface;
|
|
||||||
}
|
|
||||||
|
|
||||||
void NATPuchHandler::initialize() {
|
|
||||||
tcpInterface->Start(0, 64);
|
|
||||||
}
|
|
||||||
|
|
||||||
void NATPuchHandler::registerToGameList(const RakNet::RakString& serverName, int port) {
|
|
||||||
HTTPConnection httpConnection;
|
|
||||||
httpConnection.Init(tcpInterface, "johanbernhardsson.se");
|
|
||||||
PHPDirectoryServer2 directoryServer;
|
|
||||||
directoryServer.Init(&httpConnection, "/DirectoryServer.php");
|
|
||||||
directoryServer.UploadTable("", serverName, port, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void NATPuchHandler::removeFromGameList() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void NATPuchHandler::close() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#ifndef _MINECRAFT_NETWORK_NATPUNCHHANDLER_H_
|
|
||||||
#define _MINECRAFT_NETWORK_NATPUNCHHANDLER_H_
|
|
||||||
#include "../raknet/TCPInterface.h"
|
|
||||||
#include "../raknet/RakString.h"
|
|
||||||
class NATPuchHandler {
|
|
||||||
public:
|
|
||||||
enum NATPuchHandlerStatus {
|
|
||||||
NATPuchInitilized = 0,
|
|
||||||
NATPuchFetchingServerList = 1,
|
|
||||||
NATPuchConnecting = 2,
|
|
||||||
NATPuchConnected = 3,
|
|
||||||
NATPuchDissconnected = 4
|
|
||||||
};
|
|
||||||
NATPuchHandler();
|
|
||||||
~NATPuchHandler();
|
|
||||||
void initialize();
|
|
||||||
void registerToGameList(const RakNet::RakString& serverName, int port);
|
|
||||||
void removeFromGameList();
|
|
||||||
void close();
|
|
||||||
private:
|
|
||||||
RakNet::TCPInterface *tcpInterface;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* _MINECRAFT_NETWORK_NATPUNCHHANDLER_H_ */
|
|
||||||
@@ -418,8 +418,8 @@ void ServerSideNetworkHandler::handle(const RakNet::RakNetGUID& source, MovePlay
|
|||||||
|
|
||||||
// TODO: Replace with Entity::move()
|
// TODO: Replace with Entity::move()
|
||||||
// if (speed < 2.5f) {
|
// if (speed < 2.5f) {
|
||||||
printf("Packet do: %f, %f, %f \n", packet->x, packet->y, packet->z);
|
printf("Packet before: %f, %f, %f \n", packet->x, packet->y, packet->z);
|
||||||
printf("Entity do: %f, %f, %f \n", entity->x, entity->y, entity->z);
|
printf("Entity before: %f, %f, %f \n", entity->x, entity->y, entity->z);
|
||||||
printf("Delta: %f %f %f \n", packet->x - entity->x, packet->y - entity->y, packet->z - entity->z);
|
printf("Delta: %f %f %f \n", packet->x - entity->x, packet->y - entity->y, packet->z - entity->z);
|
||||||
player->xd = player->yd = player->zd = 0;
|
player->xd = player->yd = player->zd = 0;
|
||||||
player->move(packet->x - entity->x, packet->y - entity->y, packet->z - entity->z);
|
player->move(packet->x - entity->x, packet->y - entity->y, packet->z - entity->z);
|
||||||
|
|||||||
Reference in New Issue
Block a user