Pass state context to GetFollowupState
This commit is contained in:
		
							parent
							
								
									b8ffa48b47
								
							
						
					
					
						commit
						b66a93d108
					
				@ -164,9 +164,9 @@ void UFFState::Finish(const FFFStateContext& InStateContext, EFFStateFinishReaso
 | 
				
			|||||||
    // to rethink the way we handle logic for ending a state and which class is in charge of handling
 | 
					    // to rethink the way we handle logic for ending a state and which class is in charge of handling
 | 
				
			||||||
    // what
 | 
					    // what
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    if(GetFollowupState() != NAME_None)
 | 
					    if(GetFollowupState(InStateContext) != NAME_None)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        InStateContext.Parent->GoToState(GetFollowupState(), StateFinishReason);
 | 
					        InStateContext.Parent->GoToState(GetFollowupState(InStateContext), StateFinishReason);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -175,7 +175,7 @@ void UFFState::Finish(const FFFStateContext& InStateContext, EFFStateFinishReaso
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FName UFFState::GetFollowupState_Implementation()
 | 
					FName UFFState::GetFollowupState_Implementation(const FFFStateContext& InStateContext)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return FollowupState;
 | 
					    return FollowupState;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -273,7 +273,7 @@ public:
 | 
				
			|||||||
	 *	NAME_None if the FollowupState is not specified.
 | 
						 *	NAME_None if the FollowupState is not specified.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	UFUNCTION(BlueprintNativeEvent, Category="UFF|State|Events")
 | 
						UFUNCTION(BlueprintNativeEvent, Category="UFF|State|Events")
 | 
				
			||||||
	FName GetFollowupState();
 | 
						FName GetFollowupState(const FFFStateContext& InStateContext);
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	// TODO: Don't like this at all and needs to be refactored or redesigned
 | 
						// TODO: Don't like this at all and needs to be refactored or redesigned
 | 
				
			||||||
	UFUNCTION(BlueprintCallable, Category="UFF|State|Animations")
 | 
						UFUNCTION(BlueprintCallable, Category="UFF|State|Animations")
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user