Gamelogic - Commit because branch switch
This commit is contained in:
parent
a3e4262c08
commit
4617523f8b
|
@ -196,7 +196,6 @@ Global
|
|||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|x64.Build.0 = Debug|x64
|
||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
|
@ -208,7 +207,6 @@ Global
|
|||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|x64.Build.0 = Debug|x64
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
|
|
|
@ -3,11 +3,13 @@
|
|||
/////////////////////////////////////////////////////////////////////
|
||||
#include <Windows.h>
|
||||
#include <WindowShell.h>
|
||||
#include <iostream>
|
||||
|
||||
#include "GameServer.h"
|
||||
#include "Utilities.h"
|
||||
#include "ServerInitReader.h"
|
||||
#include <TEST_PROTOCOLS.h>
|
||||
#include <Thread\OysterThread.h>
|
||||
|
||||
namespace DanBias
|
||||
{
|
||||
|
@ -17,10 +19,7 @@ namespace DanBias
|
|||
void GameServer::ClientConnectCallback(NetworkClient client)
|
||||
{
|
||||
printf("Client connected!\n");
|
||||
GameLogic::Protocol_TEST t;
|
||||
t.text = 'A';
|
||||
client.Send(t);
|
||||
Sleep(50000);
|
||||
|
||||
this->mainLobby->AttachClient(Utility::DynamicMemory::SmartPointer<NetworkClient>(new NetworkClient(client)));
|
||||
}
|
||||
GameServer::GameServer()
|
||||
|
@ -65,6 +64,8 @@ namespace DanBias
|
|||
|
||||
if(!this->server->Start()) return DanBiasServerReturn_Error;
|
||||
|
||||
|
||||
|
||||
this->running = true;
|
||||
while (this->running)
|
||||
{
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
#include "NetworkSession.h"
|
||||
|
||||
#include <mutex>
|
||||
|
||||
namespace DanBias
|
||||
{
|
||||
NetworkSession::NetworkSession()
|
||||
{
|
||||
|
||||
}
|
||||
NetworkSession::~NetworkSession()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void NetworkSession::AttachClient(Utility::DynamicMemory::SmartPointer<Oyster::Network::NetworkClient> client)
|
||||
{
|
||||
|
||||
}
|
||||
void NetworkSession::DetachClient(Utility::DynamicMemory::SmartPointer<Oyster::Network::NetworkClient> client)
|
||||
{
|
||||
|
||||
}
|
||||
void NetworkSession::DetachClient(short ID)
|
||||
{
|
||||
|
@ -23,6 +27,7 @@ namespace DanBias
|
|||
|
||||
void NetworkSession::Kick(Utility::DynamicMemory::SmartPointer<Oyster::Network::NetworkClient> client)
|
||||
{
|
||||
|
||||
}
|
||||
void NetworkSession::Kick()
|
||||
{
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace GameLogic
|
|||
Oyster::Network::CustomNetProtocol protocol;
|
||||
};
|
||||
|
||||
struct Protocol_PlayerPosition :public Network::CustomProtocolObject
|
||||
struct Protocol_PlayerPosition :public Oyster::Network::CustomProtocolObject
|
||||
{
|
||||
float position[3];
|
||||
// look at dir
|
||||
|
@ -59,14 +59,14 @@ namespace GameLogic
|
|||
Protocol_PlayerPosition()
|
||||
{
|
||||
this->protocol[0].value = protocol_PlayerPosition;
|
||||
this->protocol[0].type = Network::NetAttributeType_Int;
|
||||
this->protocol[0].type = Oyster::Network::NetAttributeType_Int;
|
||||
|
||||
this->protocol[1].type = Network::NetAttributeType_Float;
|
||||
this->protocol[2].type = Network::NetAttributeType_Float;
|
||||
this->protocol[3].type = Network::NetAttributeType_Float;
|
||||
this->protocol[1].type = Oyster::Network::NetAttributeType_Float;
|
||||
this->protocol[2].type = Oyster::Network::NetAttributeType_Float;
|
||||
this->protocol[3].type = Oyster::Network::NetAttributeType_Float;
|
||||
|
||||
}
|
||||
Network::CustomNetProtocol* GetProtocol() override
|
||||
Oyster::Network::CustomNetProtocol* GetProtocol() override
|
||||
{
|
||||
|
||||
this->protocol[1].value = position[0];
|
||||
|
@ -76,7 +76,7 @@ namespace GameLogic
|
|||
}
|
||||
|
||||
private:
|
||||
Network::CustomNetProtocol protocol;
|
||||
Oyster::Network::CustomNetProtocol protocol;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
#define protocol_PlayerPosition 1
|
||||
#define protocol_ObjectPosition 2
|
||||
|
||||
#define PROTOCOL_TEST 2
|
||||
#define PROTOCOL_TEST 1000
|
||||
|
||||
#endif // !GAMEPROTOCOL_PROTOCOL_DEFINITION_ID_H
|
||||
|
|
|
@ -19,7 +19,9 @@ Listener::~Listener()
|
|||
{
|
||||
if(connection)
|
||||
{
|
||||
this->thread.Terminate();
|
||||
delete connection;
|
||||
connection = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue