mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-12-03 06:29:05 +01:00
linux (compat): Add linux to most Win64 guards
This commit is contained in:
1 parent
8cf5675892
commit
9626065598
180 files changed
+941
-935
No files matched your search
@@ -19,7 +19,7 @@
|
||||
#include "../Minecraft.World/net.minecraft.network.packet.h"
|
||||
#include "../Minecraft.World/net.minecraft.network.h"
|
||||
#include "Windows64/Windows64_Xuid.h"
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
#include "Windows64/Network/PlatformNetworkManagerWindows.h"
|
||||
#endif
|
||||
#include "../Minecraft.World/Pos.h"
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "../Minecraft.World/EntityIO.h"
|
||||
#if defined(_XBOX)
|
||||
#include "Xbox/Network/NetworkPlayerXbox.h"
|
||||
#elif defined(_WINDOWS64)
|
||||
#elif defined(_WINDOWS64) || defined(__linux__)
|
||||
#include "Windows64/Network/NetworkPlayerWindows.h"
|
||||
#elif defined(__PS3__) || defined(__ORBIS__)
|
||||
#include "Common/Network/Sony/NetworkPlayerSony.h"
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include "../Minecraft.World/Recipes.h"
|
||||
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64) || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#include "../Minecraft.Server/Access/Access.h"
|
||||
#include "../Minecraft.Server/Common/StringUtils.h"
|
||||
#include "../Minecraft.Server/ServerLogger.h"
|
||||
@@ -150,7 +150,7 @@ bool PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer>
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
if (networkPlayer != nullptr)
|
||||
{
|
||||
NetworkPlayerWindows* windowsPlayer = dynamic_cast<NetworkPlayerWindows*>(networkPlayer);
|
||||
@@ -335,7 +335,7 @@ bool PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer>
|
||||
|
||||
// 4J-PB - removed, since it needs to be localised in the language the client is in
|
||||
//server->players->broadcastAll( shared_ptr<ChatPacket>( new ChatPacket(L"�e" + playerEntity->name + L" joined the game.") ) );
|
||||
#if !(defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD))
|
||||
#if !((defined(_WINDOWS64) || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD))
|
||||
broadcastAll(std::make_shared<ChatPacket>(player->name, ChatPacket::e_ChatPlayerJoinedGame));
|
||||
#endif
|
||||
|
||||
@@ -684,7 +684,7 @@ shared_ptr<ServerPlayer> PlayerList::getPlayerForLogin(PendingConnection *pendin
|
||||
player->gameMode->player = player; // 4J added as had to remove this assignment from ServerPlayer ctor
|
||||
player->setXuid( xuid ); // 4J Added
|
||||
player->setOnlineXuid( onlineXuid ); // 4J Added
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
{
|
||||
// Use packet-supplied identity from LoginPacket.
|
||||
// Do not recompute from name here: mixed-version clients must stay compatible.
|
||||
@@ -1203,7 +1203,7 @@ void PlayerList::tick()
|
||||
player->connection->disconnect( DisconnectPacket::eDisconnect_Closed );
|
||||
}
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
// The old Connection's read/write threads are now dead (disconnect waits
|
||||
// for them). Safe to recycle the smallId — no stale write thread can
|
||||
// resolve getPlayer() to a new connection that reuses this slot.
|
||||
@@ -1894,7 +1894,7 @@ bool PlayerList::isXuidBanned(PlayerUID xuid)
|
||||
}
|
||||
LeaveCriticalSection(&m_banCS);
|
||||
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64) || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
if (!banned && g_Win64DedicatedServer)
|
||||
{
|
||||
banned = ServerRuntime::Access::IsPlayerBanned(xuid);
|
||||
@@ -1939,7 +1939,7 @@ void PlayerList::banPlayerForHardcoreDeath(ServerPlayer *player)
|
||||
// Always apply the in-memory XUID ban (works for both client-hosted and dedicated)
|
||||
banXuid(player->getOnlineXuid());
|
||||
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64) || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
if (g_Win64DedicatedServer)
|
||||
{
|
||||
const std::string playerName = ServerRuntime::StringUtils::WideToUtf8(player->getName());
|
||||
|
||||
Reference in new issue
Block a user