lyra_game_ue/Source/LyraGame/Teams/LyraTeamPublicInfo.cpp
Goran Lazarevski 3bcab085f8 Initial commit
2025-03-20 11:06:26 +01:00

39 lines
921 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "LyraTeamPublicInfo.h"
#include "Net/UnrealNetwork.h"
#include "Teams/LyraTeamInfoBase.h"
#include UE_INLINE_GENERATED_CPP_BY_NAME(LyraTeamPublicInfo)
class FLifetimeProperty;
ALyraTeamPublicInfo::ALyraTeamPublicInfo(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
void ALyraTeamPublicInfo::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME_CONDITION(ThisClass, TeamDisplayAsset, COND_InitialOnly);
}
void ALyraTeamPublicInfo::SetTeamDisplayAsset(TObjectPtr<ULyraTeamDisplayAsset> NewDisplayAsset)
{
check(HasAuthority());
check(TeamDisplayAsset == nullptr);
TeamDisplayAsset = NewDisplayAsset;
TryRegisterWithTeamSubsystem();
}
void ALyraTeamPublicInfo::OnRep_TeamDisplayAsset()
{
TryRegisterWithTeamSubsystem();
}