Removed the steam subsystem entirely from the advanced steam module

Removed the steam subsystem entirely from the advanced steam module. In 5.3 it has a lot of issues with it for some reason, the steam subsystem is not loading if I directly reference it.

Changes should also work in prior versions.
This commit is contained in:
mordentral
2023-10-10 20:25:51 -04:00
parent b5c8b348c0
commit be280a6dfd
7 changed files with 35 additions and 39 deletions

View File

@@ -14,7 +14,7 @@
{ {
"Name" : "AdvancedSteamSessions", "Name" : "AdvancedSteamSessions",
"Type" : "RunTime", "Type" : "RunTime",
"LoadingPhase" : "PreDefault" "LoadingPhase" : "PostDefault"
} }
], ],
"Plugins": [ "Plugins": [
@@ -30,10 +30,6 @@
"Name": "OnlineSubsystemUtils", "Name": "OnlineSubsystemUtils",
"Enabled": true "Enabled": true
}, },
{
"Name": "OnlineSubsystemSteam",
"Enabled": true
},
{ {
"Name": "SteamShared", "Name": "SteamShared",
"Enabled": true "Enabled": true

View File

@@ -15,8 +15,8 @@ public class AdvancedSteamSessions : ModuleRules
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Linux) || (Target.Platform == UnrealTargetPlatform.Mac)) if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Linux) || (Target.Platform == UnrealTargetPlatform.Mac))
{ {
PublicDependencyModuleNames.AddRange(new string[] { "Steamworks",/*"Voice",*/ "OnlineSubsystemSteam" }); PublicDependencyModuleNames.AddRange(new string[] { "Steamworks"/*, "OnlineSubsystemSteam"*/ });
PublicIncludePaths.AddRange(new string[] { "../Plugins/Online/OnlineSubsystemSteam/Source/Private" });// This is dumb but it isn't very open //PublicIncludePaths.AddRange(new string[] { "../Plugins/Online/OnlineSubsystemSteam/Source/Private" });// This is dumb but it isn't very open
} }
} }
} }

View File

@@ -7,8 +7,8 @@
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX #if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
#include "OnlineSubsystemSteam.h" //#include "OnlineSubsystemSteam.h"
#include "OnlineSubsystemSteamPrivate.h" //#include "OnlineSubsystemSteamPrivate.h"
#include <steam/steam_api.h> #include <steam/steam_api.h>

View File

@@ -17,7 +17,7 @@
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX #if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
#include "OnlineSubsystemSteam.h" //#include "OnlineSubsystemSteam.h"
#pragma push_macro("ARRAY_COUNT") #pragma push_macro("ARRAY_COUNT")
#undef ARRAY_COUNT #undef ARRAY_COUNT

View File

@@ -18,7 +18,7 @@
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX #if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
#include "OnlineSubsystemSteam.h" //#include "OnlineSubsystemSteam.h"
#pragma push_macro("ARRAY_COUNT") #pragma push_macro("ARRAY_COUNT")
#undef ARRAY_COUNT #undef ARRAY_COUNT

View File

@@ -50,17 +50,17 @@ void USteamRequestGroupOfficersCallbackProxy::OnRequestGroupOfficerDetails(ClanO
{ {
TArray<FBPSteamGroupOfficer> OfficerArray; TArray<FBPSteamGroupOfficer> OfficerArray;
FOnlineSubsystemSteam* SteamSubsystem = (FOnlineSubsystemSteam*)(IOnlineSubsystem::Get(STEAM_SUBSYSTEM)); //FOnlineSubsystemSteam* SteamSubsystem = (FOnlineSubsystemSteam*)(IOnlineSubsystem::Get(STEAM_SUBSYSTEM));
if (bIOFailure || !pResult || !pResult->m_bSuccess) if (bIOFailure || !pResult || !pResult->m_bSuccess)
{ {
if (SteamSubsystem != nullptr) //if (SteamSubsystem != nullptr)
{ {
SteamSubsystem->ExecuteNextTick([this]() // SteamSubsystem->ExecuteNextTick([this]()
{ //{
TArray<FBPSteamGroupOfficer> FailureArray; TArray<FBPSteamGroupOfficer> FailureArray;
OnFailure.Broadcast(FailureArray); OnFailure.Broadcast(FailureArray);
}); //});
} }
//OnFailure.Broadcast(OfficerArray); //OnFailure.Broadcast(OfficerArray);
return; return;
@@ -91,26 +91,26 @@ void USteamRequestGroupOfficersCallbackProxy::OnRequestGroupOfficerDetails(ClanO
OfficerArray.Add(Officer); OfficerArray.Add(Officer);
} }
if (SteamSubsystem != nullptr) //if (SteamSubsystem != nullptr)
{ //{
SteamSubsystem->ExecuteNextTick([OfficerArray, this]() //SteamSubsystem->ExecuteNextTick([OfficerArray, this]()
{ //{
OnSuccess.Broadcast(OfficerArray); OnSuccess.Broadcast(OfficerArray);
}); //});
} //}
//OnSuccess.Broadcast(OfficerArray); //OnSuccess.Broadcast(OfficerArray);
return; return;
} }
else else
{ {
if (SteamSubsystem != nullptr) //if (SteamSubsystem != nullptr)
{ {
SteamSubsystem->ExecuteNextTick([this]() //SteamSubsystem->ExecuteNextTick([this]()
{ //{
TArray<FBPSteamGroupOfficer> FailureArray; TArray<FBPSteamGroupOfficer> FailureArray;
OnFailure.Broadcast(FailureArray); OnFailure.Broadcast(FailureArray);
}); //});
} }
} }

View File

@@ -52,16 +52,16 @@ void USteamWSRequestUGCDetailsCallbackProxy::Activate()
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX #if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
void USteamWSRequestUGCDetailsCallbackProxy::OnUGCRequestUGCDetails(SteamUGCQueryCompleted_t *pResult, bool bIOFailure) void USteamWSRequestUGCDetailsCallbackProxy::OnUGCRequestUGCDetails(SteamUGCQueryCompleted_t *pResult, bool bIOFailure)
{ {
FOnlineSubsystemSteam* SteamSubsystem = (FOnlineSubsystemSteam*)(IOnlineSubsystem::Get(STEAM_SUBSYSTEM)); //FOnlineSubsystemSteam* SteamSubsystem = (FOnlineSubsystemSteam*)(IOnlineSubsystem::Get(STEAM_SUBSYSTEM));
if (bIOFailure || !pResult || pResult->m_unNumResultsReturned <= 0) if (bIOFailure || !pResult || pResult->m_unNumResultsReturned <= 0)
{ {
if (SteamSubsystem != nullptr) //if (SteamSubsystem != nullptr)
{ {
SteamSubsystem->ExecuteNextTick([this]() // SteamSubsystem->ExecuteNextTick([this]()
{ //{
OnFailure.Broadcast(FBPSteamWorkshopItemDetails()); OnFailure.Broadcast(FBPSteamWorkshopItemDetails());
}); //});
} }
//OnFailure.Broadcast(FBPSteamWorkshopItemDetails()); //OnFailure.Broadcast(FBPSteamWorkshopItemDetails());
return; return;
@@ -71,12 +71,12 @@ void USteamWSRequestUGCDetailsCallbackProxy::OnUGCRequestUGCDetails(SteamUGCQuer
SteamUGCDetails_t Details; SteamUGCDetails_t Details;
if (SteamUGC()->GetQueryUGCResult(pResult->m_handle, 0, &Details)) if (SteamUGC()->GetQueryUGCResult(pResult->m_handle, 0, &Details))
{ {
if (SteamSubsystem != nullptr) //if (SteamSubsystem != nullptr)
{ {
SteamSubsystem->ExecuteNextTick([Details, this]() //SteamSubsystem->ExecuteNextTick([Details, this]()
{ //{
OnSuccess.Broadcast(FBPSteamWorkshopItemDetails(Details)); OnSuccess.Broadcast(FBPSteamWorkshopItemDetails(Details));
}); //});
} }
//OnSuccess.Broadcast(FBPSteamWorkshopItemDetails(Details)); //OnSuccess.Broadcast(FBPSteamWorkshopItemDetails(Details));
@@ -85,12 +85,12 @@ void USteamWSRequestUGCDetailsCallbackProxy::OnUGCRequestUGCDetails(SteamUGCQuer
} }
else else
{ {
if (SteamSubsystem != nullptr) //if (SteamSubsystem != nullptr)
{ {
SteamSubsystem->ExecuteNextTick([this]() //SteamSubsystem->ExecuteNextTick([this]()
{ //{
OnFailure.Broadcast(FBPSteamWorkshopItemDetails()); OnFailure.Broadcast(FBPSteamWorkshopItemDetails());
}); //});
} }
} }