chore/fix: clean up NetworkSocketLayer, fix console compile errors

This commit is contained in:
2026-09-13 14:10:24 +01:00
parent 0405a47bd1
commit a2dad85bb1
16 changed files with 781 additions and 296 deletions
@@ -4,6 +4,7 @@
#include "NetworkSocketLayer.h"
#include "..\..\Common\Network\PlatformNetworkManager.h"
#include "..\..\..\Minecraft.World\Socket.h"
#include "SocketManagers\NetworkSocketManager.h"
#if defined(MINECRAFT_SERVER_BUILD)
#include "..\..\..\Minecraft.Server\Access\Access.h"
#include "..\..\..\Minecraft.Server\ServerLogManager.h"
@@ -13,6 +14,7 @@
static bool TryGetNumericRemoteIp(const sockaddr_in &remoteAddress, std::string *outIp);
#endif
NetworkSocketManager *NetworkSocketLayer::s_pPlatformSocketManager;
SOCKET NetworkSocketLayer::s_listenSocket = INVALID_SOCKET;
SOCKET NetworkSocketLayer::s_hostConnectionSocket = INVALID_SOCKET;
SOCKET NetworkSocketLayer::s_advertiseSock = INVALID_SOCKET;
@@ -90,6 +92,8 @@ bool NetworkSocketLayer::Initialize()
{
if (s_initialized) return true;
s_pPlatformSocketManager = new NetworkSocketManager();
// Create the locks before touching the platform network stack.
if (!s_locksCreated)
{
@@ -111,42 +115,7 @@ bool NetworkSocketLayer::Initialize()
s_locksCreated = true;
}
#if defined _WINDOWS64 || defined _XBOX
WSADATA wsaData;
int result = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (result != 0)
{
app.DebugPrintf("WSAStartup failed: %d\n", result);
return false;
}
#elif defined __PS3__
int result = sys_net_initialize_network();
if (result != 0) {
app.DebugPrintf("sys_net_initialize_network failed: %d\n", result);
return false;
}
result = cellNetCtlInit();
if (result < 0) {
app.DebugPrintf("cellNetCtlInit failed: %d\n", result);
sys_net_finalize_network();
return false;
}
#elif defined __PSVITA__
SceNetInitParam param;
static char memory[16 * 1024];
param.memory = memory;
param.size = sizeof(memory);
param.flags = 0;
int result = sceNetInit(&param);
// libnet is brought up before us by the platform layer, which reports EBUSY here.
if (result < 0 && result != SCE_NET_ERROR_EBUSY) {
app.DebugPrintf("sceNetInit failed: 0x%08x\n", result);
return false;
}
#endif
s_pPlatformSocketManager->InitNetwork();
s_initialized = true;
@@ -166,44 +135,26 @@ void NetworkSocketLayer::Shutdown()
s_active = false;
s_connected = false;
#if defined _WINDOWS64 || defined _XBOX
if (s_listenSocket != INVALID_SOCKET)
if (s_pPlatformSocketManager->IsSocketValid(s_listenSocket))
{
closesocket(s_listenSocket);
s_pPlatformSocketManager->CloseSocket(s_listenSocket);
s_listenSocket = INVALID_SOCKET;
}
if (s_hostConnectionSocket != INVALID_SOCKET)
if (s_pPlatformSocketManager->IsSocketValid(s_hostConnectionSocket))
{
closesocket(s_hostConnectionSocket);
s_pPlatformSocketManager->CloseSocket(s_hostConnectionSocket);
s_hostConnectionSocket = INVALID_SOCKET;
}
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
if (s_listenSocket >= 0)
{
socketclose(s_listenSocket);
s_listenSocket = -1;
}
if (s_hostConnectionSocket >= 0)
{
socketclose(s_hostConnectionSocket);
s_hostConnectionSocket = -1;
}
#endif
EnterCriticalSection(&s_connectionsLock);
for (int i = 0; i < NETWORK_LAN_MAX_CLIENTS + 1; i++)
{
s_connections[i].active = false;
#if defined _WINDOWS64 || defined _XBOX
if (s_connections[i].tcpSocket != INVALID_SOCKET)
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
if (s_connections[i].tcpSocket >= 0)
#endif
if (s_pPlatformSocketManager->IsSocketValid(s_connections[i].tcpSocket))
{
closesocket(s_connections[i].tcpSocket);
s_pPlatformSocketManager->CloseSocket(s_connections[i].tcpSocket);
s_connections[i].tcpSocket = INVALID_SOCKET;
}
if (s_connections[i].recvThread != NULL)
@@ -256,9 +207,9 @@ bool NetworkSocketLayer::HostGame(int port)
s_connected = false;
s_active = false;
if (s_hostConnectionSocket != INVALID_SOCKET)
if (s_pPlatformSocketManager->IsSocketValid(s_hostConnectionSocket))
{
closesocket(s_hostConnectionSocket);
s_pPlatformSocketManager->CloseSocket(s_hostConnectionSocket);
s_hostConnectionSocket = INVALID_SOCKET;
}
s_nextSmallId = 1;
@@ -268,129 +219,10 @@ bool NetworkSocketLayer::HostGame(int port)
s_freeSmallIds.clear();
LeaveCriticalSection(&s_freeSmallIdLock);
int iResult;
#if defined _WINDOWS64
struct addrinfo hints = {};
struct addrinfo *result = NULL;
s_listenSocket = s_pPlatformSocketManager->MakeHostSocket(port);
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;
hints.ai_flags = AI_PASSIVE;
char portStr[16];
sprintf_s(portStr, "%d", port);
iResult = getaddrinfo(NULL, portStr, &hints, &result);
if (iResult != 0)
{
app.DebugPrintf("getaddrinfo failed: %d\n", iResult);
return false;
}
s_listenSocket = socket(result->ai_family, result->ai_socktype, result->ai_protocol);
if (s_listenSocket == INVALID_SOCKET)
{
app.DebugPrintf("socket() failed: %d\n", WSAGetLastError());
freeaddrinfo(result);
return false;
}
#elif defined _XBOX
struct sockaddr_in addr = {};
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr.sin_port = htons((WORD)port);
s_listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (s_listenSocket == INVALID_SOCKET)
{
app.DebugPrintf("socket() failed: %d\n", WSAGetLastError());
return false;
}
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
#ifdef __PSVITA__
SceNetSockaddrIn addr = {};
#else
struct sockaddr_in addr = {};
#endif
#ifdef __PSVITA__
addr.sin_len = sizeof(addr);
#endif
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr.sin_port = htons((uint16_t)port);
s_listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (s_listenSocket < 0)
{
app.DebugPrintf("socket() failed: %d\n", s_listenSocket);
return false;
}
#endif
int opt = 1;
setsockopt(s_listenSocket, SOL_SOCKET, SO_REUSEADDR, (const char *)&opt, sizeof(opt));
#if defined _WINDOWS64
iResult = ::bind(s_listenSocket, result->ai_addr, (int)result->ai_addrlen);
freeaddrinfo(result);
if (iResult == SOCKET_ERROR)
{
app.DebugPrintf("bind() failed: %d\n", WSAGetLastError());
closesocket(s_listenSocket);
s_listenSocket = INVALID_SOCKET;
return false;
}
iResult = listen(s_listenSocket, SOMAXCONN);
if (iResult == SOCKET_ERROR)
{
app.DebugPrintf("listen() failed: %d\n", WSAGetLastError());
closesocket(s_listenSocket);
s_listenSocket = INVALID_SOCKET;
return false;
}
#elif defined _XBOX
iResult = ::bind(s_listenSocket, (struct sockaddr*)&addr, sizeof(addr));
if (iResult == SOCKET_ERROR)
{
app.DebugPrintf("bind() failed: %d\n", WSAGetLastError());
closesocket(s_listenSocket);
s_listenSocket = INVALID_SOCKET;
return false;
}
iResult = listen(s_listenSocket, SOMAXCONN);
if (iResult == SOCKET_ERROR)
{
app.DebugPrintf("listen() failed: %d\n", WSAGetLastError());
closesocket(s_listenSocket);
s_listenSocket = INVALID_SOCKET;
return false;
}
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
#ifdef __PSVITA__
iResult = ::bind(s_listenSocket, (const sockaddr*)&addr, sizeof(addr));
#else
iResult = ::bind(s_listenSocket, (struct sockaddr*)&addr, sizeof(addr));
#endif
if (iResult < 0)
{
app.DebugPrintf("bind() failed: %d\n", iResult);
closesocket(s_listenSocket);
s_listenSocket = -1;
return false;
}
iResult = listen(s_listenSocket, 5);
if (iResult < 0)
{
app.DebugPrintf("listen() failed: %d\n", iResult);
closesocket(s_listenSocket);
s_listenSocket = -1;
return false;
}
#endif
s_active = true;
s_connected = true;
@@ -852,11 +684,7 @@ bool NetworkSocketLayer::SendOnSocket(SOCKET sock, const void *data, int dataSiz
while (totalSent < toSend)
{
int sent = send(sock, (const char *)header + totalSent, toSend - totalSent, 0);
#if defined _WINDOWS64 || defined _XBOX
if (sent == SOCKET_ERROR || sent == 0)
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
if (sent < 0 || sent == 0)
#endif
if (!s_pPlatformSocketManager->IsSentValid(sent) || sent == 0)
return false;
totalSent += sent;
}
@@ -866,11 +694,7 @@ bool NetworkSocketLayer::SendOnSocket(SOCKET sock, const void *data, int dataSiz
{
int sent = send(sock, (const char *)data + totalSent, dataSize - totalSent, 0);
#if defined _WINDOWS64 || defined _XBOX
if (sent == SOCKET_ERROR || sent == 0)
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
if (sent < 0 || sent == 0)
#endif
if (!s_pPlatformSocketManager->IsSentValid(sent) || sent == 0)
return false;
totalSent += sent;
}
@@ -918,11 +742,7 @@ SOCKET NetworkSocketLayer::GetSocketForSmallId(BYTE smallId)
return sock;
}
LeaveCriticalSection(&s_connectionsLock);
#if defined _WINDOWS64 || defined _XBOX
return INVALID_SOCKET;
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
return -1;
#endif
}
// Send reject handshake: sentinel 0xFF + DisconnectPacket wire format (1 byte id 255 + 4 byte big-endian reason). Then caller closes socket.
@@ -977,14 +797,6 @@ void NetworkSocketLayer::HandleDataReceived(BYTE fromSmallId, BYTE toSmallId, un
INetworkPlayer *pPlayerFrom = g_NetworkManager.GetPlayerBySmallId(fromSmallId);
INetworkPlayer *pPlayerTo = g_NetworkManager.GetPlayerBySmallId(toSmallId);
if (pPlayerFrom == NULL || pPlayerTo == NULL)
{
// dropping here is silent and looks identical to the peer never sending
app.DebugPrintf("LAN: DROPPED %u bytes - from smallId=%d(%s) to smallId=%d(%s)\n",
dataSize, fromSmallId, pPlayerFrom ? "ok" : "NULL", toSmallId, pPlayerTo ? "ok" : "NULL");
return;
}
if (s_isHost)
{
::Socket *pSocket = pPlayerFrom->GetSocket();
@@ -1011,24 +823,19 @@ int NetworkSocketLayer::AcceptThreadProc(LPVOID param)
#else
sockaddr_in remoteAddress;
ZeroMemory(&remoteAddress, sizeof(remoteAddress));
#ifdef __PS3__
socklen_t remoteAddressLength = sizeof(remoteAddress);
#else
int remoteAddressLength = sizeof(remoteAddress);
#endif
SOCKET clientSocket = accept(s_listenSocket, (sockaddr*)&remoteAddress, &remoteAddressLength);
#endif
#if defined _WINDOWS64 || defined _XBOX
if (clientSocket == INVALID_SOCKET)
if (!s_pPlatformSocketManager->IsSocketValid(clientSocket))
{
if (s_active)
app.DebugPrintf("accept() failed: %d\n", WSAGetLastError());
app.DebugPrintf("accept() failed: %d\n",s_pPlatformSocketManager->getSocketError(clientSocket));
break;
}
#elif __PS3__ || defined __ORBIS__ || defined __PSVITA__
if (clientSocket < 0)
{
if (s_active)
app.DebugPrintf("accept() failed: %d\n", clientSocket);
break;
}
#endif
int noDelay = 1;
setsockopt(clientSocket, IPPROTO_TCP, TCP_NODELAY, (const char *)&noDelay, sizeof(noDelay));
@@ -1055,7 +862,7 @@ int NetworkSocketLayer::AcceptThreadProc(LPVOID param)
#else
app.DebugPrintf("Win64 LAN: Rejecting connection, game not ready\n");
#endif
closesocket(clientSocket);
s_pPlatformSocketManager->CloseSocket(clientSocket);
continue;
}
@@ -1078,7 +885,7 @@ int NetworkSocketLayer::AcceptThreadProc(LPVOID param)
#else
app.DebugPrintf("Win64 LAN: Server full, rejecting connection\n");
#endif
closesocket(clientSocket);
s_pPlatformSocketManager->CloseSocket(clientSocket);
continue;
}
LeaveCriticalSection(&s_freeSmallIdLock);
@@ -1088,7 +895,7 @@ int NetworkSocketLayer::AcceptThreadProc(LPVOID param)
if (sent != 1)
{
app.DebugPrintf("Failed to send small ID to client\n");
closesocket(clientSocket);
s_pPlatformSocketManager->CloseSocket(clientSocket);
continue;
}
@@ -1193,7 +1000,7 @@ int NetworkSocketLayer::RecvThreadProc(LPVOID param)
s_connections[clientSmallId].active = false;
if (s_connections[clientSmallId].tcpSocket != INVALID_SOCKET)
{
closesocket(s_connections[clientSmallId].tcpSocket);
s_pPlatformSocketManager->CloseSocket(s_connections[clientSmallId].tcpSocket);
s_connections[clientSmallId].tcpSocket = INVALID_SOCKET;
}
LeaveCriticalSection(&s_connectionsLock);
@@ -1237,7 +1044,7 @@ void NetworkSocketLayer::CloseConnectionBySmallId(BYTE smallId)
EnterCriticalSection(&s_connectionsLock);
if (smallId < NETWORK_LAN_MAX_CLIENTS + 1 && s_connections[smallId].active && s_connections[smallId].tcpSocket != INVALID_SOCKET)
{
closesocket(s_connections[smallId].tcpSocket);
s_pPlatformSocketManager->CloseSocket(s_connections[smallId].tcpSocket);
s_connections[smallId].tcpSocket = INVALID_SOCKET;
app.DebugPrintf("Win64 LAN: Force-closed TCP connection for smallId=%d\n", smallId);
}
@@ -1249,11 +1056,7 @@ int NetworkSocketLayer::ClientRecvThreadProc(LPVOID param)
std::vector<BYTE> recvBuf;
recvBuf.resize(NETWORK_LAN_RECV_BUFFER_SIZE);
#if defined _WINDOWS64 || defined _XBOX
while (s_active && s_hostConnectionSocket != INVALID_SOCKET)
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
while (s_active && s_hostConnectionSocket >= 0)
#endif
while (s_active && s_pPlatformSocketManager->IsSocketValid(s_hostConnectionSocket))
{
BYTE header[4];
if (!RecvExact(s_hostConnectionSocket, header, 4))
@@ -1317,19 +1120,11 @@ bool NetworkSocketLayer::StartAdvertising(int gamePort, const wchar_t *hostName,
LeaveCriticalSection(&s_advertiseLock);
s_advertiseSock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
#if defined _WINDOWS64 || defined _XBOX
if (s_advertiseSock == INVALID_SOCKET)
if (!s_pPlatformSocketManager->IsSocketValid(s_advertiseSock))
{
app.DebugPrintf("Win64 LAN: Failed to create advertise socket: %d\n", WSAGetLastError());
app.DebugPrintf("LAN: Failed to create advertise socket: %d\n", s_pPlatformSocketManager->getSocketError(s_advertiseSock));
return false;
}
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
if (s_advertiseSock < 0)
{
app.DebugPrintf("PS3 LAN: Failed to create advertise socket: %d\n", s_advertiseSock);
return false;
}
#endif
BOOL broadcast = TRUE;
setsockopt(s_advertiseSock, SOL_SOCKET, SO_BROADCAST, (const char *)&broadcast, sizeof(broadcast));
@@ -1337,7 +1132,7 @@ bool NetworkSocketLayer::StartAdvertising(int gamePort, const wchar_t *hostName,
s_advertising = true;
s_advertiseThread = new C4JThread(AdvertiseThreadProc, NULL, "AdvertiseThreadProc");
s_advertiseThread->Run();
app.DebugPrintf("Win64 LAN: Started advertising on UDP port %d\n", NETWORK_LAN_DISCOVERY_PORT);
app.DebugPrintf("LAN: Started advertising on UDP port %d\n", NETWORK_LAN_DISCOVERY_PORT);
return true;
}
@@ -1345,19 +1140,11 @@ void NetworkSocketLayer::StopAdvertising()
{
s_advertising = false;
#if defined _WINDOWS64
if (s_advertiseSock != INVALID_SOCKET)
if (s_pPlatformSocketManager->IsSocketValid(s_advertiseSock))
{
closesocket(s_advertiseSock);
s_pPlatformSocketManager->CloseSocket(s_advertiseSock);
s_advertiseSock = INVALID_SOCKET;
}
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
if (s_advertiseSock >= 0)
{
closesocket(s_advertiseSock);
s_advertiseSock = -1;
}
#endif
if (s_advertiseThread != NULL)
{
@@ -1461,17 +1248,10 @@ int NetworkSocketLayer::AdvertiseThreadProc(LPVOID param)
(struct sockaddr *)&broadcastAddr, sizeof(broadcastAddr));
#endif
#if defined _WINDOWS64 || defined _XBOX
if (sent == SOCKET_ERROR && s_advertising)
if (!s_pPlatformSocketManager->IsSentValid(sent) && s_advertising)
{
app.DebugPrintf("Win64 LAN: Broadcast sendto failed: %d\n", WSAGetLastError());
app.DebugPrintf("LAN: Broadcast sendto failed: %d\n", s_pPlatformSocketManager->getSocketError(s_advertising));
}
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
if (sent < 0 && s_advertising)
{
app.DebugPrintf("PS3 LAN: Broadcast sendto failed: %d\n", sent);
}
#endif
C4JThread::Sleep(1000);
}
@@ -1485,21 +1265,11 @@ bool NetworkSocketLayer::StartDiscovery()
if (!s_initialized) return false;
s_discoverySock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
#if defined _WINDOWS64 || defined _XBOX
if (s_discoverySock == INVALID_SOCKET)
if (!s_pPlatformSocketManager->IsSocketValid(s_discoverySock))
{
app.DebugPrintf("Win64 LAN: Failed to create discovery socket: %d\n", WSAGetLastError());
app.DebugPrintf("LAN: Failed to create discovery socket: %d\n", s_pPlatformSocketManager->getSocketError(s_discoverySock));
return false;
}
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
app.DebugPrintf("Discovery socket: %d\n", s_discoverySock);
if (s_discoverySock < 0)
{
app.DebugPrintf("PS3 LAN: Failed to create discovery socket: %d\n", s_discoverySock);
terminate_networking();
return false;
}
#endif
BOOL reuseAddr = TRUE;
setsockopt(s_discoverySock, SOL_SOCKET, SO_REUSEADDR, (const char *)&reuseAddr, sizeof(reuseAddr));
@@ -1522,7 +1292,7 @@ bool NetworkSocketLayer::StartDiscovery()
if (::bind(s_discoverySock, (struct sockaddr *)&bindAddr, sizeof(bindAddr)) == SOCKET_ERROR)
{
app.DebugPrintf("Win64 LAN: Discovery bind failed: %d\n", WSAGetLastError());
closesocket(s_discoverySock);
s_pPlatformSocketManager->CloseSocket(s_discoverySock);
s_discoverySock = INVALID_SOCKET;
return false;
}
@@ -1566,19 +1336,11 @@ void NetworkSocketLayer::StopDiscovery()
{
s_discovering = false;
#if defined _WINDOWS64 || defined _XBOX
if (s_discoverySock != INVALID_SOCKET)
if (s_pPlatformSocketManager->IsSocketValid(s_discoverySock))
{
closesocket(s_discoverySock);
s_pPlatformSocketManager->CloseSocket(s_discoverySock);
s_discoverySock = INVALID_SOCKET;
}
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
if (s_discoverySock >= 0)
{
socketclose(s_discoverySock);
s_discoverySock = -1;
}
#endif
if (s_discoveryThread != NULL)
{
@@ -1629,17 +1391,10 @@ int NetworkSocketLayer::DiscoveryThreadProc(LPVOID param)
(struct sockaddr *)&senderAddr, &senderLen);
#endif
#ifdef _WINDOWS64
if (recvLen == SOCKET_ERROR)
if (!s_pPlatformSocketManager->IsSentValid(recvLen))
{
continue;
}
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
if (recvLen < 0)
{
continue;
}
#endif
if (recvLen < (int)sizeof(LANBroadcast))
continue;
@@ -194,6 +194,7 @@ private:
static int AdvertiseThreadProc(void* param);
static int DiscoveryThreadProc(void* param);
static NetworkSocketManager *s_pPlatformSocketManager;
static SOCKET s_listenSocket;
static SOCKET s_hostConnectionSocket;
static C4JThread* s_acceptThread;
@@ -235,7 +235,7 @@ void CPlatformNetworkManagerStub::DoWork()
while (NetworkSocketLayer::PopDisconnectedSmallId(&disconnectedSmallId))
{
IQNetPlayer* qnetPlayer = m_pIQNet->GetPlayerBySmallId(disconnectedSmallId);
if (qnetPlayer != nullptr && qnetPlayer->m_smallId == disconnectedSmallId)
if (qnetPlayer != NULL && qnetPlayer->m_smallId == disconnectedSmallId)
{
NotifyPlayerLeaving(qnetPlayer);
qnetPlayer->m_smallId = 0;
@@ -278,7 +278,11 @@ void CPlatformNetworkManagerStub::DoWork()
if (!m_bLeaveGameOnTick)
{
m_bLeaveGameOnTick = true;
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
g_NetworkManager.HandleDisconnect(false, false);
#else
g_NetworkManager.HandleDisconnect(false);
#endif
}
}
else
@@ -0,0 +1,93 @@
#include "stdafx.h"
#include "NetworkSocketManager.h"
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/time.h>
#include <sys/select.h>
#include <netex/net.h>
#include <netex/errno.h>
// PIEBOT: Adding this because Sony systems uses BSD apis
// which uses socketclose instead of closesocket.
int NetworkSocketManager::CloseSocket(SOCKET sock)
{
return socketclose(sock);
}
int NetworkSocketManager::getSocketError(SOCKET socket)
{
return socket;
}
bool NetworkSocketManager::IsSocketValid(SOCKET sock)
{
return sock >= 0;
}
bool NetworkSocketManager::IsSentValid(int sent)
{
return sent >= 0;
}
bool NetworkSocketManager::InitNetwork()
{
int result = sys_net_initialize_network();
if (result != 0) {
app.DebugPrintf("sys_net_initialize_network failed: %d\n", result);
return false;
}
result = cellNetCtlInit();
if (result < 0) {
app.DebugPrintf("cellNetCtlInit failed: %d\n", result);
sys_net_finalize_network();
return false;
}
}
SOCKET NetworkSocketManager::MakeHostSocket(int port)
{
SOCKET s_listenSocket;
struct sockaddr_in addr = {};
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr.sin_port = htons((uint16_t)port);
s_listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (s_listenSocket < 0)
{
app.DebugPrintf("socket() failed: %d\n", s_listenSocket);
return INVALID_SOCKET;
}
// PIEBOT: time for part 2, binding and listening.
int opt = 1;
setsockopt(s_listenSocket, SOL_SOCKET, SO_REUSEADDR, (const char *)&opt, sizeof(opt));
int iResult = ::bind(s_listenSocket, (struct sockaddr*)&addr, sizeof(addr));
if (iResult < 0)
{
app.DebugPrintf("bind() failed: %d\n", iResult);
CloseSocket(s_listenSocket);
return INVALID_SOCKET;
}
iResult = listen(s_listenSocket, 5);
if (iResult < 0)
{
app.DebugPrintf("listen() failed: %d\n", iResult);
CloseSocket(s_listenSocket);
return INVALID_SOCKET;
}
return s_listenSocket;
}
@@ -0,0 +1,86 @@
#include "stdafx.h"
#include "NetworkSocketManager.h"
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/time.h>
#include <sys/select.h>
// PIEBOT: Adding this because Sony systems uses BSD apis
// which uses socketclose instead of closesocket.
int NetworkSocketManager::CloseSocket(SOCKET sock)
{
return socketclose(sock);
}
int NetworkSocketManager::getSocketError(SOCKET socket)
{
return socket;
}
bool NetworkSocketManager::IsSocketValid(SOCKET sock)
{
return sock >= 0;
}
bool NetworkSocketManager::IsSentValid(int sent)
{
return sent >= 0;
}
bool NetworkSocketManager::InitNetwork()
{
WSADATA wsaData;
int result = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (result != 0)
{
app.DebugPrintf("WSAStartup failed: %d\n", result);
return false;
}
}
SOCKET NetworkSocketManager::MakeHostSocket(int port)
{
SOCKET s_listenSocket = NULL;
struct sockaddr_in addr = {};
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr.sin_port = htons((uint16_t)port);
s_listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (s_listenSocket < 0)
{
app.DebugPrintf("socket() failed: %d\n", s_listenSocket);
return NULL;
}
// PIEBOT: time for part 2, binding and listening.
int opt = 1;
setsockopt(s_listenSocket, SOL_SOCKET, SO_REUSEADDR, (const char *)&opt, sizeof(opt));
int iResult = ::bind(s_listenSocket, (struct sockaddr*)&addr, sizeof(addr));
if (iResult < 0)
{
app.DebugPrintf("bind() failed: %d\n", iResult);
closesocket(s_listenSocket);
return INVALID_SOCKET;
}
iResult = listen(s_listenSocket, 5);
if (iResult < 0)
{
app.DebugPrintf("listen() failed: %d\n", iResult);
closesocket(s_listenSocket);
return INVALID_SOCKET;
}
return s_listenSocket;
}
@@ -0,0 +1,85 @@
#include "stdafx.h"
#include "NetworkSocketManager.h"
#include <net.h>
// PIEBOT: Adding this because Sony systems uses BSD apis
// which uses socketclose instead of closesocket.
int NetworkSocketManager::CloseSocket(SOCKET sock)
{
return socketclose(sock);
}
int NetworkSocketManager::getSocketError(SOCKET socket)
{
return socket;
}
bool NetworkSocketManager::IsSocketValid(SOCKET sock)
{
return sock >= 0;
}
bool NetworkSocketManager::IsSentValid(int sent)
{
return sent >= 0;
}
bool NetworkSocketManager::InitNetwork()
{
SceNetInitParam param;
static char memory[16 * 1024];
param.memory = memory;
param.size = sizeof(memory);
param.flags = 0;
int result = sceNetInit(&param);
// libnet is brought up before us by the platform layer, which reports EBUSY here.
if (result < 0 && result != SCE_NET_ERROR_EBUSY) {
app.DebugPrintf("sceNetInit failed: 0x%08x\n", result);
return false;
}
}
SOCKET NetworkSocketManager::MakeHostSocket(int port)
{
SOCKET s_listenSocket = NULL;
SceNetSockaddrIn addr = {};
addr.sin_len = sizeof(addr);
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr.sin_port = htons((uint16_t)port);
s_listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (s_listenSocket < 0)
{
app.DebugPrintf("socket() failed: %d\n", s_listenSocket);
return INVALID_SOCKET;
}
// PIEBOT: time for part 2, binding and listening.
int opt = 1;
setsockopt(s_listenSocket, SOL_SOCKET, SO_REUSEADDR, (const char *)&opt, sizeof(opt));
int iResult = ::bind(s_listenSocket, (const sockaddr*)&addr, sizeof(addr));
if (iResult < 0)
{
app.DebugPrintf("bind() failed: %d\n", iResult);
closesocket(s_listenSocket);
return INVALID_SOCKET;
}
iResult = listen(s_listenSocket, 5);
if (iResult < 0)
{
app.DebugPrintf("listen() failed: %d\n", iResult);
closesocket(s_listenSocket);
return INVALID_SOCKET;
}
return s_listenSocket;
}
@@ -0,0 +1,92 @@
#include "stdafx.h"
#include "NetworkSocketManager.h"
#include <WinSock2.h>
#include <WS2tcpip.h>
// PIEBOT: Adding this because Sony systems uses BSD apis
// which uses socketclose instead of closesocket.
int NetworkSocketManager::CloseSocket(SOCKET sock)
{
return closesocket(sock);
}
int NetworkSocketManager::getSocketError(SOCKET socket)
{
return WSAGetLastError();
}
bool NetworkSocketManager::IsSocketValid(SOCKET sock)
{
return sock != INVALID_SOCKET;
}
bool NetworkSocketManager::IsSentValid(int sent)
{
return sent != SOCKET_ERROR;
}
bool NetworkSocketManager::InitNetwork()
{
WSADATA wsaData;
int result = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (result != 0)
{
app.DebugPrintf("WSAStartup failed: %d\n", result);
return false;
}
}
SOCKET NetworkSocketManager::MakeHostSocket(int port)
{
SOCKET s_listenSocket = NULL;
struct addrinfo hints = {};
struct addrinfo *result = NULL;
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;
hints.ai_flags = AI_PASSIVE;
char portStr[16];
sprintf_s(portStr, "%d", port);
int iResult = getaddrinfo(NULL, portStr, &hints, &result);
if (iResult != 0)
{
app.DebugPrintf("getaddrinfo failed: %d\n", iResult);
return INVALID_SOCKET;
}
s_listenSocket = socket(result->ai_family, result->ai_socktype, result->ai_protocol);
if (s_listenSocket == INVALID_SOCKET)
{
app.DebugPrintf("socket() failed: %d\n", WSAGetLastError());
freeaddrinfo(result);
return INVALID_SOCKET;
}
// PIEBOT: time for part 2, binding and listening.
int opt = 1;
setsockopt(s_listenSocket, SOL_SOCKET, SO_REUSEADDR, (const char *)&opt, sizeof(opt));
iResult = ::bind(s_listenSocket, result->ai_addr, (int)result->ai_addrlen);
freeaddrinfo(result);
if (iResult == SOCKET_ERROR)
{
app.DebugPrintf("bind() failed: %d\n", WSAGetLastError());
closesocket(s_listenSocket);
return INVALID_SOCKET;
}
iResult = listen(s_listenSocket, SOMAXCONN);
if (iResult == SOCKET_ERROR)
{
app.DebugPrintf("listen() failed: %d\n", WSAGetLastError());
closesocket(s_listenSocket);
return INVALID_SOCKET;
}
return s_listenSocket;
}
@@ -0,0 +1,78 @@
#include "stdafx.h"
#include "NetworkSocketManager.h"
#include <stdint.h>
#include <winsockx.h>
#include <xtl.h>
// PIEBOT: Adding this because Sony systems uses BSD apis
// which uses socketclose instead of closesocket.
int NetworkSocketManager::CloseSocket(SOCKET sock)
{
return closesocket(sock);
}
int NetworkSocketManager::getSocketError(SOCKET socket)
{
return WSAGetLastError();
}
bool NetworkSocketManager::IsSocketValid(SOCKET sock)
{
return sock != INVALID_SOCKET;
}
bool NetworkSocketManager::IsSentValid(int sent)
{
return sent != SOCKET_ERROR;
}
bool NetworkSocketManager::InitNetwork()
{
WSADATA wsaData;
int result = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (result != 0)
{
app.DebugPrintf("WSAStartup failed: %d\n", result);
return false;
}
}
SOCKET NetworkSocketManager::MakeListenSocket(int port)
{
SOCKET s_listenSocket = NULL;
struct sockaddr_in addr = {};
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr.sin_port = htons((WORD)port);
s_listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (s_listenSocket == INVALID_SOCKET)
{
app.DebugPrintf("socket() failed: %d\n", WSAGetLastError());
return INVALID_SOCKET;
}
// PIEBOT: time for part 2, binding and listening.
int opt = 1;
setsockopt(s_listenSocket, SOL_SOCKET, SO_REUSEADDR, (const char *)&opt, sizeof(opt));
iResult = ::bind(s_listenSocket, (struct sockaddr*)&addr, sizeof(addr));
if (iResult == SOCKET_ERROR)
{
app.DebugPrintf("bind() failed: %d\n", WSAGetLastError());
closesocket(s_listenSocket);
return INVALID_SOCKET;
}
iResult = listen(s_listenSocket, SOMAXCONN);
if (iResult == SOCKET_ERROR)
{
app.DebugPrintf("listen() failed: %d\n", WSAGetLastError());
closesocket(s_listenSocket);
return INVALID_SOCKET;
}
return s_listenSocket;
}
@@ -0,0 +1,23 @@
#pragma once
#include "stdafx.h"
#ifdef _WINDOWS64
#include <WinSock2.h>
#elif defined _XBOX
#include <winsockx.h>
#else
typedef int SOCKET;
#define INVALID_SOCKET -1
#endif
class NetworkSocketManager {
public:
bool IsSocketValid(SOCKET sock);
bool IsSentValid(int sent);
int getSocketError(SOCKET sock);
int CloseSocket(SOCKET sock);
int TCPaddrinfo(PCSTR ip, int port);
bool InitNetwork();
SOCKET MakeHostSocket(int port);
};
+1 -2
View File
@@ -32,7 +32,7 @@
#include "Xbox\Sentient\SentientManager.h"
#include "StatsCounter.h"
#include "Xbox\Social\SocialManager.h"
#include "Xbox\Sentient\DynamicConfigurations.h"x
#include "Xbox\Sentient\DynamicConfigurations.h"
#include "Common\Network\IQNet.h"
#else
#include "Orbis\Sentient\SentientManager.h"
@@ -47,7 +47,6 @@
#endif
#ifndef _DISABLE_XBLIVE
#if !defined(__PS3__) && !defined(__ORBIS__) && !defined(__PSVITA__)
#ifdef _WINDOWS64
wchar_t fakeGamerTagW[32] = L"PlayerName";
#endif
+1 -1
View File
@@ -561,7 +561,7 @@ void LivingEntityRenderer::renderNameTag(shared_ptr<LivingEntity> mob, const wst
playerName=name;
break;
case Player::ePlayerNameValid_False:
memset(wchName,0,sizeof(wchName)d);
memset(wchName,0,sizeof(wchName));
swprintf(wchName, 2, L"%d",player->getPlayerIndex()+1);
playerName=wchName;
break;
+239 -2
View File
@@ -261,6 +261,7 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<ExceptionsAndRtti>WithExceptsWithRtti</ExceptionsAndRtti>
<NoTocRestore>NoTocRestore2</NoTocRestore>
<PlatformToolset>SNC</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@@ -4069,6 +4070,39 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Durango'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="Common\Network\SessionInfo.h" />
<ClInclude Include="Common\Network\SocketManagers\CPlatformSocketManagerWindows64.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="Common\Network\SocketManagers\NetworkSocketManager.h" />
<ClInclude Include="Common\Network\Sony\NetworkPlayerSony.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -4116,6 +4150,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Server|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="Common\Network\Sony\SonyCommerce.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
@@ -21620,6 +21655,170 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Durango'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Common\Network\SocketManagers\CPlatformSocketManagerPS3.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PS3'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PS3'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Server|PS3'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Common\Network\SocketManagers\CPlatformSocketManagerPS4.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Common\Network\SocketManagers\CPlatformSocketManagerPSVita.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Common\Network\SocketManagers\CPlatformSocketManagerWindows64.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Common\Network\SocketManagers\CPlatformSocketManagerXbox.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Common\Network\SocketManagers\NetworkSocketManager.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Common\Network\Sony\NetworkPlayerSony.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -21667,6 +21866,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Server|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Common\Network\Sony\SonyHttp.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
@@ -28719,7 +28919,44 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Server|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="PSVita\OldSdk.cpp" />
<ClCompile Include="PSVita\PSVitaExtras\OldSdk.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Server|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="PSVita\PSVitaExtras\CustomMap.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Durango'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Durango'">true</ExcludedFromBuild>
@@ -29909,7 +30146,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|ORBIS'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|ORBIS'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PS3'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PS3'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">false</ExcludedFromBuild>
@@ -732,6 +732,9 @@
<Filter Include="Windows64\Windows64Extras">
<UniqueIdentifier>{7a457cb8-28b7-4bbc-8209-e2ed3adeb8fd}</UniqueIdentifier>
</Filter>
<Filter Include="Common\Source Files\Network\SocketManager">
<UniqueIdentifier>{3977f528-165f-4612-8fe6-bfb3f9a6983d}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="ReadMe.txt" />
@@ -3808,6 +3811,12 @@
<ClInclude Include="Windows64\Windows64Extras\Windows64Stubs.h">
<Filter>Windows64\Windows64Extras</Filter>
</ClInclude>
<ClInclude Include="PSVita\OldSdk.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Common\Network\SocketManagers\NetworkSocketManager.h">
<Filter>Common\Source Files\Network\SocketManager</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
@@ -5958,6 +5967,21 @@
<ClCompile Include="Windows64\Windows64Extras\Windows64Stubs.cpp">
<Filter>Windows64\Windows64Extras</Filter>
</ClCompile>
<ClCompile Include="Common\Network\SocketManagers\CPlatformSocketManagerXbox.cpp">
<Filter>Common\Source Files\Network\SocketManager</Filter>
</ClCompile>
<ClCompile Include="Common\Network\SocketManagers\CPlatformSocketManagerPS3.cpp">
<Filter>Common\Source Files\Network\SocketManager</Filter>
</ClCompile>
<ClCompile Include="Common\Network\SocketManagers\CPlatformSocketManagerPS4.cpp">
<Filter>Common\Source Files\Network\SocketManager</Filter>
</ClCompile>
<ClCompile Include="Common\Network\SocketManagers\CPlatformSocketManagerPSVita.cpp">
<Filter>Common\Source Files\Network\SocketManager</Filter>
</ClCompile>
<ClCompile Include="Common\Network\SocketManagers\CPlatformSocketManagerWindows64.cpp">
<Filter>Common\Source Files\Network\SocketManager</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Library Include="Xbox\4JLibs\libs\4J_Render_d.lib">
+8
View File
@@ -88,6 +88,7 @@ bool MinecraftServer::s_slowQueuePacketSent = false;
unordered_map<wstring, int> MinecraftServer::ironTimers;
#ifdef MINECRAFT_SERVER_BUILD
static bool ShouldUseDedicatedServerProperties()
{
#if defined(MINECRAFT_SERVER_BUILD)
@@ -543,6 +544,7 @@ static bool ExecuteConsoleCommand(MinecraftServer *server, const wstring &rawCom
server->warn(L"Unknown command: " + command);
return false;
}
#endif
MinecraftServer::MinecraftServer()
{
@@ -616,10 +618,12 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData *initData, DW
logger.info("Loading properties");
#endif
settings = new Settings(new File(L"server.properties"));
#ifdef MINECRAFT_SERVER_BUILD
// Dedicated-only: spawn-protection radius in blocks; 0 disables protection.
m_spawnProtectionRadius = GetDedicatedServerInt(settings, L"spawn-protection", 0);
if (m_spawnProtectionRadius < 0) m_spawnProtectionRadius = 0;
if (m_spawnProtectionRadius > 256) m_spawnProtectionRadius = 256;
#endif
app.DebugPrintf("\n*** SERVER SETTINGS ***\n");
app.DebugPrintf("ServerSettings: host-friends-only is %s\n",(app.GetGameHostOption(eGameHostOption_FriendsOfFriends)>0)?"on":"off");
@@ -1647,9 +1651,13 @@ Level *MinecraftServer::getCommandSenderWorld()
int MinecraftServer::getSpawnProtectionRadius()
{
#ifdef MINECRAFT_SERVER_BUILD
// Client-host mode must never apply dedicated-server spawn protection settings.
if (!ShouldUseDedicatedServerProperties()) return 0;
return m_spawnProtectionRadius;
#else
return 16;
#endif
}
bool MinecraftServer::isUnderSpawnProtection(Level *level, int x, int y, int z, shared_ptr<Player> player)
+2 -2
View File
@@ -240,13 +240,13 @@ void PendingConnection::handleLogin(shared_ptr<LoginPacket> packet)
if (loginXuid == INVALID_XUID) loginXuid = packet->m_onlineXuid;
bool duplicateXuid = false;
if (loginXuid != INVALID_XUID && server->getPlayers()->getPlayer(loginXuid) != nullptr)
if (loginXuid != INVALID_XUID && server->getPlayers()->getPlayer(loginXuid) != NULL)
{
duplicateXuid = true;
}
else if (packet->m_onlineXuid != INVALID_XUID &&
packet->m_onlineXuid != loginXuid &&
server->getPlayers()->getPlayer(packet->m_onlineXuid) != nullptr)
server->getPlayers()->getPlayer(packet->m_onlineXuid) != NULL)
{
duplicateXuid = true;
}
+2 -2
View File
@@ -208,7 +208,7 @@
<CharacterSet>MultiByte</CharacterSet>
<ExceptionsAndRtti>WithExceptsWithRtti</ExceptionsAndRtti>
<NoTocRestore>NoTocRestore2</NoTocRestore>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>SNC</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|PSVita'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
@@ -263,7 +263,7 @@
<CharacterSet>MultiByte</CharacterSet>
<ExceptionsAndRtti>WithExceptsWithRtti</ExceptionsAndRtti>
<NoTocRestore>NoTocRestore2</NoTocRestore>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>SNC</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>