3 Commits

Author SHA1 Message Date
mordentral
525e6411a6 Added OpenSteamUserOverlay to the AdvancedSteamFriendsLibrary
Former-commit-id: d68e0533494ae204e8d7583601308fcd8f95e64a
2019-01-15 12:56:03 -05:00
mordentral
6b4ac8d00c Adding extended comment to create advanced session, thanks rumbleball
Former-commit-id: a0a869c888e5da22a5fa730f6f57073df8ef539c
2018-12-05 09:49:57 -05:00
mordentral
50752d2a95 Locking 4.20
Former-commit-id: c5f97212cf5ea990d183c5e49970c9c1d1b50cec
2018-11-07 14:13:44 -05:00
7 changed files with 137 additions and 173 deletions

View File

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

View File

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

View File

@@ -197,8 +197,7 @@ public:
/** Needed for TMap::GetTypeHash() */ /** Needed for TMap::GetTypeHash() */
friend uint32 GetTypeHash(const FUniqueNetIdSteam2& A) friend uint32 GetTypeHash(const FUniqueNetIdSteam2& A)
{ {
return GetTypeHash(A.UniqueNetId); return (uint32)(A.UniqueNetId) + ((uint32)((A.UniqueNetId) >> 32) * 23);
//return (uint32)(A.UniqueNetId) + ((uint32)((A.UniqueNetId) >> 32) * 23);
} }
/** Convenience cast to CSteamID */ /** Convenience cast to CSteamID */
@@ -336,10 +335,6 @@ public:
UFUNCTION(BlueprintPure, Category = "Online|AdvancedFriends|SteamAPI") UFUNCTION(BlueprintPure, Category = "Online|AdvancedFriends|SteamAPI")
static FBPUniqueNetId CreateSteamIDFromString(const FString SteamID64); 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 /* 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. * can use the AppID with the WebAPI GetAppList request.
*/ */

View File

@@ -6,8 +6,6 @@
#include "Kismet/BlueprintFunctionLibrary.h" #include "Kismet/BlueprintFunctionLibrary.h"
#include "Online.h" #include "Online.h"
#include "OnlineSubsystem.h" #include "OnlineSubsystem.h"
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
#endif
#include "Interfaces/OnlineSessionInterface.h" #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 // @todo Steam: Steam headers trigger secure-C-runtime warnings in Visual C++. Rather than mess with _CRT_SECURE_NO_WARNINGS, we'll just
@@ -205,22 +203,11 @@ struct FBPSteamWorkshopItemDetails
GENERATED_USTRUCT_BODY() GENERATED_USTRUCT_BODY()
public: public:
FBPSteamWorkshopItemDetails() 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) FBPSteamWorkshopItemDetails(SteamUGCDetails_t &hUGCDetails)
{ {
ResultOfRequest = (FBPSteamResult)hUGCDetails.m_eResult; ResultOfRequest = (FBPSteamResult)hUGCDetails.m_eResult;
@@ -258,7 +245,6 @@ public:
CreatorSteamID = FString::Printf(TEXT("%llu"), hUGCDetails.m_ulSteamIDOwner); CreatorSteamID = FString::Printf(TEXT("%llu"), hUGCDetails.m_ulSteamIDOwner);
} }
#endif
// Result of obtaining the details // Result of obtaining the details
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|AdvancedSteamWorkshop") UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|AdvancedSteamWorkshop")

View File

@@ -196,21 +196,6 @@ FBPUniqueNetId UAdvancedSteamFriendsLibrary::CreateSteamIDFromString(const FStri
return netId; 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) bool UAdvancedSteamFriendsLibrary::RequestSteamFriendInfo(const FBPUniqueNetId UniqueNetId, bool bRequireNameOnly)
{ {
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX #if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX

View File

@@ -4,8 +4,6 @@
#include "UObject/CoreOnline.h" #include "UObject/CoreOnline.h"
#include "AdvancedSteamFriendsLibrary.h" #include "AdvancedSteamFriendsLibrary.h"
#include "OnlineSubSystemHeader.h" #include "OnlineSubSystemHeader.h"
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
#endif
//#include "OnlineSubsystemSteamTypes.h" //#include "OnlineSubsystemSteamTypes.h"
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
@@ -44,11 +42,12 @@ void USteamRequestGroupOfficersCallbackProxy::Activate()
OnFailure.Broadcast(EmptyArray); OnFailure.Broadcast(EmptyArray);
} }
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
void USteamRequestGroupOfficersCallbackProxy::OnRequestGroupOfficerDetails(ClanOfficerListResponse_t *pResult, bool bIOFailure) void USteamRequestGroupOfficersCallbackProxy::OnRequestGroupOfficerDetails(ClanOfficerListResponse_t *pResult, bool bIOFailure)
{ {
TArray<FBPSteamGroupOfficer> OfficerArray; TArray<FBPSteamGroupOfficer> OfficerArray;
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
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)
@@ -112,9 +111,9 @@ void USteamRequestGroupOfficersCallbackProxy::OnRequestGroupOfficerDetails(ClanO
}); });
} }
} }
#endif
// Should never hit this anyway // Should never hit this anyway
//OnFailure.Broadcast(OfficerArray); //OnFailure.Broadcast(OfficerArray);
} }
#endif

View File

@@ -2,8 +2,6 @@
#include "SteamWSRequestUGCDetailsCallbackProxy.h" #include "SteamWSRequestUGCDetailsCallbackProxy.h"
#include "OnlineSubSystemHeader.h" #include "OnlineSubSystemHeader.h"
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
#endif
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// UEndSessionCallbackProxy // UEndSessionCallbackProxy
@@ -48,9 +46,10 @@ void USteamWSRequestUGCDetailsCallbackProxy::Activate()
OnFailure.Broadcast(FBPSteamWorkshopItemDetails()); OnFailure.Broadcast(FBPSteamWorkshopItemDetails());
} }
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
void USteamWSRequestUGCDetailsCallbackProxy::OnUGCRequestUGCDetails(SteamUGCQueryCompleted_t *pResult, bool bIOFailure) void USteamWSRequestUGCDetailsCallbackProxy::OnUGCRequestUGCDetails(SteamUGCQueryCompleted_t *pResult, bool bIOFailure)
{ {
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
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)
@@ -92,9 +91,9 @@ void USteamWSRequestUGCDetailsCallbackProxy::OnUGCRequestUGCDetails(SteamUGCQuer
}); });
} }
} }
#endif
// Not needed, should never hit here // Not needed, should never hit here
//OnFailure.Broadcast(FBPSteamWorkshopItemDetails()); //OnFailure.Broadcast(FBPSteamWorkshopItemDetails());
} }
#endif