You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Merging
//depot/UE4-Orion/Engine/Source/Runtime/Engine/Private/Animation/AnimMontage.cpp to //depot/UE4/Engine/Source/Runtime/Engine/Private/Animation/AnimMontage.cpp #lockdown : Ben.Marsh Talked to Marc Auidy w.r.t. merging this change to Fortnite [CL 2721274 by Lina Halper in Main branch]
This commit is contained in:
committed by
lina.halper@epicgames.com
parent
2b7bed798c
commit
0d91c29a77
@@ -877,8 +877,8 @@ void FAnimMontageInstance::Stop(const FAlphaBlend& InBlendOut, bool bInterrupt)
|
||||
bInterrupted = bInterrupt;
|
||||
}
|
||||
|
||||
// if desired weight is > 0.f, turn that off
|
||||
if (Blend.GetDesiredValue() > 0.f)
|
||||
// if it hasn't stopped, stop now
|
||||
if (IsStopped() == false)
|
||||
{
|
||||
// do not use default Montage->BlendOut
|
||||
// depending on situation, the BlendOut time can change
|
||||
@@ -1073,7 +1073,7 @@ bool FAnimMontageInstance::SetNextSectionID(int32 const & SectionID, int32 const
|
||||
|
||||
void FAnimMontageInstance::OnMontagePositionChanged(FName const & ToSectionName)
|
||||
{
|
||||
if (bPlaying && (Blend.GetDesiredValue() == 0.f))
|
||||
if (bPlaying && IsStopped())
|
||||
{
|
||||
UE_LOG(LogAnimation, Warning, TEXT("Changing section on Montage (%s) to '%s' during blend out. This can cause incorrect visuals!"),
|
||||
*GetNameSafe(Montage), *ToSectionName.ToString());
|
||||
@@ -1437,8 +1437,8 @@ void FAnimMontageInstance::Advance(float DeltaTime, struct FRootMotionMovementPa
|
||||
}
|
||||
}
|
||||
|
||||
// If current section is last one, check to trigger a blend out.
|
||||
if( NextSectionIndex == INDEX_NONE )
|
||||
// If current section is last one, check to trigger a blend out and if it hasn't stopped yet, see if we should stop
|
||||
if (NextSectionIndex == INDEX_NONE && !IsStopped())
|
||||
{
|
||||
const float DeltaPosToEnd = bPlayingForward ? (CurrentSectionLength - PosInSection) : PosInSection;
|
||||
const float DeltaTimeToEnd = DeltaPosToEnd / FMath::Abs(CombinedPlayRate);
|
||||
@@ -1504,7 +1504,7 @@ void FAnimMontageInstance::Advance(float DeltaTime, struct FRootMotionMovementPa
|
||||
}
|
||||
|
||||
// If this Montage has no weight, it should be terminated.
|
||||
if ((Blend.GetDesiredValue()<= ZERO_ANIMWEIGHT_THRESH) && (Blend.IsComplete()))
|
||||
if (IsStopped() && (Blend.IsComplete()))
|
||||
{
|
||||
// nothing else to do
|
||||
Terminate();
|
||||
|
||||
Reference in New Issue
Block a user