本文整理汇总了C++中IsPendingKill函数的典型用法代码示例。如果您正苦于以下问题:C++ IsPendingKill函数的具体用法?C++ IsPendingKill怎么用?C++ IsPendingKill使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsPendingKill函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EndTask
void UAbilityTask::EndTask()
{
if (!IsPendingKill())
{
OnDestroy(false);
}
}
示例2: GetCharacterMovement
void AMech_RPGCharacter::BeginPlay() {
Super::BeginPlay();
GetCharacterMovement()->SetAvoidanceEnabled(true);
if (IsPendingKill()) {
return;
}
if (!UseLoadout) {
//CreatePresetRole(StartingRole());
}
else {
SetupWithLoadout();
}
if (abilities.Num() > 0) {
SetCurrentAbility(abilities[0]);
}
//SetUpGroup();
SetUpWidgets();
if (OnPostBeginPlay.IsBound()) {
OnPostBeginPlay.Broadcast(this);
}
}
示例3: PostInitializeComponents
void APawn::PostInitializeComponents()
{
Super::PostInitializeComponents();
if (!IsPendingKill())
{
GetWorld()->AddPawn( this );
// Automatically add Controller to AI Pawns if we are allowed to.
if (AutoPossessPlayer == EAutoReceiveInput::Disabled)
{
if (AutoPossessAI != EAutoPossessAI::Disabled && Controller == NULL && GetNetMode() != NM_Client)
{
const bool bPlacedInWorld = (GetWorld()->bStartup);
if ((AutoPossessAI == EAutoPossessAI::PlacedInWorldOrSpawned) ||
(AutoPossessAI == EAutoPossessAI::PlacedInWorld && bPlacedInWorld) ||
(AutoPossessAI == EAutoPossessAI::Spawned && !bPlacedInWorld))
{
SpawnDefaultController();
}
}
}
// update movement component's nav agent values
UpdateNavAgent();
}
}
示例4: GetMesh
void ABaseCharacter::SetRagdollPhysics()
{
USkeletalMeshComponent* Mesh3P = GetMesh();
if (Mesh3P)
{
Mesh3P->SetCollisionProfileName(TEXT("Ragdoll"));
}
SetActorEnableCollision(true);
if (!IsPendingKill() || Mesh3P || Mesh3P->GetPhysicsAsset())
{
Mesh3P->SetAllBodiesSimulatePhysics(true);
Mesh3P->SetSimulatePhysics(true);
Mesh3P->WakeAllRigidBodies();
Mesh3P->bBlendPhysics = true;
SetLifeSpan(TimeAfterDeathBeforeDestroy);
}
else
{
// Immediately hide the pawn
TurnOff();
SetActorHiddenInGame(true);
SetLifeSpan(1.0f);
}
UCharacterMovementComponent* CharacterComp = Cast<UCharacterMovementComponent>(GetMovementComponent());
if (CharacterComp)
{
CharacterComp->StopMovementImmediately();
CharacterComp->DisableMovement();
CharacterComp->SetComponentTickEnabled(false);
}
}
示例5: checkf
void UActorComponent::DoDeferredRenderUpdates_Concurrent()
{
checkf(!HasAnyFlags(RF_Unreachable), TEXT("%s"), *GetFullName());
checkf(!IsTemplate(), TEXT("%s"), *GetFullName());
checkf(!IsPendingKill(), TEXT("%s"), *GetFullName());
if(!IsRegistered())
{
UE_LOG(LogActorComponent, Log, TEXT("UpdateComponent: (%s) Not registered, Aborting."), *GetPathName());
return;
}
if(bRenderStateDirty)
{
SCOPE_CYCLE_COUNTER(STAT_PostTickComponentRecreate);
RecreateRenderState_Concurrent();
checkf(!bRenderStateDirty, TEXT("Failed to route CreateRenderState_Concurrent (%s)"), *GetFullName());
}
else
{
SCOPE_CYCLE_COUNTER(STAT_PostTickComponentLW);
if(bRenderTransformDirty)
{
// Update the component's transform if the actor has been moved since it was last updated.
SendRenderTransform_Concurrent();
}
if(bRenderDynamicDataDirty)
{
SendRenderDynamicData_Concurrent();
}
}
}
示例6: TEXT
void UPawnActionsComponent::DescribeSelfToVisLog(FVisualLogEntry* Snapshot) const
{
static const FString Category = TEXT("PawnActions");
if (IsPendingKill())
{
return;
}
for (int32 PriorityIndex = 0; PriorityIndex < ActionStacks.Num(); ++PriorityIndex)
{
const UPawnAction* Action = ActionStacks[PriorityIndex].GetTop();
if (Action == NULL)
{
continue;
}
FVisualLogStatusCategory StatusCategory;
StatusCategory.Category = Category + TEXT(": ") + GetPriorityName(PriorityIndex);
while (Action)
{
StatusCategory.Add(Action->GetName(), Action->GetStateDescription());
Action = Action->GetParentAction();
}
Snapshot->Status.Add(StatusCategory);
}
}
示例7: PostInitProperties
void ANavigationData::PostInitProperties()
{
Super::PostInitProperties();
if (IsPendingKill() == true)
{
return;
}
if (HasAnyFlags(RF_ClassDefaultObject))
{
if (RuntimeGeneration == ERuntimeGenerationType::LegacyGeneration)
{
RuntimeGeneration = bRebuildAtRuntime_DEPRECATED ? ERuntimeGenerationType::Dynamic : ERuntimeGenerationType::Static;
}
}
else
{
bNetLoadOnClient = (*GEngine->NavigationSystemClass != nullptr) && (GEngine->NavigationSystemClass->GetDefaultObject<UNavigationSystem>()->ShouldLoadNavigationOnClient(this));
UWorld* WorldOuter = GetWorld();
if (WorldOuter != NULL && WorldOuter->GetNavigationSystem() != NULL)
{
WorldOuter->GetNavigationSystem()->RequestRegistration(this);
}
RenderingComp = ConstructRenderingComponent();
}
}
示例8: PostInitializeComponents
void ACharacter::PostInitializeComponents()
{
Super::PostInitializeComponents();
if (!IsPendingKill())
{
if (Mesh)
{
BaseTranslationOffset = Mesh->RelativeLocation;
BaseRotationOffset = Mesh->RelativeRotation.Quaternion();
// force animation tick after movement component updates
if (Mesh->PrimaryComponentTick.bCanEverTick && CharacterMovement)
{
Mesh->PrimaryComponentTick.AddPrerequisite(CharacterMovement, CharacterMovement->PrimaryComponentTick);
}
}
if (CharacterMovement && CapsuleComponent)
{
CharacterMovement->UpdateNavAgent(*CapsuleComponent);
}
if (Controller == NULL && GetNetMode() != NM_Client)
{
if (CharacterMovement && CharacterMovement->bRunPhysicsWithNoController)
{
CharacterMovement->SetDefaultMovementMode();
}
}
}
}
示例9: DrawDebugDataDelegate
void AGameplayDebuggerReplicator::DrawDebugDataDelegate(class UCanvas* Canvas, class APlayerController* PC)
{
#if ENABLED_GAMEPLAY_DEBUGGER
if (GetWorld() == nullptr || IsPendingKill() || Canvas == nullptr || Canvas->IsPendingKill())
{
return;
}
if (!LocalPlayerOwner || !IsActorTickEnabled())
{
return;
}
if (Canvas->SceneView != nullptr && !Canvas->SceneView->bIsGameView)
{
return;
}
if (GetWorld()->bPlayersOnly && Role == ROLE_Authority)
{
for (FConstPawnIterator Iterator = GetWorld()->GetPawnIterator(); Iterator; ++Iterator)
{
AActor* NewTarget = Cast<AActor>(*Iterator);
if (NewTarget->IsSelected() && GetSelectedActorToDebug() != NewTarget)
{
ServerSetActorToDebug(NewTarget);
}
}
}
DrawDebugData(Canvas, PC);
#endif
}
示例10: RegisterTargetDataCallbacks
void UAbilityTask_WaitTargetData::RegisterTargetDataCallbacks()
{
if (!ensure(IsPendingKill() == false))
{
return;
}
check(TargetClass);
check(Ability);
const AGameplayAbilityTargetActor* CDO = CastChecked<AGameplayAbilityTargetActor>(TargetClass->GetDefaultObject());
const bool bIsLocallyControlled = Ability->GetCurrentActorInfo()->IsLocallyControlled();
const bool bShouldProduceTargetDataOnServer = CDO->ShouldProduceTargetDataOnServer;
// If not locally controlled (server for remote client), see if TargetData was already sent
// else register callback for when it does get here.
if (!bIsLocallyControlled)
{
// Register with the TargetData callbacks if we are expecting client to send them
if (!bShouldProduceTargetDataOnServer)
{
FGameplayAbilitySpecHandle SpecHandle = GetAbilitySpecHandle();
FPredictionKey ActivationPredictionKey = GetActivationPredictionKey();
//Since multifire is supported, we still need to hook up the callbacks
AbilitySystemComponent->AbilityTargetDataSetDelegate(SpecHandle, ActivationPredictionKey ).AddUObject(this, &UAbilityTask_WaitTargetData::OnTargetDataReplicatedCallback);
AbilitySystemComponent->AbilityTargetDataCancelledDelegate(SpecHandle, ActivationPredictionKey ).AddUObject(this, &UAbilityTask_WaitTargetData::OnTargetDataReplicatedCancelledCallback);
AbilitySystemComponent->CallReplicatedTargetDataDelegatesIfSet(SpecHandle, ActivationPredictionKey );
SetWaitingOnRemotePlayerData();
}
}
}
示例11: GetOwner
void UActorComponent::ConsolidatedPostEditChange(const FPropertyChangedEvent& PropertyChangedEvent)
{
FComponentReregisterContext* ReregisterContext = nullptr;
if(EditReregisterContexts.RemoveAndCopyValue(this, ReregisterContext))
{
delete ReregisterContext;
AActor* MyOwner = GetOwner();
if ( MyOwner && !MyOwner->IsTemplate() && PropertyChangedEvent.ChangeType != EPropertyChangeType::Interactive )
{
MyOwner->RerunConstructionScripts();
}
}
else
{
// This means there are likely some stale elements left in there now, strip them out
for (auto It(EditReregisterContexts.CreateIterator()); It; ++It)
{
if (!It.Key().IsValid())
{
It.RemoveCurrent();
}
}
}
// The component or its outer could be pending kill when calling PostEditChange when applying a transaction.
// Don't do do a full recreate in this situation, and instead simply detach.
if( IsPendingKill() )
{
// @todo UE4 james should this call UnregisterComponent instead to remove itself from the RegisteredComponents array on the owner?
ExecuteUnregisterEvents();
World = NULL;
}
}
示例12: AbilityEnded
void UAbilityTask::AbilityEnded()
{
if (!IsPendingKill())
{
OnDestroy(true);
}
}
示例13: PostInitializeComponents
void APlayerStart::PostInitializeComponents()
{
Super::PostInitializeComponents();
if ( !IsPendingKill() && GetWorld()->GetAuthGameMode() )
{
GetWorld()->GetAuthGameMode()->AddPlayerStart(this);
}
}
示例14: PostInitializeComponents
void AAIController::PostInitializeComponents()
{
Super::PostInitializeComponents();
if (bWantsPlayerState && !IsPendingKill() && (GetNetMode() != NM_Client))
{
InitPlayerState();
}
}
示例15: PostEditUndo
void AGroupActor::PostEditUndo()
{
Super::PostEditUndo();
if (IsPendingKill())
{
GetWorld()->ActiveGroupActors.RemoveSwap(this);
}
}