Remove as much C++ deprecation as possible up to 4.17 (along with a few scattered removals from beyond)

#preflight 61eefc77ba69a4fdb220bf23

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 18712765 in //UE5/Release-5.0/... via CL 18712784 via CL 18713147
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18713191 by marc audy in ue5-main branch]
This commit is contained in:
marc audy
2022-01-24 15:07:48 -05:00
parent 85590f14aa
commit 6553e6cd0a
133 changed files with 44 additions and 2143 deletions
@@ -533,12 +533,6 @@ struct AIMODULE_API FAIMoveRequest
bool UpdateGoalLocation(const FVector& NewLocation) const;
FString ToString() const;
UE_DEPRECATED(4.13, "This function is deprecated, please use SetReachTestIncludesAgentRadius instead.")
FAIMoveRequest& SetStopOnOverlap(bool bStop);
UE_DEPRECATED(4.13, "This function is deprecated, please use IsReachTestIncludingAgentRadius instead.")
bool CanStopOnOverlap() const;
protected:
/** move goal: actor */
@@ -138,12 +138,6 @@ protected:
bNotifyDeactivation = !TIsSame<decltype(&UBTDecorator::OnNodeDeactivation), OnNodeDeactivation>::Value;
bNotifyProcessed = !TIsSame<decltype(&UBTDecorator::OnNodeProcessed), OnNodeProcessed>::Value;
}
//----------------------------------------------------------------------//
// DEPRECATED
//----------------------------------------------------------------------//
UE_DEPRECATED(4.12, "This function is deprecated, please use InitializeParentLink instead.")
void InitializeDecorator(uint8 InChildIndex);
};
#define INIT_DECORATOR_NODE_NOTIFY_FLAGS() \
@@ -23,9 +23,6 @@ namespace FBTNodeBPImplementationHelper
/** checks if given object implements GenericEventName and/or AIEventName BP events, and returns an result as flags set on return integer
* @return flags set in returned integer indicate kinds of events implemented by given object */
AIMODULE_API int32 CheckEventImplementationVersion(FName GenericEventName, FName AIEventName, const UObject& Object, const UClass& StopAtClass);
UE_DEPRECATED(4.11, "This version of CheckEventImplementationVersion is deprecated. Please use the one taking reference to UObject and StopAtClass rather than a pointers.")
AIMODULE_API int32 CheckEventImplementationVersion(FName GenericEventName, FName AIEventName, const UObject* Ob, const UClass* StopAtClass);
}
UCLASS(meta=(RestrictedToClasses="BTNode"))
@@ -84,14 +84,6 @@ public:
/** resume observer change notifications and, optionally, process the queued observation list */
void ResumeObserverNotifications(bool bSendQueuedObserverNotifications);
/** pause change notifies and add them to queue */
UE_DEPRECATED(4.15, "Please call PauseObserverUpdates.")
void PauseUpdates();
/** resume change notifies and process queued list */
UE_DEPRECATED(4.15, "Please call ResumeObserverNotifications.")
void ResumeUpdates();
/** @return associated behavior tree component */
UBrainComponent* GetBrainComponent() const;
@@ -177,8 +177,4 @@ protected:
/** @return key ID from name */
FBlackboard::FKey InternalGetKeyID(const FName& KeyName, EKeyLookupMode LookupMode) const;
/** check if parent chain contains given blackboard data */
UE_DEPRECATED(4.14, "This function is deprecated, please use IsChildOf instead.")
bool HasParent(const UBlackboardData* TestParent) const;
};
@@ -141,9 +141,6 @@ class AIMODULE_API UCrowdFollowingComponent : public UPathFollowingComponent, pu
virtual void DescribeSelfToVisLog(struct FVisualLogEntry* Snapshot) const override;
#endif // ENABLE_VISUAL_LOG
UE_DEPRECATED(4.11, "Use SetCrowdSimulationState function instead.")
virtual void SetCrowdSimulation(bool bEnable);
UE_DEPRECATED_FORGAME(4.16, "Use ApplyCrowdAgentVelocity function with bIsNearEndOfPath param instead.")
virtual void ApplyCrowdAgentVelocity(const FVector& NewVelocity, const FVector& DestPathCorner, bool bTraversingLink) {}
@@ -185,9 +182,6 @@ protected:
/** if set, move velocity will be updated in every tick */
uint8 bUpdateDirectMoveVelocity : 1;
UE_DEPRECATED(4.11, "Please use IsCrowdSimulationEnabled(), SetCrowdSimulationState() and SimulationState member for initialization.")
uint8 bEnableCrowdSimulation : 1;
/** set when agent is registered in crowd simulation (either controlled or an obstacle) */
uint8 bRegisteredWithCrowdSimulation : 1;
@@ -248,8 +242,6 @@ protected:
bool HasMovedDuringPause() const;
void UpdateCachedDirections(const FVector& NewVelocity, const FVector& NextPathCorner, bool bTraversingLink);
UE_DEPRECATED(4.12, "This function is now deprecated and was renamed to ShouldTrackMovingGoal.")
virtual bool UpdateCachedGoal(FVector& NewGoalPos);
virtual bool ShouldTrackMovingGoal(FVector& OutGoalLocation) const;
void RegisterCrowdAgent();
@@ -129,8 +129,4 @@ protected:
/** switch to next waypoint */
bool MoveToNextSection(const FVector& AgentLocation);
public:
UE_DEPRECATED(4.16, "Waypoint type of MetaPaths has been changed. Use the new GetWaypointArray")
TArray<FVector> GetWaypoints() const;
};
@@ -410,39 +410,12 @@ class AIMODULE_API UPathFollowingComponent : public UActorComponent, public IAIR
static void LogPathHelper(const AActor* LogOwner, FNavPathSharedPtr InLogPath, const AActor* LogGoalActor);
static void LogPathHelper(const AActor* LogOwner, FNavigationPath* InLogPath, const AActor* LogGoalActor);
UE_DEPRECATED(4.12, "This function is now deprecated and replaced with HandlePathUpdateEvent. Receiving new path pointer for the same move request is no longer supported, please either update data within current path and call FNavigationPath::DoneUpdating or start new move request.")
virtual bool UpdateMove(FNavPathSharedPtr Path, FAIRequestID RequestID = FAIRequestID::CurrentRequest);
UE_DEPRECATED(4.13, "This function is now deprecated, please use version with FAIMoveRequest parameter instead. Any observers needs to register with OnRequestFinished mutlicast delegate now.")
virtual FAIRequestID RequestMove(FNavPathSharedPtr Path, FRequestCompletedSignature OnComplete, const AActor* DestinationActor = NULL, float AcceptanceRadius = UPathFollowingComponent::DefaultAcceptanceRadius, bool bStopOnOverlap = true, FCustomMoveSharedPtr GameData = NULL);
UE_DEPRECATED(4.13, "This function is now deprecated, please use version with FAIMoveRequest parameter instead.")
FAIRequestID RequestMove(FNavPathSharedPtr InPath, const AActor* InDestinationActor = NULL, float InAcceptanceRadius = UPathFollowingComponent::DefaultAcceptanceRadius, bool InStopOnOverlap = true, FCustomMoveSharedPtr InGameData = NULL);
UE_DEPRECATED(4.13, "This function is now deprecated, please use version with EPathFollowingResultDetails parameter instead.")
virtual void AbortMove(const FString& Reason, FAIRequestID RequestID = FAIRequestID::CurrentRequest, bool bResetVelocity = true, bool bSilent = false, uint8 MessageFlags = 0);
UE_DEPRECATED(4.13, "This function is now deprecated, please use version with EPathFollowingVelocityMode parameter instead.")
virtual void PauseMove(FAIRequestID RequestID = FAIRequestID::CurrentRequest, bool bResetVelocity = true);
UFUNCTION(BlueprintCallable, Category="AI|Components|PathFollowing", meta = (DeprecatedFunction, DeprecationMessage = "This function is now deprecated, please use AIController.GetMoveStatus instead"))
EPathFollowingAction::Type GetPathActionType() const;
UFUNCTION(BlueprintCallable, Category="AI|Components|PathFollowing", meta = (DeprecatedFunction, DeprecationMessage = "This function is now deprecated, please use AIController.GetImmediateMoveDestination instead"))
FVector GetPathDestination() const;
UE_DEPRECATED(4.13, "This function is now deprecated, please version with FPathFollowingResult parameter instead.")
virtual void OnPathFinished(EPathFollowingResult::Type Result);
UE_DEPRECATED(4.13, "This function is now deprecated and no longer supported.")
int32 OptimizeSegmentVisibility(int32 StartIndex) { return StartIndex + 1; }
UE_DEPRECATED(4.13, "This function is now deprecated, please use version with EPathFollowingReachMode parameter instead.")
bool HasReached(const FVector& TestPoint, float AcceptanceRadius = UPathFollowingComponent::DefaultAcceptanceRadius, bool bExactSpot = false) const;
UE_DEPRECATED(4.13, "This function is now deprecated, please use version with EPathFollowingReachMode parameter instead.")
bool HasReached(const AActor& TestGoal, float AcceptanceRadius = UPathFollowingComponent::DefaultAcceptanceRadius, bool bExactSpot = false, bool bUseNavAgentGoalLocation = true) const;
#if WITH_EDITORONLY_DATA
// This delegate is now deprecated, please use OnRequestFinished instead
FMoveCompletedSignature OnMoveFinished_DEPRECATED;
@@ -408,9 +408,6 @@ public:
FActorPerceptionInfoUpdatedDelegate OnTargetPerceptionInfoUpdated;
protected:
UE_DEPRECATED(4.11, "Function has been renamed and made public. Please use UpdatePerceptionAllowList instead")
void UpdatePerceptionFilter(FAISenseID Channel, bool bNewValue);
FActorPerceptionContainer& GetPerceptualData() { return PerceptualData; }
const FActorPerceptionContainer& GetPerceptualData() const { return PerceptualData; }
@@ -154,11 +154,4 @@ protected:
/** To be called only for BP-generated classes */
void ForceSenseID(FAISenseID SenseID);
UE_DEPRECATED(4.13, "Function removed, use AISenseConfig.GetDebugColor() instead.")
FColor GetDebugColor() const { return FColor::White; }
UE_DEPRECATED(4.13, "Function removed, use AISenseConfig.GetSenseName() instead.")
FString GetDebugName() const { return FString(); }
UE_DEPRECATED(4.13, "Function removed, use AISenseConfig.DescribeSelfToGameplayDebugger() instead.")
virtual FString GetDebugLegend() const { return FString(); };
};
@@ -36,9 +36,6 @@ public:
float AcceptanceRadius = -1.f, EAIOptionFlag::Type StopOnOverlap = EAIOptionFlag::Default, EAIOptionFlag::Type AcceptPartialPath = EAIOptionFlag::Default,
bool bUsePathfinding = true, bool bLockAILogic = true, bool bUseContinuosGoalTracking = false, EAIOptionFlag::Type ProjectGoalOnNavigation = EAIOptionFlag::Default);
UE_DEPRECATED(4.12, "This function is now depreacted, please use version with FAIMoveRequest parameter")
void SetUp(AAIController* Controller, FVector GoalLocation, AActor* GoalActor = nullptr, float AcceptanceRadius = -1.f, bool bUsePathfinding = true, EAIOptionFlag::Type StopOnOverlap = EAIOptionFlag::Default, EAIOptionFlag::Type AcceptPartialPath = EAIOptionFlag::Default);
/** Allows custom move request tweaking. Note that all MoveRequest need to
* be performed before PerformMove is called. */
FAIMoveRequest& GetMoveRequestRef() { return MoveRequest; }
@@ -227,12 +227,3 @@ FString FAIMoveRequest::ToString() const
);
}
FAIMoveRequest& FAIMoveRequest::SetStopOnOverlap(bool bStop)
{
return SetReachTestIncludesAgentRadius(bStop);
}
bool FAIMoveRequest::CanStopOnOverlap() const
{
return IsReachTestIncludingAgentRadius();
}
@@ -209,10 +209,3 @@ void UBTDecorator::UpdateFlowAbortMode()
#endif
}
//----------------------------------------------------------------------//
// DEPRECATED
//----------------------------------------------------------------------//
void UBTDecorator::InitializeDecorator(uint8 InChildIndex)
{
InitializeParentLink(InChildIndex);
}
@@ -30,11 +30,6 @@ namespace FBTNodeBPImplementationHelper
return (bGeneric ? Generic : NoImplementation) | (bAI ? AISpecific : NoImplementation);
}
int32 CheckEventImplementationVersion(FName GenericEventName, FName AIEventName, const UObject* Ob, const UClass* StopAtClass)
{
return (Ob && StopAtClass) ? CheckEventImplementationVersion(GenericEventName, AIEventName, *Ob, *StopAtClass) : NoImplementation;
}
}
//----------------------------------------------------------------------//
@@ -397,23 +397,6 @@ void UBlackboardComponent::ResumeObserverNotifications(bool bSendQueuedObserverN
QueuedUpdates.Empty();
}
void UBlackboardComponent::PauseUpdates()
{
bPausedNotifies = true;
}
void UBlackboardComponent::ResumeUpdates()
{
bPausedNotifies = false;
for (int32 UpdateIndex = 0; UpdateIndex < QueuedUpdates.Num(); UpdateIndex++)
{
NotifyObservers(QueuedUpdates[UpdateIndex]);
}
QueuedUpdates.Empty();
}
void UBlackboardComponent::NotifyObservers(FBlackboard::FKey KeyID) const
{
TMultiMap<uint8, FOnBlackboardChangeNotificationInfo>::TKeyIterator KeyIt(Observers, KeyID);
@@ -307,15 +307,3 @@ bool UBlackboardData::IsChildOf(const UBlackboardData& OtherAsset) const
return (TmpParent == &OtherAsset);
}
//----------------------------------------------------------------------//
// DEPRECATED
//----------------------------------------------------------------------//
bool UBlackboardData::HasParent(const UBlackboardData* TestParent) const
{
if (Parent == TestParent)
{
return true;
}
return Parent ? Parent->HasParent(TestParent) : false;
}
@@ -299,13 +299,5 @@ namespace BlueprintNodeHelpers
}
}
}
//----------------------------------------------------------------------//
// DEPRECATED
//----------------------------------------------------------------------//
bool HasBlueprintFunction(FName FuncName, const UObject* Object, const UClass* StopAtClass)
{
return Object && StopAtClass && HasBlueprintFunction(FuncName, *Object, *StopAtClass);
}
}
@@ -375,11 +375,6 @@ void UCrowdFollowingComponent::UpdateDestinationForMovingGoal(const FVector& New
CurrentDestination.Set(Path->GetBaseActor(), NewDestination);
}
bool UCrowdFollowingComponent::UpdateCachedGoal(FVector& NewGoalPos)
{
return ShouldTrackMovingGoal(NewGoalPos);
}
void UCrowdFollowingComponent::ApplyCrowdAgentVelocity(const FVector& NewVelocity, const FVector& DestPathCorner, bool bTraversingLink, bool bIsNearEndOfPath)
{
bCanCheckMovingTooFar = !bTraversingLink && bIsNearEndOfPath;
@@ -416,11 +411,6 @@ void UCrowdFollowingComponent::ApplyCrowdAgentPosition(const FVector& NewPositio
// base implementation does nothing
}
void UCrowdFollowingComponent::SetCrowdSimulation(bool bEnable)
{
SetCrowdSimulationState(bEnable ? ECrowdSimulationState::Enabled : ECrowdSimulationState::ObstacleOnly);
}
void UCrowdFollowingComponent::SetCrowdSimulationState(ECrowdSimulationState NewState)
{
if (NewState == SimulationState)
@@ -274,16 +274,3 @@ void FMetaNavMeshPath::DebugDraw(const ANavigationData* NavData, const FColor Pa
#endif // ENABLE_DRAW_DEBUG
}
//----------------------------------------------------------------------//
// DEPRECATED
//----------------------------------------------------------------------//
TArray<FVector> FMetaNavMeshPath::GetWaypoints() const
{
TArray<FVector> VectorWaypoints;
VectorWaypoints.Reserve(Waypoints.Num());
for (const FMetaPathWayPoint& Waypoint : Waypoints)
{
VectorWaypoints.Add(Waypoint);
}
return VectorWaypoints;
}
@@ -430,20 +430,6 @@ FAIRequestID UPathFollowingComponent::RequestMove(const FAIMoveRequest& RequestD
return MoveId;
}
bool UPathFollowingComponent::UpdateMove(FNavPathSharedPtr InPath, FAIRequestID RequestID)
{
if (InPath == Path && RequestID.IsEquivalent(CurrentRequestId))
{
return HandlePathUpdateEvent();
}
UE_VLOG(GetOwner(), LogPathFollowing, Error, TEXT("UpdateMove is ignored! path:%s requestId:%s"),
(InPath == Path) ? TEXT("ok") : TEXT("DIFFERENT"),
RequestID.IsEquivalent(CurrentRequestId) ? TEXT("ok") : TEXT("NOT CURRENT"));
return false;
}
void UPathFollowingComponent::AbortMove(const UObject& Instigator, FPathFollowingResultFlags::Type AbortFlags, FAIRequestID RequestID, EPathFollowingVelocityMode VelocityMode)
{
UE_VLOG(GetOwner(), LogPathFollowing, Log, TEXT("AbortMove: RequestID(%u) Instigator(%s)"), RequestID, *Instigator.GetName());
@@ -1866,60 +1852,6 @@ void UPathFollowingComponent::OnWaitingPathTimeout()
}
// deprecated functions
FAIRequestID UPathFollowingComponent::RequestMove(FNavPathSharedPtr InPath, FRequestCompletedSignature OnComplete, const AActor* InDestinationActor, float InAcceptanceRadius, bool bInStopOnOverlap, FCustomMoveSharedPtr InGameData)
{
FAIMoveRequest MoveReq;
if (InDestinationActor)
{
MoveReq.SetGoalActor(InDestinationActor);
}
else
{
MoveReq.SetGoalLocation(InPath.IsValid() && InPath->GetPathPoints().Num() ? InPath->GetPathPoints().Last().Location : FAISystem::InvalidLocation);
}
MoveReq.SetAcceptanceRadius(InAcceptanceRadius);
MoveReq.SetReachTestIncludesAgentRadius(bInStopOnOverlap);
MoveReq.SetUserData(InGameData);
return RequestMove(MoveReq, InPath);
}
FAIRequestID UPathFollowingComponent::RequestMove(FNavPathSharedPtr InPath, const AActor* InDestinationActor, float InAcceptanceRadius, bool bInStopOnOverlap, FCustomMoveSharedPtr InGameData)
{
FAIMoveRequest MoveReq;
if (InDestinationActor)
{
MoveReq.SetGoalActor(InDestinationActor);
}
else
{
MoveReq.SetGoalLocation(InPath.IsValid() && InPath->GetPathPoints().Num() ? InPath->GetPathPoints().Last().Location : FAISystem::InvalidLocation);
}
MoveReq.SetAcceptanceRadius(InAcceptanceRadius);
MoveReq.SetReachTestIncludesAgentRadius(bInStopOnOverlap);
MoveReq.SetUserData(InGameData);
return RequestMove(MoveReq, InPath);
}
void UPathFollowingComponent::AbortMove(const FString& Reason, FAIRequestID RequestID, bool bResetVelocity, bool bSilent, uint8 MessageFlags)
{
const FPathFollowingResultFlags::Type AbortDetails =
(MessageFlags == EPathFollowingMessage::NoPath) ? FPathFollowingResultFlags::InvalidPath :
(MessageFlags == EPathFollowingMessage::OtherRequest) ? FPathFollowingResultFlags::NewRequest :
FPathFollowingResultFlags::None;
UE_VLOG(GetOwner(), LogPathFollowing, Log, TEXT("AbortMove with reason(%s)"), *Reason);
AbortMove(*this, AbortDetails, RequestID, bResetVelocity ? EPathFollowingVelocityMode::Reset : EPathFollowingVelocityMode::Keep);
}
void UPathFollowingComponent::PauseMove(FAIRequestID RequestID, bool bResetVelocity)
{
PauseMove(RequestID, bResetVelocity ? EPathFollowingVelocityMode::Reset : EPathFollowingVelocityMode::Keep);
}
EPathFollowingAction::Type UPathFollowingComponent::GetPathActionType() const
{
switch (Status)
@@ -1946,19 +1878,4 @@ FVector UPathFollowingComponent::GetPathDestination() const
return Path.IsValid() ? Path->GetDestinationLocation() : FVector::ZeroVector;
}
void UPathFollowingComponent::OnPathFinished(EPathFollowingResult::Type Result)
{
OnPathFinished(Result, FPathFollowingResultFlags::None);
}
bool UPathFollowingComponent::HasReached(const FVector& TestPoint, float InAcceptanceRadius, bool bExactSpot) const
{
return HasReached(TestPoint, bExactSpot ? EPathFollowingReachMode::ExactLocation : EPathFollowingReachMode::OverlapAgent, InAcceptanceRadius);
}
bool UPathFollowingComponent::HasReached(const AActor& TestGoal, float InAcceptanceRadius, bool bExactSpot, bool bUseNavAgentGoalLocation) const
{
return HasReached(TestGoal, bExactSpot ? EPathFollowingReachMode::ExactLocation : EPathFollowingReachMode::OverlapAgentAndGoal, InAcceptanceRadius, bUseNavAgentGoalLocation);
}
#undef SHIPPING_STATIC

Some files were not shown because too many files have changed in this diff Show More