// Copyright Pacificao. All Rights Reserved. #include "AgrarianShelterActor.h" #include "AgrarianPersistentActorComponent.h" #include "Components/BoxComponent.h" #include "Components/StaticMeshComponent.h" AAgrarianShelterActor::AAgrarianShelterActor() { bReplicates = true; Mesh = CreateDefaultSubobject(TEXT("Mesh")); RootComponent = Mesh; ProtectionVolume = CreateDefaultSubobject(TEXT("ProtectionVolume")); ProtectionVolume->SetupAttachment(RootComponent); ProtectionVolume->SetBoxExtent(FVector(250.0f, 250.0f, 180.0f)); ProtectionVolume->SetCollisionProfileName(TEXT("OverlapAllDynamic")); PersistentActorComponent = CreateDefaultSubobject(TEXT("PersistentActorComponent")); PersistentActorComponent->ActorTypeId = TEXT("primitive_shelter"); }