Skip to content

Commit

Permalink
Remove unused and dead GameSpy code
Browse files Browse the repository at this point in the history
  • Loading branch information
ForserX committed Nov 15, 2024
1 parent a06c84e commit fb7faab
Show file tree
Hide file tree
Showing 248 changed files with 9 additions and 67,531 deletions.
36 changes: 0 additions & 36 deletions src/xrGame/console_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include "inventory_upgrade_manager.h"

#include "GameSpy/GameSpy_Full.h"
#include "GameSpy/GameSpy_Patching.h"

#include "ai_debug_variables.h"
#include "../xrPhysics/console_vars.h"
Expand Down Expand Up @@ -1617,40 +1616,6 @@ class CCC_DumpObjects : public IConsole_Command {
}
};

class CCC_GSCheckForUpdates : public IConsole_Command {
public:
CCC_GSCheckForUpdates(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = true; };
virtual void Execute(LPCSTR arguments)
{
if (!MainMenu()) return;

if (Engine.External.hGameSpy == 0)
return;
/*
CGameSpy_Available GSA;
shared_str result_string;
if (!GSA.CheckAvailableServices(result_string))
{
Msg(*result_string);
// return;
};
CGameSpy_Patching GameSpyPatching;
*/
bool InformOfNoPatch = true;
if (arguments && *arguments) {
int bInfo = 1;
sscanf(arguments, "%d", &bInfo);
InformOfNoPatch = (bInfo != 0);
}

// GameSpyPatching.CheckForPatch(InformOfNoPatch);

MainMenu()->GetGS()->GetGameSpyPatching()->CheckForPatch(InformOfNoPatch);
}
};



class CCC_Net_SV_GuaranteedPacketMode : public CCC_Integer {
protected:
int* value_blin;
Expand Down Expand Up @@ -2664,7 +2629,6 @@ void CCC_RegisterCommands()
CMD4(CCC_Vector3, "psp_cam_offset_l", &CCameraLook2::m_cam_offset_l, Fvector().set(-1000, -1000, -1000), Fvector().set(1000, 1000, 1000));
#endif // MASTER_GOLD

CMD1(CCC_GSCheckForUpdates, "check_for_updates");
#ifdef DEBUG
CMD1(CCC_Crash, "crash");
CMD1(CCC_DumpObjects, "dump_all_objects");
Expand Down
4 changes: 0 additions & 4 deletions src/xrGame/gamespy/GameSpy_Full.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "GameSpy_Full.h"

#include "GameSpy_Available.h"
#include "GameSpy_Patching.h"
#include "GameSpy_HTTP.h"
#include "GameSpy_Browser.h"
#include "GameSpy_GP.h"
Expand All @@ -15,7 +14,6 @@
CGameSpy_Full::CGameSpy_Full()
{
m_pGSA = nullptr;
m_pGS_Patching = nullptr;
m_pGS_HTTP = nullptr;
m_pGS_SB = nullptr;
m_pGS_GP = nullptr;
Expand All @@ -37,7 +35,6 @@ CGameSpy_Full::CGameSpy_Full()
if (Engine.External.hGameSpy != 0)
{
CoreInitialize();
m_pGS_Patching = new CGameSpy_Patching();
m_pGS_HTTP = new CGameSpy_HTTP();
m_pGS_SB = new CGameSpy_Browser();
m_pGS_GP = new CGameSpy_GP();
Expand All @@ -51,7 +48,6 @@ CGameSpy_Full::~CGameSpy_Full()
if (Engine.External.hGameSpy != 0)
{
delete_data(m_pGSA);
delete_data(m_pGS_Patching);
delete_data(m_pGS_HTTP);
delete_data(m_pGS_SB);
delete_data(m_pGS_GP);
Expand Down
3 changes: 0 additions & 3 deletions src/xrGame/gamespy/GameSpy_Full.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

class CGameSpy_Available;
class CGameSpy_Patching;
class CGameSpy_HTTP;
class CGameSpy_Browser;
class CGameSpy_GP;
Expand All @@ -22,7 +21,6 @@ class CGameSpy_Full
~CGameSpy_Full ();

CGameSpy_Available* GetGameSpyAvailable () const { return m_pGSA; };
CGameSpy_Patching* GetGameSpyPatching () const { return m_pGS_Patching; };
CGameSpy_HTTP* GetGameSpyHTTP () const { return m_pGS_HTTP; };
CGameSpy_Browser* GetGameSpyBrowser () const { return m_pGS_SB; };
CGameSpy_GP* GetGameSpyGP () const { return m_pGS_GP; };
Expand All @@ -36,7 +34,6 @@ class CGameSpy_Full
private:

CGameSpy_Available* m_pGSA;
CGameSpy_Patching* m_pGS_Patching;
CGameSpy_HTTP* m_pGS_HTTP;
CGameSpy_Browser* m_pGS_SB;
CGameSpy_GP* m_pGS_GP;
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/gamespy/GameSpy_FuncDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "../../xrGameSpy/GameSpy/gcdkey/gcdkeys.h"
#include "../../xrGameSpy/GameSpy/serverbrowsing/sb_serverbrowsing.h"

#include "../../xrGameSpy/GameSpy/pt/pt.h"
//#include "../../xrGameSpy/GameSpy/pt/pt.h"
#include "../../xrGameSpy/GameSpy/gp/gp.h"
#include "../../xrGameSpy/GameSpy/sake/sake.h"
#include "../../xrGameSpy/GameSpy/sc/sc.h"
Expand Down
119 changes: 0 additions & 119 deletions src/xrGame/gamespy/GameSpy_Patching.cpp

This file was deleted.

23 changes: 0 additions & 23 deletions src/xrGame/gamespy/GameSpy_Patching.h

This file was deleted.

4 changes: 0 additions & 4 deletions src/xrGame/login_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "gamespy/GameSpy_Full.h"
#include "gamespy/GameSpy_GP.h"
#include "gamespy/GameSpy_ATLAS.h"
#include "gamespy/GameSpy_Patching.h"
#include "RegistryFuncs.h"
#include "../xrGameSpy/xrGameSpy_MainDefs.h"
#include "player_name_modifyer.h"
Expand All @@ -24,8 +23,6 @@ login_manager::login_manager(CGameSpy_Full* fullgs_obj)
VERIFY(Engine.External.hGameSpy == 0 || m_gamespy_gp);
m_gamespy_atlas = fullgs_obj->GetGameSpyATLAS();
VERIFY(Engine.External.hGameSpy == 0 || m_gamespy_atlas);
m_gamespy_patching = fullgs_obj->GetGameSpyPatching();
VERIFY(Engine.External.hGameSpy == 0 || m_gamespy_patching);
m_current_profile = nullptr;
}

Expand Down Expand Up @@ -328,7 +325,6 @@ void __cdecl login_manager::login_cb(GPConnection * connection,
tmp_ticket_dest,
true
);
my_inst->m_gamespy_patching->PtTrackUsage(tmp_res->profile);

my_inst->m_gamespy_atlas->WSLoginProfile(
my_inst->m_last_email,
Expand Down
2 changes: 0 additions & 2 deletions src/xrGame/login_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
class CGameSpy_Full;
class CGameSpy_GP;
class CGameSpy_ATLAS;
class CGameSpy_Patching;

namespace gamespy_gp
{
Expand Down Expand Up @@ -117,7 +116,6 @@ class login_manager

CGameSpy_GP* m_gamespy_gp;
CGameSpy_ATLAS* m_gamespy_atlas;
CGameSpy_Patching* m_gamespy_patching;
profile* m_current_profile;

shared_str m_last_email;
Expand Down
13 changes: 8 additions & 5 deletions src/xrGameSpy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(xrGameSpy)
set(XGS_SRC_FILES)

# Files import
file(GLOB XGS_SOURCE_ALL_FILES
file(GLOB XGS_SOURCE_GS_FILES
"DistributionFunc.cpp"
"gamespy/common/gsAvailable.c"
"gamespy/common/gsCore.c"
Expand Down Expand Up @@ -59,7 +59,6 @@ file(GLOB XGS_SOURCE_ALL_FILES
"Gamespy/natneg/NATify.c"
"Gamespy/natneg/natneg.c"
"gamespy/nonport.c"
"Gamespy/pt/ptMain.c"
"gamespy/qr2/qr2.c"
"gamespy/qr2/qr2regkeys.c"
"Gamespy/sake/sakeMain.c"
Expand All @@ -78,24 +77,28 @@ file(GLOB XGS_SOURCE_ALL_FILES
"gamespy/serverbrowsing/sb_serverbrowsing.c"
"gamespy/serverbrowsing/sb_serverlist.c"
"Gamespy/webservices/AuthService.c"
)

file(GLOB XGS_SOURCE_GSC_FILES
"xrGameSpy.cpp"
"xrGameSpy_ATLAS.cpp"
"xrGameSpy_Available.cpp"
"xrGameSpy_CDKey.cpp"
"xrGameSpy_Core.cpp"
"xrGameSpy_GP.cpp"
"xrGameSpy_HTTP.cpp"
"xrGameSpy_Patching.cpp"
"xrGameSpy_QR2.cpp"
"xrGameSpy_SAKE.cpp"
"xrGameSpy_ServerBrowser.cpp"
)

# Source groups
source_group("kernel" FILES ${XGS_SOURCE_ALL_FILES})
source_group("gsc" FILES ${XGS_SOURCE_GSC_FILES})
source_group("gamespy" FILES ${XGS_SOURCE_GS_FILES})

# Apply list
list(APPEND XGS_SRC_FILES ${XGS_SOURCE_ALL_FILES})
list(APPEND XGS_SRC_FILES ${XGS_SOURCE_GS_FILES})
list(APPEND XGS_SRC_FILES ${XGS_SOURCE_GSC_FILES})

# Remove unused files
#list(FILTER XGS_SRC_FILES EXCLUDE REGEX "GameSpy_Patching.cpp$")
Expand Down
Loading

0 comments on commit fb7faab

Please sign in to comment.