mirror of
https://github.com/mordentral/AdvancedSessionsPlugin.git
synced 2025-12-09 23:53:03 +00:00
Merge branch 'UE5-ReleaseStaging'
This commit is contained in:
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
* text=auto
|
||||||
|
*.bat eol=crlf
|
||||||
@@ -1,19 +1,16 @@
|
|||||||
{
|
{
|
||||||
"FileVersion": 3,
|
"FileVersion": 3,
|
||||||
|
|
||||||
"FriendlyName": "Advanced Sessions",
|
"FriendlyName": "Advanced Sessions",
|
||||||
"Version" : 4.27,
|
"Version": 4,
|
||||||
"VersionName": "4.27",
|
"VersionName": "5.0",
|
||||||
"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",
|
||||||
"CreatedByURL": "N/A",
|
"CreatedByURL": "N/A",
|
||||||
|
"Modules": [
|
||||||
"Modules" :
|
|
||||||
[
|
|
||||||
{
|
{
|
||||||
"Name": "AdvancedSessions",
|
"Name": "AdvancedSessions",
|
||||||
"Type" : "RunTime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "PreDefault"
|
"LoadingPhase": "PreDefault"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -26,5 +23,12 @@
|
|||||||
"Name": "OnlineSubsystemUtils",
|
"Name": "OnlineSubsystemUtils",
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"DocsURL": "",
|
||||||
|
"MarketplaceURL": "",
|
||||||
|
"SupportURL": "",
|
||||||
|
"CanContainContent": false,
|
||||||
|
"IsBetaVersion": false,
|
||||||
|
"IsExperimentalVersion": false,
|
||||||
|
"Installed": false
|
||||||
}
|
}
|
||||||
8
AdvancedSessions/Config/FilterPlugin.ini
Normal file
8
AdvancedSessions/Config/FilterPlugin.ini
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[FilterPlugin]
|
||||||
|
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
|
||||||
|
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
|
||||||
|
;
|
||||||
|
; Examples:
|
||||||
|
; /README.txt
|
||||||
|
; /Extras/...
|
||||||
|
; /Binaries/ThirdParty/*.dll
|
||||||
@@ -206,5 +206,4 @@ public:
|
|||||||
UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = "Online|AdvancedSessions|Seamless", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
|
UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = "Online|AdvancedSessions|Seamless", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
|
||||||
static bool ServerTravel(UObject* WorldContextObject, const FString& InURL, bool bAbsolute, bool bShouldSkipGameNotify);
|
static bool ServerTravel(UObject* WorldContextObject, const FString& InURL, bool bAbsolute, bool bShouldSkipGameNotify);
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -251,17 +251,17 @@ struct FBPFriendPresenceInfo
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
bool bIsOnline;
|
bool bIsOnline = false;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
bool bIsPlaying;
|
bool bIsPlaying = false;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
bool bIsPlayingThisGame;
|
bool bIsPlayingThisGame = false;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
bool bIsJoinable;
|
bool bIsJoinable = false;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
bool bHasVoiceSupport;
|
bool bHasVoiceSupport = false;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
EBPOnlinePresenceState PresenceState;
|
EBPOnlinePresenceState PresenceState = EBPOnlinePresenceState::Offline;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
FString StatusString;
|
FString StatusString;
|
||||||
|
|
||||||
@@ -288,11 +288,11 @@ public:
|
|||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
FString RealName;
|
FString RealName;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
EBPOnlinePresenceState OnlineState;
|
EBPOnlinePresenceState OnlineState = EBPOnlinePresenceState::Offline;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
FBPUniqueNetId UniqueNetId;
|
FBPUniqueNetId UniqueNetId;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
bool bIsPlayingSameGame;
|
bool bIsPlayingSameGame = false;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
FBPFriendPresenceInfo PresenceInfo;
|
FBPFriendPresenceInfo PresenceInfo;
|
||||||
|
|
||||||
|
|||||||
@@ -531,11 +531,18 @@ void UAdvancedSessionsLibrary::GetNumberOfNetworkPlayers(UObject* WorldContextOb
|
|||||||
|
|
||||||
bool UAdvancedSessionsLibrary::ServerTravel(UObject* WorldContextObject, const FString& FURL, bool bAbsolute, bool bShouldSkipGameNotify)
|
bool UAdvancedSessionsLibrary::ServerTravel(UObject* WorldContextObject, const FString& FURL, bool bAbsolute, bool bShouldSkipGameNotify)
|
||||||
{
|
{
|
||||||
if (!WorldContextObject) return false;
|
if (!WorldContextObject)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//using a context object to get the world
|
//using a context object to get the world
|
||||||
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::ReturnNull);
|
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::ReturnNull);
|
||||||
if (!World) return false;
|
if (World)
|
||||||
|
{
|
||||||
World->ServerTravel(FURL, bAbsolute, bShouldSkipGameNotify);
|
World->ServerTravel(FURL, bAbsolute, bShouldSkipGameNotify);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@@ -64,7 +64,8 @@ void ULoginUserCallbackProxy::OnCompleted(int32 LocalUserNum, bool bWasSuccessfu
|
|||||||
if (PlayerControllerWeakPtr.IsValid())
|
if (PlayerControllerWeakPtr.IsValid())
|
||||||
{
|
{
|
||||||
ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerControllerWeakPtr->Player);
|
ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerControllerWeakPtr->Player);
|
||||||
auto uniqueId = UserId.AsShared();
|
|
||||||
|
FUniqueNetIdRepl UniqueID(UserId.AsShared());
|
||||||
|
|
||||||
if (Player)
|
if (Player)
|
||||||
{
|
{
|
||||||
@@ -74,15 +75,13 @@ void ULoginUserCallbackProxy::OnCompleted(int32 LocalUserNum, bool bWasSuccessfu
|
|||||||
{
|
{
|
||||||
Identity->ClearOnLoginCompleteDelegate_Handle(Player->GetControllerId(), DelegateHandle);
|
Identity->ClearOnLoginCompleteDelegate_Handle(Player->GetControllerId(), DelegateHandle);
|
||||||
}
|
}
|
||||||
Player->SetCachedUniqueNetId(uniqueId);
|
Player->SetCachedUniqueNetId(UniqueID);
|
||||||
}
|
}
|
||||||
|
|
||||||
APlayerState* State = PlayerControllerWeakPtr->PlayerState;
|
if (APlayerState* State = PlayerControllerWeakPtr->PlayerState)
|
||||||
|
|
||||||
if (State)
|
|
||||||
{
|
{
|
||||||
// Update UniqueId. See also ShowLoginUICallbackProxy.cpp
|
// Update UniqueId. See also ShowLoginUICallbackProxy.cpp
|
||||||
State->SetUniqueId((const FUniqueNetIdPtr&) uniqueId);
|
State->SetUniqueId(UniqueID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"FileVersion" : 3,
|
"FileVersion" : 3,
|
||||||
|
|
||||||
"FriendlyName" : "Advanced Steam Sessions",
|
"FriendlyName" : "Advanced Steam Sessions",
|
||||||
"Version" : 4.27,
|
"Version" : 5.0,
|
||||||
"VersionName": "4.27",
|
"VersionName": "5.0",
|
||||||
"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",
|
||||||
|
|||||||
8
AdvancedSteamSessions/Config/FilterPlugin.ini
Normal file
8
AdvancedSteamSessions/Config/FilterPlugin.ini
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[FilterPlugin]
|
||||||
|
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
|
||||||
|
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
|
||||||
|
;
|
||||||
|
; Examples:
|
||||||
|
; /README.txt
|
||||||
|
; /Extras/...
|
||||||
|
; /Binaries/ThirdParty/*.dll
|
||||||
@@ -13,7 +13,7 @@ public class AdvancedSteamSessions : ModuleRules
|
|||||||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem", "CoreUObject", "OnlineSubsystemUtils", "Networking", "Sockets", "AdvancedSessions"/*"Voice", "OnlineSubsystemSteam"*/ });
|
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem", "CoreUObject", "OnlineSubsystemUtils", "Networking", "Sockets", "AdvancedSessions"/*"Voice", "OnlineSubsystemSteam"*/ });
|
||||||
PrivateDependencyModuleNames.AddRange(new string[] { "OnlineSubsystem", "Sockets", "Networking", "OnlineSubsystemUtils" /*"Voice", "Steamworks","OnlineSubsystemSteam"*/});
|
PrivateDependencyModuleNames.AddRange(new string[] { "OnlineSubsystem", "Sockets", "Networking", "OnlineSubsystemUtils" /*"Voice", "Steamworks","OnlineSubsystemSteam"*/});
|
||||||
|
|
||||||
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32) || (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",/*"Voice",*/ "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
|
||||||
|
|||||||
@@ -297,11 +297,11 @@ public:
|
|||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
||||||
FString GroupTag;
|
FString GroupTag;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
||||||
int32 numOnline;
|
int32 numOnline = 0;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
||||||
int32 numInGame;
|
int32 numInGame = 0;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
||||||
int32 numChatting;
|
int32 numChatting = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public:
|
|||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
||||||
FBPUniqueNetId OfficerUniqueNetID; // Uint64 representation
|
FBPUniqueNetId OfficerUniqueNetID; // Uint64 representation
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
||||||
bool bIsOwner;
|
bool bIsOwner = false;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -332,18 +332,22 @@ UTexture2D * UAdvancedSteamFriendsLibrary::GetSteamFriendAvatar(const FBPUniqueN
|
|||||||
|
|
||||||
UTexture2D* Avatar = UTexture2D::CreateTransient(Width, Height, PF_R8G8B8A8);
|
UTexture2D* Avatar = UTexture2D::CreateTransient(Width, Height, PF_R8G8B8A8);
|
||||||
// Switched to a Memcpy instead of byte by byte transer
|
// Switched to a Memcpy instead of byte by byte transer
|
||||||
uint8* MipData = (uint8*)Avatar->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
|
|
||||||
|
if (FTexturePlatformData* PlatformData = Avatar->GetPlatformData())
|
||||||
|
{
|
||||||
|
uint8* MipData = (uint8*)PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
|
||||||
FMemory::Memcpy(MipData, (void*)oAvatarRGBA, Height * Width * 4);
|
FMemory::Memcpy(MipData, (void*)oAvatarRGBA, Height * Width * 4);
|
||||||
Avatar->PlatformData->Mips[0].BulkData.Unlock();
|
PlatformData->Mips[0].BulkData.Unlock();
|
||||||
|
|
||||||
// Original implementation was missing this!!
|
// Original implementation was missing this!!
|
||||||
// the hell man......
|
// the hell man......
|
||||||
delete[] oAvatarRGBA;
|
delete[] oAvatarRGBA;
|
||||||
|
|
||||||
//Setting some Parameters for the Texture and finally returning it
|
//Setting some Parameters for the Texture and finally returning it
|
||||||
Avatar->PlatformData->SetNumSlices(1);
|
PlatformData->SetNumSlices(1);
|
||||||
Avatar->NeverStream = true;
|
Avatar->NeverStream = true;
|
||||||
//Avatar->CompressionSettings = TC_EditorIcon;
|
//Avatar->CompressionSettings = TC_EditorIcon;
|
||||||
|
}
|
||||||
|
|
||||||
Avatar->UpdateResource();
|
Avatar->UpdateResource();
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
||||||
|
|
||||||
#include "SteamRequestGroupOfficersCallbackProxy.h"
|
#include "SteamRequestGroupOfficersCallbackProxy.h"
|
||||||
#include "UObject/CoreOnline.h"
|
#include "Online/CoreOnline.h"
|
||||||
#include "AdvancedSteamFriendsLibrary.h"
|
#include "AdvancedSteamFriendsLibrary.h"
|
||||||
#include "OnlineSubSystemHeader.h"
|
#include "OnlineSubSystemHeader.h"
|
||||||
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
|
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
|
||||||
|
|||||||
Reference in New Issue
Block a user