24 Commits

Author SHA1 Message Date
Joshua (MordenTral) Statzer
707c055f49 Merge pull request #30 from uno1982/master
Add server travel blueprint node.
2022-03-11 13:45:42 -05:00
mordentral
aee6c013d6 Ban/Kick Player
Adds BP nodes to the library to kick / ban player

Since built in game sessions does not actually implement ban player, I also provide a very basic naive implementation with a custom game session that bans for the duration of the session. A real implementation would save out the net id and also perform the check in the game mode before spooling up a player for login.
2020-06-27 18:44:12 -04:00
mordentral
064c1a989d added gitignore
added gitignore
2020-06-07 20:51:08 -04:00
mordentral
6b315302e2 Locking 4.24
Former-commit-id: 41fd6645fce9110a3e64bc135b3c5d5dd1f52c1e
2020-05-05 19:08:28 -04:00
mordentral
2216aaf041 made a note on the literal search bool nodes that they aren't used for filtering
on steam


Former-commit-id: dd4423b2810500c7106c065ca632a5bd4794749a
2020-02-04 09:51:33 -05:00
mordentral
192307b542 fixing a replace operation that screwed up the .uplugin files
Former-commit-id: bef14f3afc4f9cff36b62441ccf79ed8e6d21edc
2019-12-09 10:47:53 -05:00
mordentral
51cf0acb2e Taking 4.24 live
Former-commit-id: 9fd092e594a1c561c109633f8661a766e5a2a6e4
2019-12-09 10:26:49 -05:00
mordentral
3c4ba2af3b fixed deprecating function call
Former-commit-id: 3b0a2802808bce6cf442f233e5f041d8b0ea3505
2019-10-29 10:12:27 -04:00
mordentral
8744035160 Added world context to a bunch of relevant nodes.
Should likely add it to others in the future as well.


Former-commit-id: c41024927d6525c3c35ff609bdffdb2960b6e3ae
2019-10-29 09:52:28 -04:00
mordentral
71f16cadd2 fixed a compilation issue
Former-commit-id: 2a9d3410b912fa418c62e54561dfe0a60df50c33
2019-10-15 14:20:02 -04:00
mordentral
fdfc2d272f added an include to fix up potential Gengine issues
Former-commit-id: d3b5af9617865f37f3c207ec41e42d1ea107d0c3
2019-10-15 10:07:13 -04:00
mordentral
297848aed8 merging 4.23
Former-commit-id: 15eff386a29a783738c08a95ccced0bf750e7611
2019-09-04 16:22:01 -04:00
morden
60d1d272a5 Added more exclusions that were missing so that this module works with android
Former-commit-id: 761446368dbf589018c1a9cb9ab94bf44544569d
2019-08-04 15:43:13 -04:00
morden
c3f889c9c5 cleaned up some includes
Former-commit-id: f5553794bc0bb12c833829ef2728df168994c694
2019-05-25 13:15:54 -04:00
mordentral
2e93c6095a Converted over to using the newer session names
Former-commit-id: f6d820a363d9e6881c647d9d29059ade0ac05746
2019-04-18 15:11:12 -04:00
mordentral
6007506189 Added another session id utility function
Former-commit-id: 4e97162f7c10db3bd97b3756fa2de911e360b662
2019-04-18 13:35:15 -04:00
mordentral
0952d9b18a Added a new utility function to the Advanced Sessions Function Library
(Thanks to Vorixo)

Gets the specified session results session ID as a string


Former-commit-id: da5f0345f3e48ac0c832dbdbc365b0111341dd0b
2019-04-17 15:32:12 -04:00
morden
438d0a69ba Fixed a steam id error
Former-commit-id: cb35546a02707558f615fc2d20a3e2af5fe6d3c8
2019-04-05 19:51:00 -04:00
J
85e9b54fab Merged 4.22 into default
Former-commit-id: 70a1989c1dc8a6925fffd5588906629c63b8ffa7
2019-04-02 18:19:51 +00:00
mordentral
ba28fccfe0 pushing 4.22 live
Former-commit-id: e68353ec156bef65a4823eae2b056e5f5b0878aa
2019-03-26 12:52:48 -04:00
mordentral
d71aaede8d Added OpenSteamUserOverlay to the AdvancedSteamFriendsLibrary
Former-commit-id: d65ec87132032ccfbc06dac90630548ee56d800f
2019-01-15 12:56:03 -05:00
mordentral
38b5c96cbd Adding extended comment to create advanced session, thanks rumbleball
Former-commit-id: 1ed8d2f155d8ea51df6649b674636ceb87c27661
2018-12-05 09:49:57 -05:00
mordentral
ad745512ac Switched to epics new hashing setup for unique ids
Also added new function GetLocalSteamIDFromSteam.


Former-commit-id: 7a15f500cd86064444cedb47433417b7bb9298e4
2018-11-14 14:08:45 -05:00
mordentral
ce7d8b1bf3 4.21 update
Former-commit-id: 91ebbaafc5a4f262d0b811c22b2a83799219fb15
2018-11-07 14:13:15 -05:00
26 changed files with 375 additions and 61 deletions

10
.gitignore vendored Normal file
View File

@@ -0,0 +1,10 @@
.hg/
binaries/
deriveddatacache/
.vs/
build/
intermediate/
PACKPLUGIN/
saved/
*.orig

View File

@@ -2,8 +2,8 @@
"FileVersion" : 3,
"FriendlyName" : "Advanced Sessions",
"Version" : 4.20,
"VersionName": "4.20",
"Version" : 4.24,
"VersionName": "4.24",
"Description" : "Adds new blueprint functions to handle more advanced session operations.",
"Category" : "Advanced Sessions Plugin",
"CreatedBy" : "Joshua Statzer",

View File

@@ -2,6 +2,7 @@
#pragma once
#include "CoreMinimal.h"
#include "Engine/Engine.h"
#include "BlueprintDataDefinitions.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "Online.h"

View File

@@ -0,0 +1,70 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Engine/Engine.h"
#include "Online.h"
#include "OnlineSubsystem.h"
#include "Engine/GameInstance.h"
#include "GameFramework/GameModeBase.h"
#include "GameFramework/GameSession.h"
//#include "UObjectIterator.h"
#include "AdvancedGameSession.generated.h"
/**
A quick wrapper around the game session to add a partial ban implementation. Just bans for the duration of the current session
*/
UCLASS(config = Game, notplaceable)
class AAdvancedGameSession : public AGameSession
{
GENERATED_UCLASS_BODY()
public:
UPROPERTY(Transient)
TMap<FUniqueNetIdRepl, FText> BanList;
virtual bool BanPlayer(class APlayerController* BannedPlayer, const FText& BanReason)
{
if (APlayerState* PlayerState = (BannedPlayer != NULL) ? BannedPlayer->PlayerState : NULL)
{
FUniqueNetIdRepl UniqueNetID = PlayerState->GetUniqueId();
bool bWasKicked = KickPlayer(BannedPlayer, BanReason);
if (bWasKicked)
{
BanList.Add(UniqueNetID, BanReason);
}
return bWasKicked;
}
return false;
}
// This should really be handled in the game mode asking game session, but I didn't want to force a custom game session AND game mode
// If done in the game mode, we could check prior to actually spooling up any player information in ApproveLogin
virtual void PostLogin(APlayerController* NewPlayer) override
{
if (APlayerState* PlayerState = (NewPlayer != NULL) ? NewPlayer->PlayerState : NULL)
{
FUniqueNetIdRepl UniqueNetID = PlayerState->GetUniqueId();
if (BanList.Contains(UniqueNetID))
{
KickPlayer(NewPlayer, BanList[UniqueNetID]);
}
}
}
};
AAdvancedGameSession::AAdvancedGameSession(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}

View File

@@ -2,6 +2,7 @@
#pragma once
#include "CoreMinimal.h"
#include "Engine/Engine.h"
#include "BlueprintDataDefinitions.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "Online.h"
@@ -13,6 +14,9 @@
#include "Engine/GameInstance.h"
#include "Interfaces/OnlineSessionInterface.h"
#include "GameFramework/GameModeBase.h"
#include "GameFramework/GameSession.h"
//#include "UObjectIterator.h"
#include "AdvancedSessionsLibrary.generated.h"
@@ -27,6 +31,17 @@ class UAdvancedSessionsLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
//********* Session Admin Functions *************//
// Kick a player from the currently active game session, only available on the server
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions", meta = (WorldContext = "WorldContextObject"))
static bool KickPlayer(UObject* WorldContextObject, APlayerController* PlayerToKick, FText KickReason);
// Ban a player from the currently active game session, only available on the server
// Note that the default gamesession class does not implement an actual ban list and just kicks when this is called
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions", meta = (WorldContext = "WorldContextObject"))
static bool BanPlayer(UObject* WorldContextObject, APlayerController* PlayerToBan, FText BanReason);
//********* Session Search Functions *************//
// Adds or modifies session settings in an existing array depending on if they exist already or not
@@ -38,16 +53,16 @@ public:
static void GetExtraSettings(FBlueprintSessionResult SessionResult, TArray<FSessionPropertyKeyPair> & ExtraSettings);
// Get the current session state
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo")
static void GetSessionState(EBPOnlineSessionState &SessionState);
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (WorldContext = "WorldContextObject"))
static void GetSessionState(UObject* WorldContextObject, EBPOnlineSessionState &SessionState);
// Get the current session settings
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "Result"))
static void GetSessionSettings(int32 &NumConnections, int32 &NumPrivateConnections, bool &bIsLAN, bool &bIsDedicated, bool &bAllowInvites, bool &bAllowJoinInProgress, bool &bIsAnticheatEnabled, int32 &BuildUniqueID, TArray<FSessionPropertyKeyPair> &ExtraSettings, EBlueprintResultSwitch &Result);
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "Result", WorldContext = "WorldContextObject"))
static void GetSessionSettings(UObject* WorldContextObject, int32 &NumConnections, int32 &NumPrivateConnections, bool &bIsLAN, bool &bIsDedicated, bool &bAllowInvites, bool &bAllowJoinInProgress, bool &bIsAnticheatEnabled, int32 &BuildUniqueID, TArray<FSessionPropertyKeyPair> &ExtraSettings, EBlueprintResultSwitch &Result);
// Check if someone is in the current session
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo")
static void IsPlayerInSession(const FBPUniqueNetId &PlayerToCheck, bool &bIsInSession);
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (WorldContext = "WorldContextObject"))
static void IsPlayerInSession(UObject* WorldContextObject, const FBPUniqueNetId &PlayerToCheck, bool &bIsInSession);
// Make a literal session search parameter
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|SessionInfo|Literals")
@@ -60,6 +75,14 @@ public:
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|SessionInfo")
static bool IsValidSession(const FBlueprintSessionResult & SessionResult);
// Get a string copy of a session ID
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|SessionInfo")
static void GetSessionID_AsString(const FBlueprintSessionResult & SessionResult, FString& SessionID);
// Get a string copy of the current session ID
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|SessionInfo", meta = (WorldContext = "WorldContextObject"))
static void GetCurrentSessionID_AsString(UObject* WorldContextObject, FString& SessionID);
// Get the Unique Current Build ID
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|SessionInfo")
static void GetCurrentUniqueBuildID(int32 &UniqueBuildId);
@@ -92,6 +115,7 @@ public:
static void GetSessionPropertyByte(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, ESessionSettingSearchResult &SearchResult, uint8 &SettingValue);
// Get session custom information key/value as Bool
// Steam only currently supports Int,Float,String,BYTE values for search filtering!!!
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "SearchResult"))
static void GetSessionPropertyBool(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, ESessionSettingSearchResult &SearchResult, bool &SettingValue);
@@ -113,6 +137,7 @@ public:
static FSessionPropertyKeyPair MakeLiteralSessionPropertyByte(FName Key, uint8 Value);
// Make a literal session custom information key/value pair from Bool
// Steam only currently supports Int,Float,String,BYTE values for search filtering!
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|SessionInfo|Literals")
static FSessionPropertyKeyPair MakeLiteralSessionPropertyBool(FName Key, bool Value);
@@ -174,6 +199,12 @@ public:
// Checks if the stated session subsystem is active
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|Misc")
static bool HasOnlineSubsystem(FName SubSystemName);
//**** Seamless travel Functions ****//
//Exposes Server travel to blueprint
UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = "Online|AdvancedSessions|Seamless", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
static bool ServerTravel(UObject* WorldContextObject, const FString& InURL, bool bAbsolute, bool bShouldSkipGameNotify);
};

View File

@@ -1,6 +1,7 @@
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Engine/Engine.h"
#include "Interfaces/OnlineSessionInterface.h"
#include "BlueprintDataDefinitions.h"
#include "CancelFindSessionsCallbackProxy.generated.h"

View File

@@ -2,6 +2,7 @@
#pragma once
#include "CoreMinimal.h"
#include "Engine/Engine.h"
#include "BlueprintDataDefinitions.h"
#include "CreateSessionCallbackProxyAdvanced.generated.h"
@@ -18,7 +19,13 @@ class UCreateSessionCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase
UPROPERTY(BlueprintAssignable)
FEmptyOnlineDelegate OnFailure;
// Creates a session with the default online subsystem with advanced optional inputs, for dedicated servers leave UsePresence as false and set IsDedicatedServer to true. Dedicated servers don't use presence.
/**
* Creates a session with the default online subsystem with advanced optional inputs, for dedicated servers leave UsePresence as false and set IsDedicatedServer to true. Dedicated servers don't use presence.
* @param PublicConnections When doing a 'listen' server, this must be >=2 (ListenServer itself counts as a connection)
* @param bUseLAN When you want to play LAN, the level to play on must be loaded with option 'bIsLanMatch'
* @param bUsePresence Must be true for a 'listen' server (Map must be loaded with option 'listen'), false for a 'dedicated' server.
* @param bShouldAdvertise Set to true when the OnlineSubsystem should list your server when someone is searching for servers. Otherwise the server is hidden and only join via invite is possible.
*/
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject",AutoCreateRefTerm="ExtraSettings"), Category = "Online|AdvancedSessions")
static UCreateSessionCallbackProxyAdvanced* CreateAdvancedSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, class APlayerController* PlayerController = NULL, int32 PublicConnections = 100, int32 PrivateConnections = 0, bool bUseLAN = false, bool bAllowInvites = true, bool bIsDedicatedServer = false, bool bUsePresence = true, bool bAllowJoinViaPresence = true, bool bAllowJoinViaPresenceFriendsOnly = false, bool bAntiCheatProtected = false, bool bUsesStats = false, bool bShouldAdvertise = true);

View File

@@ -1,6 +1,7 @@
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Engine/Engine.h"
#include "Interfaces/OnlineSessionInterface.h"
#include "BlueprintDataDefinitions.h"
#include "EndSessionCallbackProxy.generated.h"

View File

@@ -1,6 +1,7 @@
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Engine/Engine.h"
#include "Interfaces/OnlineSessionInterface.h"
#include "FindSessionsCallbackProxy.h"
#include "BlueprintDataDefinitions.h"

View File

@@ -2,6 +2,7 @@
#pragma once
#include "CoreMinimal.h"
#include "Engine/Engine.h"
#include "BlueprintDataDefinitions.h"
#include "UpdateSessionCallbackProxyAdvanced.generated.h"

View File

@@ -124,7 +124,7 @@ void UAdvancedExternalUILibrary::ShowInviteUI(APlayerController *PlayerControlle
return;
}
ExternalUIInterface->ShowInviteUI(Player->GetControllerId(), GameSessionName);
ExternalUIInterface->ShowInviteUI(Player->GetControllerId(), NAME_GameSession);
Result = EBlueprintResultSwitch::OnSuccess;
}

View File

@@ -22,7 +22,7 @@ UAdvancedFriendsGameInstance::UAdvancedFriendsGameInstance(const FObjectInitiali
void UAdvancedFriendsGameInstance::Shutdown()
{
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface();
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface(GetWorld());
if (!SessionInterface.IsValid())
{
@@ -39,7 +39,7 @@ void UAdvancedFriendsGameInstance::Shutdown()
if (bEnableTalkingStatusDelegate)
{
IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface();
IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface(GetWorld());
if (VoiceInterface.IsValid())
{
@@ -52,7 +52,7 @@ void UAdvancedFriendsGameInstance::Shutdown()
}
}
IOnlineIdentityPtr IdentityInterface = Online::GetIdentityInterface();
IOnlineIdentityPtr IdentityInterface = Online::GetIdentityInterface(GetWorld());
if (IdentityInterface.IsValid())
{
@@ -69,7 +69,7 @@ void UAdvancedFriendsGameInstance::Shutdown()
void UAdvancedFriendsGameInstance::Init()
{
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface();//OnlineSub->GetSessionInterface();
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface(GetWorld());//OnlineSub->GetSessionInterface();
if (SessionInterface.IsValid())
{
@@ -90,7 +90,7 @@ void UAdvancedFriendsGameInstance::Init()
// Beginning work on the voice interface
if (bEnableTalkingStatusDelegate)
{
IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface();
IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface(GetWorld());
if (VoiceInterface.IsValid())
{
@@ -103,7 +103,7 @@ void UAdvancedFriendsGameInstance::Init()
}
}
IOnlineIdentityPtr IdentityInterface = Online::GetIdentityInterface();
IOnlineIdentityPtr IdentityInterface = Online::GetIdentityInterface(GetWorld());
if (IdentityInterface.IsValid())
{

View File

@@ -50,7 +50,7 @@ void UAdvancedFriendsLibrary::SendSessionInviteToFriends(APlayerController *Play
List.Add(val);
}
if (SessionInterface->SendSessionInviteToFriends(Player->GetControllerId(), GameSessionName, List))
if (SessionInterface->SendSessionInviteToFriends(Player->GetControllerId(), NAME_GameSession, List))
{
Result = EBlueprintResultSwitch::OnSuccess;
return;
@@ -94,7 +94,7 @@ void UAdvancedFriendsLibrary::SendSessionInviteToFriend(APlayerController *Playe
return;
}
if (SessionInterface->SendSessionInviteToFriend(Player->GetControllerId(), GameSessionName, *FriendUniqueNetId.GetUniqueNetId()))
if (SessionInterface->SendSessionInviteToFriend(Player->GetControllerId(), NAME_GameSession, *FriendUniqueNetId.GetUniqueNetId()))
{
Result = EBlueprintResultSwitch::OnSuccess;
return;

View File

@@ -1,17 +1,93 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "AdvancedSessionsLibrary.h"
#include "GameFramework/PlayerState.h"
#include "GameFramework/GameStateBase.h"
//General Log
DEFINE_LOG_CATEGORY(AdvancedSessionsLog);
bool UAdvancedSessionsLibrary::KickPlayer(UObject* WorldContextObject, APlayerController* PlayerToKick, FText KickReason)
{
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
if (World)
{
if (AGameModeBase* GameMode = World->GetAuthGameMode())
{
if (GameMode->GameSession)
{
return GameMode->GameSession->KickPlayer(PlayerToKick, KickReason);
}
}
}
return false;
}
bool UAdvancedSessionsLibrary::BanPlayer(UObject* WorldContextObject, APlayerController* PlayerToBan, FText BanReason)
{
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
if (World)
{
if (AGameModeBase* GameMode = World->GetAuthGameMode())
{
if (GameMode->GameSession)
{
return GameMode->GameSession->BanPlayer(PlayerToBan, BanReason);
}
}
}
return false;
}
bool UAdvancedSessionsLibrary::IsValidSession(const FBlueprintSessionResult & SessionResult)
{
return SessionResult.OnlineResult.IsValid();
}
void UAdvancedSessionsLibrary::GetSessionID_AsString(const FBlueprintSessionResult & SessionResult, FString& SessionID)
{
const TSharedPtr<class FOnlineSessionInfo> SessionInfo = SessionResult.OnlineResult.Session.SessionInfo;
if (SessionInfo.IsValid() && SessionInfo->IsValid() && SessionInfo->GetSessionId().IsValid())
{
SessionID = SessionInfo->GetSessionId().ToString();
return;
}
// Zero the string out if we didn't have a valid one, in case this is called in c++
SessionID.Empty();
}
void UAdvancedSessionsLibrary::GetCurrentSessionID_AsString(UObject* WorldContextObject, FString& SessionID)
{
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface(World);
if (!SessionInterface.IsValid())
{
UE_LOG(AdvancedSessionsLog, Warning, TEXT("GetCurrentSessionID_AsString couldn't get the session interface!"));
SessionID.Empty();
return;
}
const FNamedOnlineSession* Session = SessionInterface->GetNamedSession(NAME_GameSession);
if (Session != nullptr)
{
const TSharedPtr<class FOnlineSessionInfo> SessionInfo = Session->SessionInfo;
if (SessionInfo.IsValid() && SessionInfo->IsValid() && SessionInfo->GetSessionId().IsValid())
{
SessionID = SessionInfo->GetSessionId().ToString();
return;
}
}
// Zero the string out if we didn't have a valid one, in case this is called in c++
SessionID.Empty();
}
void UAdvancedSessionsLibrary::GetCurrentUniqueBuildID(int32 &UniqueBuildId)
{
UniqueBuildId = GetBuildUniqueId();
@@ -87,9 +163,10 @@ void UAdvancedSessionsLibrary::GetExtraSettings(FBlueprintSessionResult SessionR
}
}
void UAdvancedSessionsLibrary::GetSessionState(EBPOnlineSessionState &SessionState)
void UAdvancedSessionsLibrary::GetSessionState(UObject* WorldContextObject, EBPOnlineSessionState &SessionState)
{
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface();
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface(World);
if (!SessionInterface.IsValid())
{
@@ -97,12 +174,13 @@ void UAdvancedSessionsLibrary::GetSessionState(EBPOnlineSessionState &SessionSta
return;
}
SessionState = ((EBPOnlineSessionState)SessionInterface->GetSessionState(GameSessionName));
SessionState = ((EBPOnlineSessionState)SessionInterface->GetSessionState(NAME_GameSession));
}
void UAdvancedSessionsLibrary::GetSessionSettings(int32 &NumConnections, int32 &NumPrivateConnections, bool &bIsLAN, bool &bIsDedicated, bool &bAllowInvites, bool &bAllowJoinInProgress, bool &bIsAnticheatEnabled, int32 &BuildUniqueID, TArray<FSessionPropertyKeyPair> &ExtraSettings, EBlueprintResultSwitch &Result)
void UAdvancedSessionsLibrary::GetSessionSettings(UObject* WorldContextObject, int32 &NumConnections, int32 &NumPrivateConnections, bool &bIsLAN, bool &bIsDedicated, bool &bAllowInvites, bool &bAllowJoinInProgress, bool &bIsAnticheatEnabled, int32 &BuildUniqueID, TArray<FSessionPropertyKeyPair> &ExtraSettings, EBlueprintResultSwitch &Result)
{
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface();
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface(World);
if (!SessionInterface.IsValid())
{
@@ -111,7 +189,7 @@ void UAdvancedSessionsLibrary::GetSessionSettings(int32 &NumConnections, int32 &
return;
}
FOnlineSessionSettings* settings = SessionInterface->GetSessionSettings(GameSessionName);
FOnlineSessionSettings* settings = SessionInterface->GetSessionSettings(NAME_GameSession);
if (!settings)
{
UE_LOG(AdvancedSessionsLog, Warning, TEXT("GetSessionSettings couldn't get the session settings!"));
@@ -140,9 +218,10 @@ void UAdvancedSessionsLibrary::GetSessionSettings(int32 &NumConnections, int32 &
Result = EBlueprintResultSwitch::OnSuccess;
}
void UAdvancedSessionsLibrary::IsPlayerInSession(const FBPUniqueNetId &PlayerToCheck, bool &bIsInSession)
void UAdvancedSessionsLibrary::IsPlayerInSession(UObject* WorldContextObject, const FBPUniqueNetId &PlayerToCheck, bool &bIsInSession)
{
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface();
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface(World);
if (!SessionInterface.IsValid())
{
@@ -151,7 +230,7 @@ void UAdvancedSessionsLibrary::IsPlayerInSession(const FBPUniqueNetId &PlayerToC
return;
}
bIsInSession = SessionInterface->IsPlayerInSession(GameSessionName, *PlayerToCheck.GetUniqueNetId());
bIsInSession = SessionInterface->IsPlayerInSession(NAME_GameSession, *PlayerToCheck.GetUniqueNetId());
}
FSessionsSearchSetting UAdvancedSessionsLibrary::MakeLiteralSessionSearchProperty(FSessionPropertyKeyPair SessionSearchProperty, EOnlineComparisonOpRedux ComparisonOp)
@@ -449,3 +528,14 @@ void UAdvancedSessionsLibrary::GetNumberOfNetworkPlayers(UObject* WorldContextOb
NumNetPlayers = TheWorld->GetGameState()->PlayerArray.Num();
}
bool UAdvancedSessionsLibrary::ServerTravel(UObject* WorldContextObject, const FString& FURL, bool bAbsolute, bool bShouldSkipGameNotify)
{
if (!WorldContextObject) return false;
//using a context object to get the world
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::ReturnNull);
if (!World) return false;
World->ServerTravel(FURL,bAbsolute,bShouldSkipGameNotify);
return true;
}

View File

@@ -1,5 +1,4 @@
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "CancelFindSessionsCallbackProxy.h"

View File

@@ -83,7 +83,7 @@ void UCreateSessionCallbackProxyAdvanced::Activate()
{
if (PlayerControllerWeakPtr.IsValid() && Helper.UserID.IsValid())
{
Sessions->CreateSession(*Helper.UserID, GameSessionName, Settings);
Sessions->CreateSession(*Helper.UserID, NAME_GameSession, Settings);
}
else
{
@@ -95,7 +95,7 @@ void UCreateSessionCallbackProxyAdvanced::Activate()
}
}
else
Sessions->CreateSession(0, GameSessionName, Settings);
Sessions->CreateSession(0, NAME_GameSession, Settings);
// OnCreateCompleted will get called, nothing more to do now
return;
@@ -125,7 +125,7 @@ void UCreateSessionCallbackProxyAdvanced::OnCreateCompleted(FName SessionName, b
if (bWasSuccessful)
{
StartCompleteDelegateHandle = Sessions->AddOnStartSessionCompleteDelegate_Handle(StartCompleteDelegate);
Sessions->StartSession(GameSessionName);
Sessions->StartSession(NAME_GameSession);
// OnStartCompleted will get called, nothing more to do now
return;

View File

@@ -1,5 +1,4 @@
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "EndSessionCallbackProxy.h"
@@ -30,12 +29,12 @@ void UEndSessionCallbackProxy::Activate()
auto Sessions = Helper.OnlineSub->GetSessionInterface();
if (Sessions.IsValid())
{
FNamedOnlineSession* Session = Sessions->GetNamedSession(GameSessionName);
FNamedOnlineSession* Session = Sessions->GetNamedSession(NAME_GameSession);
if (Session &&
Session->SessionState == EOnlineSessionState::InProgress)
{
DelegateHandle = Sessions->AddOnEndSessionCompleteDelegate_Handle(Delegate);
Sessions->EndSession(GameSessionName);
Sessions->EndSession(NAME_GameSession);
}
else
{

View File

@@ -41,7 +41,7 @@ void UFindFriendSessionCallbackProxy::Activate()
return;
}
IOnlineSessionPtr Sessions = Online::GetSessionInterface();
IOnlineSessionPtr Sessions = Online::GetSessionInterface(GetWorld());
if (Sessions.IsValid())
{
@@ -71,7 +71,7 @@ void UFindFriendSessionCallbackProxy::Activate()
void UFindFriendSessionCallbackProxy::OnFindFriendSessionCompleted(int32 LocalPlayer, bool bWasSuccessful, const TArray<FOnlineSessionSearchResult>& SessionInfo)
{
IOnlineSessionPtr Sessions = Online::GetSessionInterface();
IOnlineSessionPtr Sessions = Online::GetSessionInterface(GetWorld());
if (Sessions.IsValid())
Sessions->ClearOnFindFriendSessionCompleteDelegate_Handle(LocalPlayer, FindFriendSessionCompleteDelegateHandle);

View File

@@ -1,5 +1,4 @@
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "FindSessionsCallbackProxyAdvanced.h"

View File

@@ -30,7 +30,7 @@ UUpdateSessionCallbackProxyAdvanced* UUpdateSessionCallbackProxyAdvanced::Update
void UUpdateSessionCallbackProxyAdvanced::Activate()
{
IOnlineSessionPtr Sessions = Online::GetSessionInterface();
IOnlineSessionPtr Sessions = Online::GetSessionInterface(GetWorld());
if (Sessions.IsValid())
{
@@ -42,8 +42,8 @@ void UUpdateSessionCallbackProxyAdvanced::Activate()
}
// This gets the actual session itself
//FNamedOnlineSession * curSession = Sessions->GetNamedSession(GameSessionName);
FOnlineSessionSettings* Settings = Sessions->GetSessionSettings(GameSessionName);
//FNamedOnlineSession * curSession = Sessions->GetNamedSession(NAME_GameSession);
FOnlineSessionSettings* Settings = Sessions->GetSessionSettings(NAME_GameSession);
if (!Settings)
{
@@ -85,7 +85,7 @@ void UUpdateSessionCallbackProxyAdvanced::Activate()
}
}
Sessions->UpdateSession(GameSessionName, *Settings, bRefreshOnlineData);
Sessions->UpdateSession(NAME_GameSession, *Settings, bRefreshOnlineData);
// OnUpdateCompleted will get called, nothing more to do now
return;
@@ -101,7 +101,7 @@ void UUpdateSessionCallbackProxyAdvanced::Activate()
void UUpdateSessionCallbackProxyAdvanced::OnUpdateCompleted(FName SessionName, bool bWasSuccessful)
{
IOnlineSessionPtr Sessions = Online::GetSessionInterface();
IOnlineSessionPtr Sessions = Online::GetSessionInterface(GetWorld());
if (Sessions.IsValid())
{
Sessions->ClearOnUpdateSessionCompleteDelegate_Handle(OnUpdateSessionCompleteDelegateHandle);

View File

@@ -2,8 +2,8 @@
"FileVersion" : 3,
"FriendlyName" : "Advanced Steam Sessions",
"Version" : 4.20,
"VersionName": "4.20",
"Version" : 4.24,
"VersionName": "4.24",
"Description" : "Adds new blueprint functions to handle more advanced session operations in Steam. REQUIRES ADVANCED SESSIONS",
"Category" : "Advanced Sessions Plugin",
"CreatedBy" : "Joshua Statzer",

View File

@@ -197,7 +197,8 @@ public:
/** Needed for TMap::GetTypeHash() */
friend uint32 GetTypeHash(const FUniqueNetIdSteam2& A)
{
return (uint32)(A.UniqueNetId) + ((uint32)((A.UniqueNetId) >> 32) * 23);
return GetTypeHash(A.UniqueNetId);
//return (uint32)(A.UniqueNetId) + ((uint32)((A.UniqueNetId) >> 32) * 23);
}
/** Convenience cast to CSteamID */
@@ -241,11 +242,47 @@ DECLARE_LOG_CATEGORY_EXTERN(AdvancedSteamFriendsLog, Log, All);
UENUM(Blueprintable)
enum class SteamAvatarSize : uint8
{
SteamAvatar_INVALID = 0,
SteamAvatar_Small = 1,
SteamAvatar_Medium = 2,
SteamAvatar_Large = 3
};
UENUM(Blueprintable)
enum class ESteamUserOverlayType : uint8
{
/*Opens the overlay web browser to the specified user or groups profile.*/
steamid,
/*Opens a chat window to the specified user, or joins the group chat.*/
chat,
/*Opens a window to a Steam Trading session that was started with the ISteamEconomy / StartTrade Web API.*/
jointrade,
/*Opens the overlay web browser to the specified user's stats.*/
stats,
/*Opens the overlay web browser to the specified user's achievements.*/
achievements,
/*Opens the overlay in minimal mode prompting the user to add the target user as a friend.*/
friendadd,
/*Opens the overlay in minimal mode prompting the user to remove the target friend.*/
friendremove,
/*Opens the overlay in minimal mode prompting the user to accept an incoming friend invite.*/
friendrequestaccept,
/*Opens the overlay in minimal mode prompting the user to ignore an incoming friend invite.*/
friendrequestignore
};
static FString EnumToString(const FString& enumName, uint8 value)
{
const UEnum* EnumPtr = FindObject<UEnum>(ANY_PACKAGE, *enumName, true);
if (!EnumPtr)
return FString();
FString EnumName = EnumPtr->GetNameStringByIndex(value);
return EnumName;
}
USTRUCT(BlueprintType, Category = "Online|SteamAPI|SteamGroups")
struct FBPSteamGroupInfo
{
@@ -283,6 +320,10 @@ public:
// Preloads the avatar and name of a steam friend, return whether it is already available or not, STEAM ONLY, Takes time to actually load everything after this is called.
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|SteamAPI")
static bool RequestSteamFriendInfo(const FBPUniqueNetId UniqueNetId, bool bRequireNameOnly = false);
// Opens the steam overlay to go to the specified user dialog
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|SteamAPI")
static bool OpenSteamUserOverlay(const FBPUniqueNetId UniqueNetId, ESteamUserOverlayType DialogType);
// Gets the level of a friends steam account, STEAM ONLY, Returns -1 if the steam level is not known, might need RequestSteamFriendInfo called first.
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|SteamAPI")
@@ -296,6 +337,10 @@ public:
UFUNCTION(BlueprintPure, Category = "Online|AdvancedFriends|SteamAPI")
static FBPUniqueNetId CreateSteamIDFromString(const FString SteamID64);
// Retreives the local steam ID from steam
UFUNCTION(BlueprintPure, Category = "Online|AdvancedFriends|SteamAPI")
static FBPUniqueNetId GetLocalSteamIDFromSteam();
/* Gets the current game played by a friend - AppID is int32 even though steam ids are uint32, can't be helped in blueprint currently
* can use the AppID with the WebAPI GetAppList request.
*/

View File

@@ -6,6 +6,10 @@
#include "Kismet/BlueprintFunctionLibrary.h"
#include "Online.h"
#include "OnlineSubsystem.h"
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
#include "steam/isteamugc.h"
#include "steam/isteamremotestorage.h"
#endif
#include "Interfaces/OnlineSessionInterface.h"
// @todo Steam: Steam headers trigger secure-C-runtime warnings in Visual C++. Rather than mess with _CRT_SECURE_NO_WARNINGS, we'll just
@@ -79,6 +83,7 @@ public:
UENUM(BlueprintType)
enum class FBPSteamResult : uint8
{
K_EResultInvalid = 0,
k_EResultOK = 1, // success
k_EResultFail = 2, // generic failure
k_EResultNoConnection = 3, // no/failed network connection
@@ -203,11 +208,22 @@ struct FBPSteamWorkshopItemDetails
GENERATED_USTRUCT_BODY()
public:
FBPSteamWorkshopItemDetails()
{
ResultOfRequest = FBPSteamResult::k_EResultOK;
FileType = FBPWorkshopFileType::k_EWorkshopFileTypeMax;
CreatorAppID = 0;
ConsumerAppID = 0;
VotesUp = 0;
VotesDown = 0;
CalculatedScore = 0.f;
bBanned = false;
bAcceptedForUse = false;
bTagsTruncated = false;
}
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
FBPSteamWorkshopItemDetails(SteamUGCDetails_t &hUGCDetails)
{
ResultOfRequest = (FBPSteamResult)hUGCDetails.m_eResult;
@@ -245,6 +261,7 @@ public:
CreatorSteamID = FString::Printf(TEXT("%llu"), hUGCDetails.m_ulSteamIDOwner);
}
#endif
// Result of obtaining the details
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|AdvancedSteamWorkshop")

View File

@@ -11,7 +11,7 @@ DEFINE_LOG_CATEGORY(AdvancedSteamFriendsLog);
{
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid())
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
{
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("IsAFriend Had a bad UniqueNetId!"));
return 0;
@@ -91,7 +91,7 @@ void UAdvancedSteamFriendsLibrary::GetSteamFriendGamePlayed(const FBPUniqueNetId
{
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid())
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
{
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("GetSteamFriendGamePlayed Had a bad UniqueNetId!"));
Result = EBlueprintResultSwitch::OnFailure;
@@ -133,7 +133,7 @@ int32 UAdvancedSteamFriendsLibrary::GetFriendSteamLevel(const FBPUniqueNetId Uni
{
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid())
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
{
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("IsAFriend Had a bad UniqueNetId!"));
return 0;
@@ -154,7 +154,7 @@ FString UAdvancedSteamFriendsLibrary::GetSteamPersonaName(const FBPUniqueNetId U
{
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid())
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
{
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("GetSteamPersonaName Had a bad UniqueNetId!"));
return FString(TEXT(""));
@@ -196,10 +196,25 @@ FBPUniqueNetId UAdvancedSteamFriendsLibrary::CreateSteamIDFromString(const FStri
return netId;
}
FBPUniqueNetId UAdvancedSteamFriendsLibrary::GetLocalSteamIDFromSteam()
{
FBPUniqueNetId netId;
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
if (SteamAPI_Init())
{
TSharedPtr<const FUniqueNetId> SteamID(new const FUniqueNetIdSteam2(SteamUser()->GetSteamID()));
netId.SetUniqueNetId(SteamID);
}
#endif
return netId;
}
bool UAdvancedSteamFriendsLibrary::RequestSteamFriendInfo(const FBPUniqueNetId UniqueNetId, bool bRequireNameOnly)
{
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid())
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
{
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("RequestSteamFriendInfo Had a bad UniqueNetId!"));
return false;
@@ -217,10 +232,33 @@ bool UAdvancedSteamFriendsLibrary::RequestSteamFriendInfo(const FBPUniqueNetId U
return false;
}
bool UAdvancedSteamFriendsLibrary::OpenSteamUserOverlay(const FBPUniqueNetId UniqueNetId, ESteamUserOverlayType DialogType)
{
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
{
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("OpenSteamUserOverlay Had a bad UniqueNetId!"));
return false;
}
if (SteamAPI_Init())
{
uint64 id = *((uint64*)UniqueNetId.UniqueNetId->GetBytes());
FString DialogName = EnumToString("ESteamUserOverlayType", (uint8)DialogType);
SteamFriends()->ActivateGameOverlayToUser(TCHAR_TO_ANSI(*DialogName), id);
return true;
}
#endif
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("OpenSteamUserOverlay Couldn't init steamAPI!"));
return false;
}
UTexture2D * UAdvancedSteamFriendsLibrary::GetSteamFriendAvatar(const FBPUniqueNetId UniqueNetId, EBlueprintAsyncResultSwitch &Result, SteamAvatarSize AvatarSize)
{
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid())
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
{
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("GetSteamFriendAvatar Had a bad UniqueNetId!"));
Result = EBlueprintAsyncResultSwitch::OnFailure;
@@ -290,7 +328,7 @@ UTexture2D * UAdvancedSteamFriendsLibrary::GetSteamFriendAvatar(const FBPUniqueN
delete[] oAvatarRGBA;
//Setting some Parameters for the Texture and finally returning it
Avatar->PlatformData->NumSlices = 1;
Avatar->PlatformData->SetNumSlices(1);
Avatar->NeverStream = true;
//Avatar->CompressionSettings = TC_EditorIcon;

View File

@@ -4,6 +4,9 @@
#include "UObject/CoreOnline.h"
#include "AdvancedSteamFriendsLibrary.h"
#include "OnlineSubSystemHeader.h"
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
#include "steam/isteamfriends.h"
#endif
//#include "OnlineSubsystemSteamTypes.h"
//////////////////////////////////////////////////////////////////////////
@@ -42,12 +45,11 @@ void USteamRequestGroupOfficersCallbackProxy::Activate()
OnFailure.Broadcast(EmptyArray);
}
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
void USteamRequestGroupOfficersCallbackProxy::OnRequestGroupOfficerDetails(ClanOfficerListResponse_t *pResult, bool bIOFailure)
{
TArray<FBPSteamGroupOfficer> OfficerArray;
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
FOnlineSubsystemSteam* SteamSubsystem = (FOnlineSubsystemSteam*)(IOnlineSubsystem::Get(STEAM_SUBSYSTEM));
if (bIOFailure || !pResult || !pResult->m_bSuccess)
@@ -111,9 +113,9 @@ void USteamRequestGroupOfficersCallbackProxy::OnRequestGroupOfficerDetails(ClanO
});
}
}
#endif
// Should never hit this anyway
//OnFailure.Broadcast(OfficerArray);
}
#endif

View File

@@ -2,6 +2,9 @@
#include "SteamWSRequestUGCDetailsCallbackProxy.h"
#include "OnlineSubSystemHeader.h"
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
#include "steam/isteamugc.h"
#endif
//////////////////////////////////////////////////////////////////////////
// UEndSessionCallbackProxy
@@ -46,10 +49,9 @@ void USteamWSRequestUGCDetailsCallbackProxy::Activate()
OnFailure.Broadcast(FBPSteamWorkshopItemDetails());
}
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
void USteamWSRequestUGCDetailsCallbackProxy::OnUGCRequestUGCDetails(SteamUGCQueryCompleted_t *pResult, bool bIOFailure)
{
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
{
FOnlineSubsystemSteam* SteamSubsystem = (FOnlineSubsystemSteam*)(IOnlineSubsystem::Get(STEAM_SUBSYSTEM));
if (bIOFailure || !pResult || pResult->m_unNumResultsReturned <= 0)
@@ -91,9 +93,9 @@ void USteamWSRequestUGCDetailsCallbackProxy::OnUGCRequestUGCDetails(SteamUGCQuer
});
}
}
#endif
// Not needed, should never hit here
//OnFailure.Broadcast(FBPSteamWorkshopItemDetails());
}
#endif