diff --git a/Code/Game/DanBiasServer/GameSession/GameClient.cpp b/Code/Game/DanBiasServer/GameSession/GameClient.cpp index dd62c44a..da666881 100644 --- a/Code/Game/DanBiasServer/GameSession/GameClient.cpp +++ b/Code/Game/DanBiasServer/GameSession/GameClient.cpp @@ -17,7 +17,6 @@ GameClient::GameClient(SmartPointer client, Game::PlayerData player { this->callbackValue = value; this->client = client; - //this->player = new GameLogic::Player(); this->id = gameClientIDCount++; this->player = player; Oyster::Callback::OysterCallback c; @@ -32,7 +31,6 @@ GameClient::~GameClient() this->player.playerID = 0; this->player.teamID = 0; this->id = -1; - //this->player.Release(); } void GameClient::SetCallback(Oyster::Callback::OysterCallback value) @@ -40,10 +38,6 @@ void GameClient::SetCallback(Oyster::Callback::OysterCallbackcallbackValue = value; } -//GameLogic::Player* GameClient::GetPlayer() -//{ -// return this->player.Get(); -//} GameLogic::Game::PlayerData* GameClient::GetPlayer() { return &this->player; diff --git a/Code/Game/DanBiasServer/GameSession/GameSession_General.cpp b/Code/Game/DanBiasServer/GameSession/GameSession_General.cpp index 07f97cff..d6db176e 100644 --- a/Code/Game/DanBiasServer/GameSession/GameSession_General.cpp +++ b/Code/Game/DanBiasServer/GameSession/GameSession_General.cpp @@ -145,8 +145,11 @@ namespace DanBias { for (int i = 0; i < this->clients.Size(); i++) { - s->Attach(this->clients[i]->ReleaseClient()); - RemoveClient(this->clients[i]); + if(this->clients[i]) + { + s->Attach(this->clients[i]->ReleaseClient()); + RemoveClient(this->clients[i]); + } } } } diff --git a/Code/Network/NetworkDependencies/Connection.cpp b/Code/Network/NetworkDependencies/Connection.cpp index 7d6daca6..bd289c63 100644 --- a/Code/Network/NetworkDependencies/Connection.cpp +++ b/Code/Network/NetworkDependencies/Connection.cpp @@ -108,6 +108,7 @@ int Connection::InitiateClient() int Connection::Disconnect() { + if(this->closed) return -1; int val = CloseSocket(this->socket); this->socket = -1; this->closed = true; @@ -117,6 +118,8 @@ int Connection::Disconnect() int Connection::Send(OysterByte &bytes) { + if(this->closed) return -1; + int nBytes; nBytes = send(this->socket, bytes, bytes.GetSize(), 0); @@ -130,6 +133,7 @@ int Connection::Send(OysterByte &bytes) int Connection::Recieve(OysterByte &bytes) { + if(this->closed) return -1; int nBytes; bytes.Resize(1000); @@ -150,6 +154,8 @@ int Connection::Recieve(OysterByte &bytes) //Listen will only return the correct socket or -1 for failure. int Connection::Listen() { + if(this->closed) return -1; + int clientSocket; if((clientSocket = (int)accept(this->socket, NULL, NULL)) == INVALID_SOCKET) { diff --git a/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/PostPass.hlsl b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/PostPass.hlsl index 1c52e5bf..2aaf2051 100644 --- a/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/PostPass.hlsl +++ b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/PostPass.hlsl @@ -7,6 +7,6 @@ RWTexture2D Output; [numthreads(16, 16, 1)] void main( uint3 DTid : SV_DispatchThreadID ) { - //Output[DTid.xy] = Diffuse[DTid.xy] + Specular[DTid.xy] + Diffuse[DTid.xy] * Ambient[DTid.xy/4].w;// + float4(Ambient[DTid.xy/4].xyz,1); GLOW - Output[DTid.xy] = Diffuse[DTid.xy]; + Output[DTid.xy] = Diffuse[DTid.xy] + Specular[DTid.xy] + Diffuse[DTid.xy] * Ambient[DTid.xy/4].w;// + float4(Ambient[DTid.xy/4].xyz,1); GLOW + //Output[DTid.xy] = Diffuse[DTid.xy]; } \ No newline at end of file diff --git a/Code/WindowManager/WindowShell.h b/Code/WindowManager/WindowShell.h index d4004be2..86726ccf 100644 --- a/Code/WindowManager/WindowShell.h +++ b/Code/WindowManager/WindowShell.h @@ -32,7 +32,7 @@ public: { parent = 0; hInstance = NULL; - windowName = L"おはよう"; + windowName = L"Window"; windowSize.x = 800; windowSize.y = 600; windowPosition.x = 0;