孟宇 3 달 전
부모
커밋
5554ee28c4

+ 0 - 1
Ability/Plugins/EzAbility/Source/EzAbility/Private/EzAbilityContext.cpp

@@ -1275,7 +1275,6 @@ void FEzAbilityContext::ExitState(const FEzAbilityTransitionResult& Transition)
 				// Do property copies, ExitState() is called below.
 				for (int32 TaskIndex = (State.TasksBegin + State.TasksNum) - 1; TaskIndex >= State.TasksBegin; TaskIndex--)
 				{
-
 					// Call task completed only if EnterState() was called.
 					// The task order in the tree (BF) allows us to use the comparison.
 					// Relying here that invalid value of Exec.EnterStateFailedTaskIndex == MAX_uint16.

+ 15 - 10
Ability/Plugins/EzAbility/Source/EzAbility/Public/EzAbilityTypes.h

@@ -17,7 +17,16 @@ namespace UE::EzAbility
 
 	inline const FName SchemaTag(TEXT("Schema"));
 }
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+UENUM()
+enum class EExecutePolicy : uint8 
+{
+	ClientOnly,
+	ServerOnly,
+	ClientAndServer,
+};
 
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 UENUM()
 enum class EEzAbilityExternalDataRequirement : uint8
 {
@@ -393,6 +402,12 @@ struct EZABILITY_API FCompactEzAbilityState
 	uint16	GetNextIndex()	const { return ChildrenEnd; };
 	bool	HasChildren()	const { return ChildrenEnd > ChildrenBegin; };
 
+	UPROPERTY()
+	float	StartTime;
+
+	UPROPERTY()
+	float	EndTime;
+	
 	UPROPERTY()
 	uint8 bEnabled : 1;
 
@@ -401,8 +416,6 @@ struct EZABILITY_API FCompactEzAbilityState
 
 	UPROPERTY()
 	EEzAbilityStateType Type = EEzAbilityStateType::State;
-	// UPROPERTY()
-	// ESliceType Type = ESliceType::Main;
 	
 	UPROPERTY()
 	FName Name;
@@ -416,12 +429,6 @@ struct EZABILITY_API FCompactEzAbilityState
 	UPROPERTY()
 	FEzAbilityStateHandle Parent = FEzAbilityStateHandle::Invalid;
 	
-	UPROPERTY()
-	float	StartTime;
-
-	UPROPERTY()
-	float	EndTime;
-	
 	UPROPERTY()
 	uint16 ChildrenBegin = 0;
 	
@@ -433,8 +440,6 @@ struct EZABILITY_API FCompactEzAbilityState
 	
 	UPROPERTY()
 	uint8 TransitionsNum = 0;
-
-	
 	
 	UPROPERTY()
 	uint8 TasksNum = 0;

+ 7 - 0
Ability/Plugins/EzAbility/Source/EzAbility/Public/Task/EzAbilityTask.h

@@ -80,4 +80,11 @@ struct EZABILITY_API FEzAbilityTask : public FEzAbilityNodeBase
 	/** True if the node is Enabled (i.e. not explicitly disabled in the asset). */
 	UPROPERTY()
 	uint8 bTaskEnabled : 1;
+
+	
+	UPROPERTY(EditAnywhere, Category = Task)
+	EExecutePolicy	Policy = EExecutePolicy::ClientAndServer;
+
+	// If set to false, task not call, default true
+	uint8 bShouldExecuteTask : 1;
 };