#include "PlayerImpostor.h" #include "NakedDesireCharacter.h" #include "Kismet/GameplayStatics.h" #include "NakedDesire/Censorship/CensorshipComponent.h" #include "NakedDesire/Clothing/ClothingManager.h" #include "NakedDesire/Clothing/ClothingVisualsComponent.h" APlayerImpostor::APlayerImpostor() { PrimaryActorTick.bCanEverTick = false; RootSceneComponent = CreateDefaultSubobject(TEXT("Root")); SetRootComponent(RootSceneComponent); Mesh = CreateDefaultSubobject(TEXT("RootMesh")); Mesh->SetupAttachment(RootComponent); ClothingVisualsComponent = CreateDefaultSubobject(TEXT("Clothing Visuals Component")); BoobLCensorship = CreateDefaultSubobject(TEXT("Boob L Censorship")); BoobLCensorship->SetupAttachment(GetMesh(), FName(TEXT("boob_l"))); BoobRCensorship = CreateDefaultSubobject(TEXT("Boob R Censorship")); BoobRCensorship->SetupAttachment(GetMesh(), FName(TEXT("boob_r"))); VaginaCensorship = CreateDefaultSubobject(TEXT("Vagina Censorship")); VaginaCensorship->SetupAttachment(GetMesh(), FName(TEXT("pelvis"))); AnalCensorship = CreateDefaultSubobject(TEXT("Anal Censorship")); AnalCensorship->SetupAttachment(GetMesh(), FName(TEXT("pelvis"))); CensorshipComponent = CreateDefaultSubobject(TEXT("Censorship Component")); } void APlayerImpostor::BeginPlay() { Super::BeginPlay(); Player = Cast(UGameplayStatics::GetPlayerCharacter(GetWorld(), 0)); if (!Player) { return; } ClothingVisualsComponent->Initialize(GetMesh(), Player->ClothingManager); CensorshipComponent->Initialize(Player->ClothingManager, BoobLCensorship, BoobRCensorship, VaginaCensorship, AnalCensorship); }