From 09000cc4a126ce63b91bf1969e84d3063e9c3645 Mon Sep 17 00:00:00 2001 From: NOTPIES Date: Sun, 8 Mar 2026 22:19:39 -0300 Subject: [PATCH] change define name --- Minecraft.Client/Common/Consoles_App.cpp | 4 ++-- Minecraft.Client/Common/Network/GameNetworkManager.cpp | 2 +- Minecraft.Client/Minecraft.cpp | 4 ++-- Minecraft.Client/MinecraftServer.cpp | 10 +++++----- Minecraft.Client/PlayerConnection.cpp | 4 ++-- Minecraft.Client/PlayerList.cpp | 2 +- Minecraft.Client/ServerLevel.cpp | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index e72757b..615c4a4 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -242,7 +242,7 @@ void CMinecraftApp::DebugPrintf(const char *szFormat, ...) vsnprintf(buf, sizeof(buf), szFormat, ap); va_end(ap); OutputDebugStringA(buf); -#ifdef _DEDICATED_SERVER +#ifdef WITH_SERVER_CODE bool hasContent = false; for (const char *p = buf; *p; p++) { if (*p != ' ' && *p != '\t' && *p != '\n' && *p != '\r' && *p != '=') { @@ -324,7 +324,7 @@ LPCWSTR CMinecraftApp::GetString(int iID) { //return L"Değişiklikler ve Yenilikler"; //return L"ÕÕÕÕÖÖÖÖ"; -#ifdef _DEDICATED_SERVER +#ifdef WITH_SERVER_CODE if (!app.m_stringTable) return L""; #endif return app.m_stringTable->getString(iID); diff --git a/Minecraft.Client/Common/Network/GameNetworkManager.cpp b/Minecraft.Client/Common/Network/GameNetworkManager.cpp index ce1802c..6555346 100644 --- a/Minecraft.Client/Common/Network/GameNetworkManager.cpp +++ b/Minecraft.Client/Common/Network/GameNetworkManager.cpp @@ -790,7 +790,7 @@ int CGameNetworkManager::JoinFromInvite_SignInReturned(void *pParam,bool bContin void CGameNetworkManager::UpdateAndSetGameSessionData(INetworkPlayer *pNetworkPlayerLeaving) { -#ifndef _DEDICATED_SERVER +#ifndef WITH_SERVER_CODE Minecraft *pMinecraft = Minecraft::GetInstance(); TexturePack *tPack = pMinecraft->skins->getSelected(); s_pPlatformNetworkManager->SetSessionTexturePackParentId( tPack->getDLCParentPackId() ); diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index b3b077a..593a732 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -5046,7 +5046,7 @@ void Minecraft::handleClientTextureReceived(const wstring &textureName) unsigned int Minecraft::getCurrentTexturePackId() { -#ifdef _DEDICATED_SERVER +#ifdef WITH_SERVER_CODE return 0; #else return skins->getSelected()->getId(); @@ -5055,7 +5055,7 @@ unsigned int Minecraft::getCurrentTexturePackId() ColourTable *Minecraft::getColourTable() { -#ifdef _DEDICATED_SERVER +#ifdef WITH_SERVER_CODE return NULL; #else TexturePack *selected = skins->getSelected(); diff --git a/Minecraft.Client/MinecraftServer.cpp b/Minecraft.Client/MinecraftServer.cpp index e267596..c5e434a 100644 --- a/Minecraft.Client/MinecraftServer.cpp +++ b/Minecraft.Client/MinecraftServer.cpp @@ -50,7 +50,7 @@ #include "PS3\PS3Extras\ShutdownManager.h" #include "ServerCommandDispatcher.h" -#ifdef _DEDICATED_SERVER +#ifdef WITH_SERVER_CODE #include "..\Minecraft.Server\ServerCommands.h" #endif @@ -275,7 +275,7 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData *initData, DW g_NetworkManager.ServerReady(); // 4J added -#ifdef _DEDICATED_SERVER +#ifdef WITH_SERVER_CODE { extern QNET_STATE _iQNetStubState; _iQNetStubState = QNET_STATE_GAME_PLAY; @@ -1087,7 +1087,7 @@ void MinecraftServer::run(__int64 seed, void *lpParameter) } } -#ifdef _DEDICATED_SERVER +#ifdef WITH_SERVER_CODE { __int64 doneTime = System::currentTimeMillis(); app.DebugPrintf("Done! For help, type \"help\" or \"?\""); @@ -1546,7 +1546,7 @@ void MinecraftServer::tick() } Entity::tickExtraWandering(); // 4J added -#ifdef _DEDICATED_SERVER +#ifdef WITH_SERVER_CODE g_NetworkManager.DoWork(); WinsockNetLayer::FlushPendingData(); #endif @@ -1584,7 +1584,7 @@ void MinecraftServer::handleConsoleInputs() AUTO_VAR(it, consoleInput.begin()); ConsoleInput *input = *it; consoleInput.erase(it); -#ifdef _DEDICATED_SERVER +#ifdef WITH_SERVER_CODE HandleServerCommand(input->msg, input->source, this); delete input; #else diff --git a/Minecraft.Client/PlayerConnection.cpp b/Minecraft.Client/PlayerConnection.cpp index 76e3264..edd9de5 100644 --- a/Minecraft.Client/PlayerConnection.cpp +++ b/Minecraft.Client/PlayerConnection.cpp @@ -130,14 +130,14 @@ void PlayerConnection::disconnect(DisconnectPacket::eDisconnectReason reason) if(getWasKicked()) { server->getPlayers()->broadcastAll( shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerKickedFromGame) ) ); -#ifdef _DEDICATED_SERVER +#ifdef WITH_SERVER_CODE app.DebugPrintf("%ls was kicked from the game", player->name.c_str()); #endif } else { server->getPlayers()->broadcastAll( shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerLeftGame) ) ); -#ifdef _DEDICATED_SERVER +#ifdef WITH_SERVER_CODE app.DebugPrintf("%ls left the game", player->name.c_str()); #endif } diff --git a/Minecraft.Client/PlayerList.cpp b/Minecraft.Client/PlayerList.cpp index 527a3f3..415a03e 100644 --- a/Minecraft.Client/PlayerList.cpp +++ b/Minecraft.Client/PlayerList.cpp @@ -236,7 +236,7 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr //server->players->broadcastAll( shared_ptr( new ChatPacket(L"�e" + playerEntity->name + L" joined the game.") ) ); broadcastAll( shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerJoinedGame) ) ); -#ifdef _DEDICATED_SERVER +#ifdef WITH_SERVER_CODE app.DebugPrintf("%ls joined the game", player->name.c_str()); #endif diff --git a/Minecraft.Client/ServerLevel.cpp b/Minecraft.Client/ServerLevel.cpp index 39ca415..4dd86e2 100644 --- a/Minecraft.Client/ServerLevel.cpp +++ b/Minecraft.Client/ServerLevel.cpp @@ -922,7 +922,7 @@ void ServerLevel::saveToDisc(ProgressListener *progressListener, bool autosave) // 4J-PB - check that saves are enabled if(StorageManager.GetSaveDisabled()) return; -#ifndef _DEDICATED_SERVER +#ifndef WITH_SERVER_CODE // Check if we are using a trial version of a texture pack (which will be the case for going into the mash-up pack world with a trial version) if(!Minecraft::GetInstance()->skins->isUsingDefaultSkin()) {