mirror of
https://github.com/mordentral/AdvancedSessionsPlugin.git
synced 2025-10-23 08:24:18 +00:00
Removed all Engine.h direct references and replaced with individual header includes.
Should improve compile time. Also prepped for eventual clan support in SteamModule Former-commit-id: e136e7993ccc13525d638297bcb740ffa7cc96c2
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Engine.h"
|
#include "EngineMinimal.h"
|
||||||
|
#include "Engine/Engine.h"
|
||||||
|
#include "GameFramework/PlayerState.h"
|
||||||
#include "Core.h"
|
#include "Core.h"
|
||||||
#include "OnlineSessionInterface.h"
|
#include "OnlineSessionInterface.h"
|
||||||
#include "OnlineSessionSettings.h"
|
#include "OnlineSessionSettings.h"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Engine.h"
|
#include "EngineMinimal.h"
|
||||||
#include "Core.h"
|
#include "Core.h"
|
||||||
#include "OnlineSessionInterface.h"
|
#include "OnlineSessionInterface.h"
|
||||||
#include "OnlineSessionSettings.h"
|
#include "OnlineSessionSettings.h"
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
#include "OnlineSubSystemHeader.h"
|
#include "OnlineSubSystemHeader.h"
|
||||||
|
#include "Engine/LocalPlayer.h"
|
||||||
#include "AdvancedExternalUILibrary.h"
|
#include "AdvancedExternalUILibrary.h"
|
||||||
|
|
||||||
//General Log
|
//General Log
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
#include "OnlineSubSystemHeader.h"
|
#include "OnlineSubSystemHeader.h"
|
||||||
#include "AdvancedSessionsLibrary.h"
|
#include "AdvancedSessionsLibrary.h"
|
||||||
|
#include "GameFramework/PlayerState.h"
|
||||||
|
#include "GameFramework/GameStateBase.h"
|
||||||
|
|
||||||
//General Log
|
//General Log
|
||||||
DEFINE_LOG_CATEGORY(AdvancedSessionsLog);
|
DEFINE_LOG_CATEGORY(AdvancedSessionsLog);
|
||||||
|
@@ -32,6 +32,56 @@
|
|||||||
DEFINE_LOG_CATEGORY(AdvancedSteamFriendsLog);
|
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)
|
int32 UAdvancedSteamFriendsLibrary::GetFriendSteamLevel(const FBPUniqueNetId UniqueNetId)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -51,8 +101,6 @@ int32 UAdvancedSteamFriendsLibrary::GetFriendSteamLevel(const FBPUniqueNetId Uni
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FString UAdvancedSteamFriendsLibrary::GetSteamPersonaName(const FBPUniqueNetId UniqueNetId)
|
FString UAdvancedSteamFriendsLibrary::GetSteamPersonaName(const FBPUniqueNetId UniqueNetId)
|
||||||
@@ -185,7 +233,6 @@ 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);
|
uint8* MipData = (uint8*)Avatar->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
|
||||||
FMemory::Memcpy(MipData, (void*)oAvatarRGBA, Height * Width * 4);
|
FMemory::Memcpy(MipData, (void*)oAvatarRGBA, Height * Width * 4);
|
||||||
|
Reference in New Issue
Block a user