mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 08:02:23 -07:00
minor fixes
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include "CogSampleBasicActor.h"
|
||||
|
||||
#include "GameFramework/GameStateBase.h"
|
||||
#include "Net/Core/PushModel/PushModel.h"
|
||||
#include "Net/UnrealNetwork.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
ACogSampleBasicActor::ACogSampleBasicActor(const FObjectInitializer& ObjectInitializer)
|
||||
{
|
||||
@@ -22,6 +22,21 @@ void ACogSampleBasicActor::GetLifetimeReplicatedProps(TArray< FLifetimeProperty
|
||||
DOREPLIFETIME_WITH_PARAMS_FAST(ACogSampleBasicActor, Creator, Params);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void ACogSampleBasicActor::BeginPlay()
|
||||
{
|
||||
//-----------------------------------------------------
|
||||
// Set default creator before Super::BeginPlay()
|
||||
// so component can access it inside they BeginPlay()
|
||||
//-----------------------------------------------------
|
||||
if (Creator == nullptr)
|
||||
{
|
||||
Creator = GetWorld()->GetGameState();
|
||||
}
|
||||
|
||||
Super::BeginPlay();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void ACogSampleBasicActor::SetTeam(int32 Value)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user