mirror of
https://github.com/mordentral/AdvancedSessionsPlugin.git
synced 2025-10-27 10:24:19 +00:00
Compare commits
17 Commits
5.0-Locked
...
4.27-Locke
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d05e0a0d79 | ||
|
|
141b15c4e4 | ||
|
|
d61c55862f | ||
|
|
3d024ae1c7 | ||
|
|
baed5da63a | ||
|
|
13c795a6e5 | ||
|
|
ef928edaef | ||
|
|
6e6b596ec4 | ||
|
|
62c655cfa7 | ||
|
|
6c5f3b8b06 | ||
|
|
1dbd091e01 | ||
|
|
d1a0b48668 | ||
|
|
3b7ec6ba65 | ||
|
|
e60ee9cf40 | ||
|
|
af1eb9342f | ||
|
|
dbc60b5046 | ||
|
|
4ad2cf5139 |
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -1,2 +0,0 @@
|
|||||||
* text=auto
|
|
||||||
*.bat eol=crlf
|
|
||||||
@@ -1,16 +1,19 @@
|
|||||||
{
|
{
|
||||||
"FileVersion" : 3,
|
"FileVersion" : 3,
|
||||||
|
|
||||||
"FriendlyName" : "Advanced Sessions",
|
"FriendlyName" : "Advanced Sessions",
|
||||||
"Version": 4,
|
"Version" : 4.27,
|
||||||
"VersionName": "5.0",
|
"VersionName": "4.27",
|
||||||
"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"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -23,12 +26,5 @@
|
|||||||
"Name": "OnlineSubsystemUtils",
|
"Name": "OnlineSubsystemUtils",
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"DocsURL": "",
|
|
||||||
"MarketplaceURL": "",
|
|
||||||
"SupportURL": "",
|
|
||||||
"CanContainContent": false,
|
|
||||||
"IsBetaVersion": false,
|
|
||||||
"IsExperimentalVersion": false,
|
|
||||||
"Installed": false
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[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
|
|
||||||
@@ -210,4 +210,5 @@ 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 = false;
|
bool bIsOnline;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
bool bIsPlaying = false;
|
bool bIsPlaying;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
bool bIsPlayingThisGame = false;
|
bool bIsPlayingThisGame;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
bool bIsJoinable = false;
|
bool bIsJoinable;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
bool bHasVoiceSupport = false;
|
bool bHasVoiceSupport;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
EBPOnlinePresenceState PresenceState = EBPOnlinePresenceState::Offline;
|
EBPOnlinePresenceState PresenceState;
|
||||||
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::Offline;
|
EBPOnlinePresenceState OnlineState;
|
||||||
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 = false;
|
bool bIsPlayingSameGame;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
FBPFriendPresenceInfo PresenceInfo;
|
FBPFriendPresenceInfo PresenceInfo;
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class UCreateSessionCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase
|
|||||||
* @param bUseLobbiesIfAvailable Used to flag the subsystem to use a lobby api instead of general hosting if the API supports it, generally true on steam for listen servers and false for dedicated
|
* @param bUseLobbiesIfAvailable Used to flag the subsystem to use a lobby api instead of general hosting if the API supports it, generally true on steam for listen servers and false for dedicated
|
||||||
* @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.
|
* @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.
|
||||||
* @param bUseLobbiesVoiceChatIfAvailable Set to true to setup voice chat lobbies if the API supports it
|
* @param bUseLobbiesVoiceChatIfAvailable Set to true to setup voice chat lobbies if the API supports it
|
||||||
* @param bStartAfterCreate Set to true to start the session after it's created. If false you need to manually call StartSession when ready.
|
* @param bStartAfterCreate Set to true to start the session after it's created.
|
||||||
*/
|
*/
|
||||||
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject",AutoCreateRefTerm="ExtraSettings"), Category = "Online|AdvancedSessions")
|
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 bUseLobbiesIfAvailable = true, bool bAllowJoinViaPresence = true, bool bAllowJoinViaPresenceFriendsOnly = false, bool bAntiCheatProtected = false, bool bUsesStats = false, bool bShouldAdvertise = true, bool bUseLobbiesVoiceChatIfAvailable = false, bool bStartAfterCreate = true);
|
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 bUseLobbiesIfAvailable = true, bool bAllowJoinViaPresence = true, bool bAllowJoinViaPresenceFriendsOnly = false, bool bAntiCheatProtected = false, bool bUsesStats = false, bool bShouldAdvertise = true, bool bUseLobbiesVoiceChatIfAvailable = false, bool bStartAfterCreate = true);
|
||||||
@@ -37,7 +37,7 @@ class UCreateSessionCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase
|
|||||||
// End of UOnlineBlueprintCallProxyBase interface
|
// End of UOnlineBlueprintCallProxyBase interface
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Internal callback when session creation completes, optionally calls StartSession
|
// Internal callback when session creation completes, calls StartSession
|
||||||
void OnCreateCompleted(FName SessionName, bool bWasSuccessful);
|
void OnCreateCompleted(FName SessionName, bool bWasSuccessful);
|
||||||
|
|
||||||
// Internal callback when session start completes
|
// Internal callback when session start completes
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
#include "BlueprintDataDefinitions.h"
|
#include "BlueprintDataDefinitions.h"
|
||||||
#include "FindSessionsCallbackProxyAdvanced.generated.h"
|
#include "FindSessionsCallbackProxyAdvanced.generated.h"
|
||||||
|
|
||||||
|
FORCEINLINE bool operator==(const FBlueprintSessionResult& A, const FBlueprintSessionResult& B)
|
||||||
|
{
|
||||||
|
return (A.OnlineResult.IsValid() == B.OnlineResult.IsValid() && (A.OnlineResult.GetSessionIdStr() == B.OnlineResult.GetSessionIdStr()));
|
||||||
|
}
|
||||||
|
|
||||||
UCLASS(MinimalAPI)
|
UCLASS(MinimalAPI)
|
||||||
class UFindSessionsCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase
|
class UFindSessionsCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class UUpdateSessionCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase
|
|||||||
|
|
||||||
// Creates a session with the default online subsystem with advanced optional inputs, you MUST fill in all categories or it will pass in values that you didn't want as default values
|
// Creates a session with the default online subsystem with advanced optional inputs, you MUST fill in all categories or it will pass in values that you didn't want as default values
|
||||||
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject",AutoCreateRefTerm="ExtraSettings"), Category = "Online|AdvancedSessions")
|
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject",AutoCreateRefTerm="ExtraSettings"), Category = "Online|AdvancedSessions")
|
||||||
static UUpdateSessionCallbackProxyAdvanced* UpdateSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, int32 PublicConnections = 100, int32 PrivateConnections = 0, bool bUseLAN = false, bool bAllowInvites = false, bool bAllowJoinInProgress = false, bool bRefreshOnlineData = true, bool bIsDedicatedServer = false);
|
static UUpdateSessionCallbackProxyAdvanced* UpdateSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, int32 PublicConnections = 100, int32 PrivateConnections = 0, bool bUseLAN = false, bool bAllowInvites = false, bool bAllowJoinInProgress = false, bool bRefreshOnlineData = true, bool bIsDedicatedServer = false, bool bShouldAdvertise = true);
|
||||||
|
|
||||||
// UOnlineBlueprintCallProxyBase interface
|
// UOnlineBlueprintCallProxyBase interface
|
||||||
virtual void Activate() override;
|
virtual void Activate() override;
|
||||||
@@ -38,28 +38,30 @@ private:
|
|||||||
FDelegateHandle OnUpdateSessionCompleteDelegateHandle;
|
FDelegateHandle OnUpdateSessionCompleteDelegateHandle;
|
||||||
|
|
||||||
// Number of public connections
|
// Number of public connections
|
||||||
int NumPublicConnections;
|
int NumPublicConnections = 100;
|
||||||
|
|
||||||
// Number of private connections
|
// Number of private connections
|
||||||
int NumPrivateConnections;
|
int NumPrivateConnections = 0;
|
||||||
|
|
||||||
// Whether or not to search LAN
|
// Whether or not to search LAN
|
||||||
bool bUseLAN;
|
bool bUseLAN = false;
|
||||||
|
|
||||||
// Whether or not to allow invites
|
// Whether or not to allow invites
|
||||||
bool bAllowInvites;
|
bool bAllowInvites = true;
|
||||||
|
|
||||||
// Store extra settings
|
// Store extra settings
|
||||||
TArray<FSessionPropertyKeyPair> ExtraSettings;
|
TArray<FSessionPropertyKeyPair> ExtraSettings;
|
||||||
|
|
||||||
// Whether to update the online data
|
// Whether to update the online data
|
||||||
bool bRefreshOnlineData;
|
bool bRefreshOnlineData = true;
|
||||||
|
|
||||||
// Allow joining in progress
|
// Allow joining in progress
|
||||||
bool bAllowJoinInProgress;
|
bool bAllowJoinInProgress = true;
|
||||||
|
|
||||||
// Update whether this is a dedicated server or not
|
// Update whether this is a dedicated server or not
|
||||||
bool bDedicatedServer;
|
bool bDedicatedServer = false;
|
||||||
|
|
||||||
|
bool bShouldAdvertise = true;
|
||||||
|
|
||||||
// The world context object in which this call is taking place
|
// The world context object in which this call is taking place
|
||||||
UObject* WorldContextObject;
|
UObject* WorldContextObject;
|
||||||
|
|||||||
@@ -542,17 +542,11 @@ 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)
|
if (!WorldContextObject) return false;
|
||||||
{
|
|
||||||
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)
|
if (!World) return false;
|
||||||
{
|
World->ServerTravel(FURL,bAbsolute,bShouldSkipGameNotify);
|
||||||
return World->ServerTravel(FURL, bAbsolute, bShouldSkipGameNotify);
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
@@ -44,11 +44,12 @@ void UAutoLoginUserCallbackProxy::OnCompleted(int32 LocalUserNum, bool bWasSucce
|
|||||||
Identity->ClearOnLoginCompleteDelegate_Handle(LocalUserNum, DelegateHandle);
|
Identity->ClearOnLoginCompleteDelegate_Handle(LocalUserNum, DelegateHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(APlayerController* PController = UGameplayStatics::GetPlayerController(WorldContextObject->GetWorld(), LocalUserNum))
|
if(APlayerController* PController = UGameplayStatics::GetPlayerController(WorldContextObject->GetWorld(), LocalUserNum))
|
||||||
{
|
{
|
||||||
ULocalPlayer* Player = Cast<ULocalPlayer>(PController->Player);
|
ULocalPlayer* Player = Cast<ULocalPlayer>(PController->Player);
|
||||||
|
|
||||||
FUniqueNetIdRepl uniqueId(UserId.AsShared());
|
auto uniqueId = UserId.AsShared();
|
||||||
|
|
||||||
if (Player)
|
if (Player)
|
||||||
{
|
{
|
||||||
@@ -58,7 +59,7 @@ void UAutoLoginUserCallbackProxy::OnCompleted(int32 LocalUserNum, bool bWasSucce
|
|||||||
if (APlayerState* State = PController->PlayerState)
|
if (APlayerState* State = PController->PlayerState)
|
||||||
{
|
{
|
||||||
// Update UniqueId. See also ShowLoginUICallbackProxy.cpp
|
// Update UniqueId. See also ShowLoginUICallbackProxy.cpp
|
||||||
State->SetUniqueId(uniqueId);
|
State->SetUniqueId((const FUniqueNetIdPtr&)uniqueId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ void UFindSessionsCallbackProxyAdvanced::Activate()
|
|||||||
case EBPServerPresenceSearchType::AllServers:
|
case EBPServerPresenceSearchType::AllServers:
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
// Only steam uses the separate searching flags currently
|
||||||
//if (IOnlineSubsystem::DoesInstanceExist("STEAM"))
|
//if (IOnlineSubsystem::DoesInstanceExist("STEAM"))
|
||||||
//{
|
//{
|
||||||
bRunSecondSearch = true;
|
bRunSecondSearch = true;
|
||||||
@@ -198,7 +199,7 @@ void UFindSessionsCallbackProxyAdvanced::OnCompleted(bool bSuccess)
|
|||||||
|
|
||||||
FBlueprintSessionResult BPResult;
|
FBlueprintSessionResult BPResult;
|
||||||
BPResult.OnlineResult = Result;
|
BPResult.OnlineResult = Result;
|
||||||
SessionSearchResults.Add(BPResult);
|
SessionSearchResults.AddUnique(BPResult);
|
||||||
}
|
}
|
||||||
OnSuccess.Broadcast(SessionSearchResults);
|
OnSuccess.Broadcast(SessionSearchResults);
|
||||||
return;
|
return;
|
||||||
@@ -217,7 +218,7 @@ void UFindSessionsCallbackProxyAdvanced::OnCompleted(bool bSuccess)
|
|||||||
|
|
||||||
FBlueprintSessionResult BPResult;
|
FBlueprintSessionResult BPResult;
|
||||||
BPResult.OnlineResult = Result;
|
BPResult.OnlineResult = Result;
|
||||||
SessionSearchResults.Add(BPResult);
|
SessionSearchResults.AddUnique(BPResult);
|
||||||
}
|
}
|
||||||
if (!bRunSecondSearch)
|
if (!bRunSecondSearch)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ void ULoginUserCallbackProxy::OnCompleted(int32 LocalUserNum, bool bWasSuccessfu
|
|||||||
{
|
{
|
||||||
ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerControllerWeakPtr->Player);
|
ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerControllerWeakPtr->Player);
|
||||||
|
|
||||||
FUniqueNetIdRepl UniqueID(UserId.AsShared());
|
auto uniqueId = UserId.AsShared();
|
||||||
|
|
||||||
if (Player)
|
if (Player)
|
||||||
{
|
{
|
||||||
@@ -75,13 +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);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (APlayerState* State = PlayerControllerWeakPtr->PlayerState)
|
if (APlayerState* State = PlayerControllerWeakPtr->PlayerState)
|
||||||
{
|
{
|
||||||
// Update UniqueId. See also ShowLoginUICallbackProxy.cpp
|
// Update UniqueId. See also ShowLoginUICallbackProxy.cpp
|
||||||
State->SetUniqueId(UniqueID);
|
State->SetUniqueId((const FUniqueNetIdPtr&)uniqueId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ UUpdateSessionCallbackProxyAdvanced::UUpdateSessionCallbackProxyAdvanced(const F
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
UUpdateSessionCallbackProxyAdvanced* UUpdateSessionCallbackProxyAdvanced::UpdateSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, int32 PublicConnections, int32 PrivateConnections, bool bUseLAN, bool bAllowInvites, bool bAllowJoinInProgress, bool bRefreshOnlineData, bool bIsDedicatedServer)
|
UUpdateSessionCallbackProxyAdvanced* UUpdateSessionCallbackProxyAdvanced::UpdateSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, int32 PublicConnections, int32 PrivateConnections, bool bUseLAN, bool bAllowInvites, bool bAllowJoinInProgress, bool bRefreshOnlineData, bool bIsDedicatedServer, bool bShouldAdvertise)
|
||||||
{
|
{
|
||||||
UUpdateSessionCallbackProxyAdvanced* Proxy = NewObject<UUpdateSessionCallbackProxyAdvanced>();
|
UUpdateSessionCallbackProxyAdvanced* Proxy = NewObject<UUpdateSessionCallbackProxyAdvanced>();
|
||||||
Proxy->NumPublicConnections = PublicConnections;
|
Proxy->NumPublicConnections = PublicConnections;
|
||||||
@@ -24,6 +24,7 @@ UUpdateSessionCallbackProxyAdvanced* UUpdateSessionCallbackProxyAdvanced::Update
|
|||||||
Proxy->bRefreshOnlineData = bRefreshOnlineData;
|
Proxy->bRefreshOnlineData = bRefreshOnlineData;
|
||||||
Proxy->bAllowJoinInProgress = bAllowJoinInProgress;
|
Proxy->bAllowJoinInProgress = bAllowJoinInProgress;
|
||||||
Proxy->bDedicatedServer = bIsDedicatedServer;
|
Proxy->bDedicatedServer = bIsDedicatedServer;
|
||||||
|
Proxy->bShouldAdvertise = bShouldAdvertise;
|
||||||
return Proxy;
|
return Proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ void UUpdateSessionCallbackProxyAdvanced::Activate()
|
|||||||
//Settings->BuildUniqueId = GetBuildUniqueId();
|
//Settings->BuildUniqueId = GetBuildUniqueId();
|
||||||
Settings->NumPublicConnections = NumPublicConnections;
|
Settings->NumPublicConnections = NumPublicConnections;
|
||||||
Settings->NumPrivateConnections = NumPrivateConnections;
|
Settings->NumPrivateConnections = NumPrivateConnections;
|
||||||
//Settings->bShouldAdvertise = true;
|
Settings->bShouldAdvertise = bShouldAdvertise;
|
||||||
Settings->bAllowJoinInProgress = bAllowJoinInProgress;
|
Settings->bAllowJoinInProgress = bAllowJoinInProgress;
|
||||||
Settings->bIsLANMatch = bUseLAN;
|
Settings->bIsLANMatch = bUseLAN;
|
||||||
//Settings->bUsesPresence = true;
|
//Settings->bUsesPresence = true;
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"FileVersion" : 3,
|
"FileVersion" : 3,
|
||||||
|
|
||||||
"FriendlyName" : "Advanced Steam Sessions",
|
"FriendlyName" : "Advanced Steam Sessions",
|
||||||
"Version" : 5.0,
|
"Version" : 4.27,
|
||||||
"VersionName": "5.0",
|
"VersionName": "4.27",
|
||||||
"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",
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
[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.Linux) || (Target.Platform == UnrealTargetPlatform.Mac))
|
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32) || (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 = 0;
|
int32 numOnline;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
||||||
int32 numInGame = 0;
|
int32 numInGame;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
||||||
int32 numChatting = 0;
|
int32 numChatting;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 = false;
|
bool bIsOwner;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -332,22 +332,18 @@ 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);
|
||||||
PlatformData->Mips[0].BulkData.Unlock();
|
Avatar->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
|
||||||
PlatformData->SetNumSlices(1);
|
Avatar->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 "Online/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
|
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
|
||||||
|
|||||||
Reference in New Issue
Block a user