mirror of
https://github.com/mordentral/AdvancedSessionsPlugin.git
synced 2025-10-26 18:04:07 +00:00
Compare commits
36 Commits
4.27-Locke
...
5.0-Locked
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76e08581f5 | ||
|
|
382ed08217 | ||
|
|
f760855494 | ||
|
|
fe76b60b2e | ||
|
|
7f1b47f42d | ||
|
|
3ac5d6c664 | ||
|
|
fd33fc34a5 | ||
|
|
bc26be2a12 | ||
|
|
936532f1a0 | ||
|
|
64710df075 | ||
|
|
ab9de1b344 | ||
|
|
bf4d99cba8 | ||
|
|
f7f56e7038 | ||
|
|
90fff579ba | ||
|
|
e1ed0f22b6 | ||
|
|
0de641f7d9 | ||
|
|
295ab98a91 | ||
|
|
18475eb2ef | ||
|
|
9784cd2f01 | ||
|
|
2e43a65acd | ||
|
|
09bbe211a8 | ||
|
|
fded4d065b | ||
|
|
b0ae86b017 | ||
|
|
4d913be381 | ||
|
|
8192f73ca7 | ||
|
|
f2a33fe1c6 | ||
|
|
c59f4bba43 | ||
|
|
7b21ee2344 | ||
|
|
b72b0d59fe | ||
|
|
5b2260079c | ||
|
|
c4df122248 | ||
|
|
6065bd9a36 | ||
|
|
6c392ee1fb | ||
|
|
4b7cffc1c0 | ||
|
|
ce25430643 | ||
|
|
dfb5ad544a |
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
* text=auto
|
||||
*.bat eol=crlf
|
||||
@@ -1,22 +1,19 @@
|
||||
{
|
||||
"FileVersion" : 3,
|
||||
|
||||
"FriendlyName" : "Advanced Sessions",
|
||||
"Version" : 4.27,
|
||||
"VersionName": "4.27",
|
||||
"Description" : "Adds new blueprint functions to handle more advanced session operations.",
|
||||
"Category" : "Advanced Sessions Plugin",
|
||||
"CreatedBy" : "Joshua Statzer",
|
||||
"CreatedByURL" : "N/A",
|
||||
|
||||
"Modules" :
|
||||
[
|
||||
{
|
||||
"Name" : "AdvancedSessions",
|
||||
"Type" : "RunTime",
|
||||
"LoadingPhase" : "PreDefault"
|
||||
}
|
||||
],
|
||||
"FileVersion": 3,
|
||||
"FriendlyName": "Advanced Sessions",
|
||||
"Version": 4,
|
||||
"VersionName": "5.0",
|
||||
"Description": "Adds new blueprint functions to handle more advanced session operations.",
|
||||
"Category": "Advanced Sessions Plugin",
|
||||
"CreatedBy": "Joshua Statzer",
|
||||
"CreatedByURL": "N/A",
|
||||
"Modules": [
|
||||
{
|
||||
"Name": "AdvancedSessions",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "PreDefault"
|
||||
}
|
||||
],
|
||||
"Plugins": [
|
||||
{
|
||||
"Name": "OnlineSubsystem",
|
||||
@@ -26,5 +23,12 @@
|
||||
"Name": "OnlineSubsystemUtils",
|
||||
"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
|
||||
@@ -210,5 +210,4 @@ public:
|
||||
UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = "Online|AdvancedSessions|Seamless", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
|
||||
static bool ServerTravel(UObject* WorldContextObject, const FString& InURL, bool bAbsolute, bool bShouldSkipGameNotify);
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -251,17 +251,17 @@ struct FBPFriendPresenceInfo
|
||||
public:
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||
bool bIsOnline;
|
||||
bool bIsOnline = false;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||
bool bIsPlaying;
|
||||
bool bIsPlaying = false;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||
bool bIsPlayingThisGame;
|
||||
bool bIsPlayingThisGame = false;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||
bool bIsJoinable;
|
||||
bool bIsJoinable = false;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||
bool bHasVoiceSupport;
|
||||
bool bHasVoiceSupport = false;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||
EBPOnlinePresenceState PresenceState;
|
||||
EBPOnlinePresenceState PresenceState = EBPOnlinePresenceState::Offline;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||
FString StatusString;
|
||||
|
||||
@@ -288,11 +288,11 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||
FString RealName;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||
EBPOnlinePresenceState OnlineState;
|
||||
EBPOnlinePresenceState OnlineState = EBPOnlinePresenceState::Offline;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||
FBPUniqueNetId UniqueNetId;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||
bool bIsPlayingSameGame;
|
||||
bool bIsPlayingSameGame = false;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||
FBPFriendPresenceInfo PresenceInfo;
|
||||
|
||||
|
||||
@@ -27,17 +27,17 @@ 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 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 bStartAfterCreate Set to true to start the session after it's created.
|
||||
* @param bStartAfterCreate Set to true to start the session after it's created. If false you need to manually call StartSession when ready.
|
||||
*/
|
||||
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);
|
||||
|
||||
// UOnlineBlueprintCallProxyBase interface
|
||||
virtual void Activate() override;
|
||||
// End of UOnlineBlueprintCallProxyBase interface
|
||||
|
||||
private:
|
||||
// Internal callback when session creation completes, calls StartSession
|
||||
// Internal callback when session creation completes, optionally calls StartSession
|
||||
void OnCreateCompleted(FName SessionName, bool bWasSuccessful);
|
||||
|
||||
// Internal callback when session start completes
|
||||
|
||||
@@ -7,11 +7,6 @@
|
||||
#include "BlueprintDataDefinitions.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)
|
||||
class UFindSessionsCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase
|
||||
{
|
||||
|
||||
@@ -21,8 +21,8 @@ class ULoginUserCallbackProxy : public UOnlineBlueprintCallProxyBase
|
||||
FEmptyOnlineDelegate OnFailure;
|
||||
|
||||
// Logs into the identity interface
|
||||
UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true", WorldContext = "WorldContextObject", AdvancedDisplay = "AuthType"), Category = "Online|AdvancedIdentity")
|
||||
static ULoginUserCallbackProxy* LoginUser(UObject* WorldContextObject, class APlayerController* PlayerController, FString UserID, FString UserToken, FString AuthType);
|
||||
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject", AdvancedDisplay = "AuthType"), Category = "Online|AdvancedIdentity")
|
||||
static ULoginUserCallbackProxy* LoginUser(UObject* WorldContextObject, class APlayerController* PlayerController, FString UserID, FString UserToken, FString AuthType);
|
||||
|
||||
// UOnlineBlueprintCallProxyBase interface
|
||||
virtual void Activate() override;
|
||||
|
||||
@@ -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
|
||||
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, bool bShouldAdvertise = true);
|
||||
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);
|
||||
|
||||
// UOnlineBlueprintCallProxyBase interface
|
||||
virtual void Activate() override;
|
||||
@@ -38,30 +38,28 @@ private:
|
||||
FDelegateHandle OnUpdateSessionCompleteDelegateHandle;
|
||||
|
||||
// Number of public connections
|
||||
int NumPublicConnections = 100;
|
||||
int NumPublicConnections;
|
||||
|
||||
// Number of private connections
|
||||
int NumPrivateConnections = 0;
|
||||
int NumPrivateConnections;
|
||||
|
||||
// Whether or not to search LAN
|
||||
bool bUseLAN = false;
|
||||
bool bUseLAN;
|
||||
|
||||
// Whether or not to allow invites
|
||||
bool bAllowInvites = true;
|
||||
bool bAllowInvites;
|
||||
|
||||
// Store extra settings
|
||||
TArray<FSessionPropertyKeyPair> ExtraSettings;
|
||||
|
||||
// Whether to update the online data
|
||||
bool bRefreshOnlineData = true;
|
||||
bool bRefreshOnlineData;
|
||||
|
||||
// Allow joining in progress
|
||||
bool bAllowJoinInProgress = true;
|
||||
bool bAllowJoinInProgress;
|
||||
|
||||
// Update whether this is a dedicated server or not
|
||||
bool bDedicatedServer = false;
|
||||
|
||||
bool bShouldAdvertise = true;
|
||||
bool bDedicatedServer;
|
||||
|
||||
// The world context object in which this call is taking place
|
||||
UObject* WorldContextObject;
|
||||
|
||||
@@ -542,11 +542,17 @@ void UAdvancedSessionsLibrary::GetNumberOfNetworkPlayers(UObject* WorldContextOb
|
||||
|
||||
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
|
||||
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::ReturnNull);
|
||||
if (!World) return false;
|
||||
World->ServerTravel(FURL,bAbsolute,bShouldSkipGameNotify);
|
||||
return true;
|
||||
if (World)
|
||||
{
|
||||
return World->ServerTravel(FURL, bAbsolute, bShouldSkipGameNotify);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -44,12 +44,11 @@ void UAutoLoginUserCallbackProxy::OnCompleted(int32 LocalUserNum, bool bWasSucce
|
||||
Identity->ClearOnLoginCompleteDelegate_Handle(LocalUserNum, DelegateHandle);
|
||||
}
|
||||
|
||||
|
||||
if(APlayerController* PController = UGameplayStatics::GetPlayerController(WorldContextObject->GetWorld(), LocalUserNum))
|
||||
{
|
||||
ULocalPlayer* Player = Cast<ULocalPlayer>(PController->Player);
|
||||
|
||||
auto uniqueId = UserId.AsShared();
|
||||
FUniqueNetIdRepl uniqueId(UserId.AsShared());
|
||||
|
||||
if (Player)
|
||||
{
|
||||
@@ -59,7 +58,7 @@ void UAutoLoginUserCallbackProxy::OnCompleted(int32 LocalUserNum, bool bWasSucce
|
||||
if (APlayerState* State = PController->PlayerState)
|
||||
{
|
||||
// Update UniqueId. See also ShowLoginUICallbackProxy.cpp
|
||||
State->SetUniqueId((const FUniqueNetIdPtr&)uniqueId);
|
||||
State->SetUniqueId(uniqueId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ UCreateSessionCallbackProxyAdvanced::UCreateSessionCallbackProxyAdvanced(const F
|
||||
{
|
||||
}
|
||||
|
||||
UCreateSessionCallbackProxyAdvanced* UCreateSessionCallbackProxyAdvanced::CreateAdvancedSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, class APlayerController* PlayerController, int32 PublicConnections, int32 PrivateConnections, bool bUseLAN, bool bAllowInvites, bool bIsDedicatedServer, bool bUsePresence, bool bUseLobbiesIfAvailable, bool bAllowJoinViaPresence, bool bAllowJoinViaPresenceFriendsOnly, bool bAntiCheatProtected, bool bUsesStats, bool bShouldAdvertise, bool bUseLobbiesVoiceChatIfAvailable, bool bStartAfterCreate)
|
||||
UCreateSessionCallbackProxyAdvanced* UCreateSessionCallbackProxyAdvanced::CreateAdvancedSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair>& ExtraSettings, class APlayerController* PlayerController, int32 PublicConnections, int32 PrivateConnections, bool bUseLAN, bool bAllowInvites, bool bIsDedicatedServer, bool bUsePresence, bool bUseLobbiesIfAvailable, bool bAllowJoinViaPresence, bool bAllowJoinViaPresenceFriendsOnly, bool bAntiCheatProtected, bool bUsesStats, bool bShouldAdvertise, bool bUseLobbiesVoiceChatIfAvailable, bool bStartAfterCreate)
|
||||
{
|
||||
UCreateSessionCallbackProxyAdvanced* Proxy = NewObject<UCreateSessionCallbackProxyAdvanced>();
|
||||
Proxy->PlayerControllerWeakPtr = PlayerController;
|
||||
@@ -133,7 +133,7 @@ void UCreateSessionCallbackProxyAdvanced::OnCreateCompleted(FName SessionName, b
|
||||
|
||||
if (bWasSuccessful)
|
||||
{
|
||||
if(this->bStartAfterCreate)
|
||||
if (this->bStartAfterCreate)
|
||||
{
|
||||
UE_LOG_ONLINE_SESSION(Display, TEXT("Session creation completed. Automatic start is turned on, starting session now."));
|
||||
StartCompleteDelegateHandle = Sessions->AddOnStartSessionCompleteDelegate_Handle(StartCompleteDelegate);
|
||||
|
||||
@@ -129,7 +129,6 @@ void UFindSessionsCallbackProxyAdvanced::Activate()
|
||||
case EBPServerPresenceSearchType::AllServers:
|
||||
default:
|
||||
{
|
||||
// Only steam uses the separate searching flags currently
|
||||
//if (IOnlineSubsystem::DoesInstanceExist("STEAM"))
|
||||
//{
|
||||
bRunSecondSearch = true;
|
||||
@@ -199,7 +198,7 @@ void UFindSessionsCallbackProxyAdvanced::OnCompleted(bool bSuccess)
|
||||
|
||||
FBlueprintSessionResult BPResult;
|
||||
BPResult.OnlineResult = Result;
|
||||
SessionSearchResults.AddUnique(BPResult);
|
||||
SessionSearchResults.Add(BPResult);
|
||||
}
|
||||
OnSuccess.Broadcast(SessionSearchResults);
|
||||
return;
|
||||
@@ -218,7 +217,7 @@ void UFindSessionsCallbackProxyAdvanced::OnCompleted(bool bSuccess)
|
||||
|
||||
FBlueprintSessionResult BPResult;
|
||||
BPResult.OnlineResult = Result;
|
||||
SessionSearchResults.AddUnique(BPResult);
|
||||
SessionSearchResults.Add(BPResult);
|
||||
}
|
||||
if (!bRunSecondSearch)
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ void ULoginUserCallbackProxy::OnCompleted(int32 LocalUserNum, bool bWasSuccessfu
|
||||
{
|
||||
ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerControllerWeakPtr->Player);
|
||||
|
||||
auto uniqueId = UserId.AsShared();
|
||||
FUniqueNetIdRepl UniqueID(UserId.AsShared());
|
||||
|
||||
if (Player)
|
||||
{
|
||||
@@ -75,13 +75,13 @@ void ULoginUserCallbackProxy::OnCompleted(int32 LocalUserNum, bool bWasSuccessfu
|
||||
{
|
||||
Identity->ClearOnLoginCompleteDelegate_Handle(Player->GetControllerId(), DelegateHandle);
|
||||
}
|
||||
Player->SetCachedUniqueNetId(uniqueId);
|
||||
Player->SetCachedUniqueNetId(UniqueID);
|
||||
}
|
||||
|
||||
if (APlayerState* State = PlayerControllerWeakPtr->PlayerState)
|
||||
{
|
||||
// Update UniqueId. See also ShowLoginUICallbackProxy.cpp
|
||||
State->SetUniqueId((const FUniqueNetIdPtr&)uniqueId);
|
||||
State->SetUniqueId(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, bool bShouldAdvertise)
|
||||
UUpdateSessionCallbackProxyAdvanced* UUpdateSessionCallbackProxyAdvanced::UpdateSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, int32 PublicConnections, int32 PrivateConnections, bool bUseLAN, bool bAllowInvites, bool bAllowJoinInProgress, bool bRefreshOnlineData, bool bIsDedicatedServer)
|
||||
{
|
||||
UUpdateSessionCallbackProxyAdvanced* Proxy = NewObject<UUpdateSessionCallbackProxyAdvanced>();
|
||||
Proxy->NumPublicConnections = PublicConnections;
|
||||
@@ -24,7 +24,6 @@ UUpdateSessionCallbackProxyAdvanced* UUpdateSessionCallbackProxyAdvanced::Update
|
||||
Proxy->bRefreshOnlineData = bRefreshOnlineData;
|
||||
Proxy->bAllowJoinInProgress = bAllowJoinInProgress;
|
||||
Proxy->bDedicatedServer = bIsDedicatedServer;
|
||||
Proxy->bShouldAdvertise = bShouldAdvertise;
|
||||
return Proxy;
|
||||
}
|
||||
|
||||
@@ -61,7 +60,7 @@ void UUpdateSessionCallbackProxyAdvanced::Activate()
|
||||
//Settings->BuildUniqueId = GetBuildUniqueId();
|
||||
Settings->NumPublicConnections = NumPublicConnections;
|
||||
Settings->NumPrivateConnections = NumPrivateConnections;
|
||||
Settings->bShouldAdvertise = bShouldAdvertise;
|
||||
//Settings->bShouldAdvertise = true;
|
||||
Settings->bAllowJoinInProgress = bAllowJoinInProgress;
|
||||
Settings->bIsLANMatch = bUseLAN;
|
||||
//Settings->bUsesPresence = true;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"FileVersion" : 3,
|
||||
|
||||
"FriendlyName" : "Advanced Steam Sessions",
|
||||
"Version" : 4.27,
|
||||
"VersionName": "4.27",
|
||||
"Version" : 5.0,
|
||||
"VersionName": "5.0",
|
||||
"Description" : "Adds new blueprint functions to handle more advanced session operations in Steam. REQUIRES ADVANCED SESSIONS",
|
||||
"Category" : "Advanced Sessions Plugin",
|
||||
"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"*/ });
|
||||
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" });
|
||||
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")
|
||||
FString GroupTag;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
||||
int32 numOnline;
|
||||
int32 numOnline = 0;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
||||
int32 numInGame;
|
||||
int32 numInGame = 0;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
||||
int32 numChatting;
|
||||
int32 numChatting = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
|
||||
FBPUniqueNetId OfficerUniqueNetID; // Uint64 representation
|
||||
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);
|
||||
// Switched to a Memcpy instead of byte by byte transer
|
||||
uint8* MipData = (uint8*)Avatar->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
|
||||
FMemory::Memcpy(MipData, (void*)oAvatarRGBA, Height * Width * 4);
|
||||
Avatar->PlatformData->Mips[0].BulkData.Unlock();
|
||||
|
||||
// Original implementation was missing this!!
|
||||
// the hell man......
|
||||
delete[] oAvatarRGBA;
|
||||
if (FTexturePlatformData* PlatformData = Avatar->GetPlatformData())
|
||||
{
|
||||
uint8* MipData = (uint8*)PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
|
||||
FMemory::Memcpy(MipData, (void*)oAvatarRGBA, Height * Width * 4);
|
||||
PlatformData->Mips[0].BulkData.Unlock();
|
||||
|
||||
//Setting some Parameters for the Texture and finally returning it
|
||||
Avatar->PlatformData->SetNumSlices(1);
|
||||
Avatar->NeverStream = true;
|
||||
//Avatar->CompressionSettings = TC_EditorIcon;
|
||||
// Original implementation was missing this!!
|
||||
// the hell man......
|
||||
delete[] oAvatarRGBA;
|
||||
|
||||
//Setting some Parameters for the Texture and finally returning it
|
||||
PlatformData->SetNumSlices(1);
|
||||
Avatar->NeverStream = true;
|
||||
//Avatar->CompressionSettings = TC_EditorIcon;
|
||||
}
|
||||
|
||||
Avatar->UpdateResource();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#include "SteamRequestGroupOfficersCallbackProxy.h"
|
||||
#include "UObject/CoreOnline.h"
|
||||
#include "Online/CoreOnline.h"
|
||||
#include "AdvancedSteamFriendsLibrary.h"
|
||||
#include "OnlineSubSystemHeader.h"
|
||||
#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
|
||||
|
||||
Reference in New Issue
Block a user