diff --git a/AdvancedSessions/Source/AdvancedSessions/Classes/BlueprintDataDefinitions.h b/AdvancedSessions/Source/AdvancedSessions/Classes/BlueprintDataDefinitions.h index 5ed32ad..c0bce6f 100644 --- a/AdvancedSessions/Source/AdvancedSessions/Classes/BlueprintDataDefinitions.h +++ b/AdvancedSessions/Source/AdvancedSessions/Classes/BlueprintDataDefinitions.h @@ -1,6 +1,8 @@ #pragma once -#include "Engine.h" +#include "EngineMinimal.h" +#include "Engine/Engine.h" +#include "GameFramework/PlayerState.h" #include "Core.h" #include "OnlineSessionInterface.h" #include "OnlineSessionSettings.h" diff --git a/AdvancedSessions/Source/AdvancedSessions/Classes/OnlineSubSystemHeader.h b/AdvancedSessions/Source/AdvancedSessions/Classes/OnlineSubSystemHeader.h index 8e99714..b696f07 100644 --- a/AdvancedSessions/Source/AdvancedSessions/Classes/OnlineSubSystemHeader.h +++ b/AdvancedSessions/Source/AdvancedSessions/Classes/OnlineSubSystemHeader.h @@ -1,6 +1,6 @@ #pragma once -#include "Engine.h" +#include "EngineMinimal.h" #include "Core.h" #include "OnlineSessionInterface.h" #include "OnlineSessionSettings.h" diff --git a/AdvancedSessions/Source/AdvancedSessions/Private/AdvancedExternalUILibrary.cpp b/AdvancedSessions/Source/AdvancedSessions/Private/AdvancedExternalUILibrary.cpp index 7b6912d..d62318d 100644 --- a/AdvancedSessions/Source/AdvancedSessions/Private/AdvancedExternalUILibrary.cpp +++ b/AdvancedSessions/Source/AdvancedSessions/Private/AdvancedExternalUILibrary.cpp @@ -1,5 +1,6 @@ // Fill out your copyright notice in the Description page of Project Settings. #include "OnlineSubSystemHeader.h" +#include "Engine/LocalPlayer.h" #include "AdvancedExternalUILibrary.h" //General Log diff --git a/AdvancedSessions/Source/AdvancedSessions/Private/AdvancedSessionsLibrary.cpp b/AdvancedSessions/Source/AdvancedSessions/Private/AdvancedSessionsLibrary.cpp index cfc417d..8cfcde9 100644 --- a/AdvancedSessions/Source/AdvancedSessions/Private/AdvancedSessionsLibrary.cpp +++ b/AdvancedSessions/Source/AdvancedSessions/Private/AdvancedSessionsLibrary.cpp @@ -1,6 +1,8 @@ // Fill out your copyright notice in the Description page of Project Settings. #include "OnlineSubSystemHeader.h" #include "AdvancedSessionsLibrary.h" +#include "GameFramework/PlayerState.h" +#include "GameFramework/GameStateBase.h" //General Log DEFINE_LOG_CATEGORY(AdvancedSessionsLog); diff --git a/AdvancedSteamSessions/Source/AdvancedSteamSessions/Private/AdvancedSteamFriendsLibrary.cpp b/AdvancedSteamSessions/Source/AdvancedSteamSessions/Private/AdvancedSteamFriendsLibrary.cpp index 07feb69..b1fdd84 100644 --- a/AdvancedSteamSessions/Source/AdvancedSteamSessions/Private/AdvancedSteamFriendsLibrary.cpp +++ b/AdvancedSteamSessions/Source/AdvancedSteamSessions/Private/AdvancedSteamFriendsLibrary.cpp @@ -32,6 +32,56 @@ DEFINE_LOG_CATEGORY(AdvancedSteamFriendsLog); +// Clan functions, add in soon +/*int32 UAdvancedSteamFriendsLibrary::GetFriendSteamLevel(const FBPUniqueNetId UniqueNetId) +{ + +#if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX + if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid()) + { + UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("IsAFriend Had a bad UniqueNetId!")); + return 0; + } + + if (SteamAPI_Init()) + { + uint64 id = *((uint64*)UniqueNetId.UniqueNetId->GetBytes()); + + + // clan (group) iteration and access functions + //virtual int GetClanCount() = 0; + //virtual CSteamID GetClanByIndex(int iClan) = 0; + //virtual const char *GetClanName(CSteamID steamIDClan) = 0; + //virtual const char *GetClanTag(CSteamID steamIDClan) = 0; + // returns the most recent information we have about what's happening in a clan + //virtual bool GetClanActivityCounts(CSteamID steamIDClan, int *pnOnline, int *pnInGame, int *pnChatting) = 0; + // for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest + //virtual SteamAPICall_t DownloadClanActivityCounts(ARRAY_COUNT(cClansToRequest) CSteamID *psteamIDClans, int cClansToRequest) = 0; + + // requests information about a clan officer list + // when complete, data is returned in ClanOfficerListResponse_t call result + // this makes available the calls below + // you can only ask about clans that a user is a member of + // note that this won't download avatars automatically; if you get an officer, + // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar + //virtual SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) = 0; + + + // returns the steamID of the clan owner + //virtual CSteamID GetClanOwner(CSteamID steamIDClan) = 0; + // returns the number of officers in a clan (including the owner) + //virtual int GetClanOfficerCount(CSteamID steamIDClan) = 0; + // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount) + //virtual CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) = 0; + + + return SteamFriends()->GetFriendSteamLevel(id); + } +#endif + + return 0; +}*/ + int32 UAdvancedSteamFriendsLibrary::GetFriendSteamLevel(const FBPUniqueNetId UniqueNetId) { @@ -51,8 +101,6 @@ int32 UAdvancedSteamFriendsLibrary::GetFriendSteamLevel(const FBPUniqueNetId Uni #endif return 0; - - } FString UAdvancedSteamFriendsLibrary::GetSteamPersonaName(const FBPUniqueNetId UniqueNetId) @@ -185,7 +233,6 @@ 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);