Skip to content

Commit

Permalink
exposed NetMode parameter, passing it to NotifyFromGraph()
Browse files Browse the repository at this point in the history
  • Loading branch information
MothDoctor committed Sep 2, 2021
1 parent 1ec1c92 commit 214ecfb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/Flow/Private/Nodes/World/FlowNode_NotifyActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

UFlowNode_NotifyActor::UFlowNode_NotifyActor(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
, NetMode(EFlowNetMode::Authority)
{
#if WITH_EDITOR
Category = TEXT("Notifies");
Expand All @@ -30,11 +31,11 @@ void UFlowNode_NotifyActor::PostLoad()

void UFlowNode_NotifyActor::ExecuteInput(const FName& PinName)
{
if (UFlowSubsystem* FlowSubsystem = GetWorld()->GetGameInstance()->GetSubsystem<UFlowSubsystem>())
if (const UFlowSubsystem* FlowSubsystem = GetWorld()->GetGameInstance()->GetSubsystem<UFlowSubsystem>())
{
for (TWeakObjectPtr<UFlowComponent>& Component : FlowSubsystem->GetComponents<UFlowComponent>(IdentityTags, EGameplayContainerMatchType::Any))
for (const TWeakObjectPtr<UFlowComponent>& Component : FlowSubsystem->GetComponents<UFlowComponent>(IdentityTags, EGameplayContainerMatchType::Any))
{
Component->NotifyFromGraph(NotifyTags);
Component->NotifyFromGraph(NotifyTags, NetMode);
}
}

Expand Down
3 changes: 3 additions & 0 deletions Source/Flow/Public/Nodes/World/FlowNode_NotifyActor.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class FLOW_API UFlowNode_NotifyActor : public UFlowNode
UPROPERTY(EditAnywhere, Category = "ObservedComponent")
FGameplayTagContainer NotifyTags;

UPROPERTY(EditAnywhere, Category = "ObservedComponent")
EFlowNetMode NetMode;

virtual void PostLoad() override;

virtual void ExecuteInput(const FName& PinName) override;
Expand Down

0 comments on commit 214ecfb

Please sign in to comment.