Skip to content

Commit 52e722b

Browse files
Merge pull request #10 from samleybrize/fix-interactable
Approved: Fix interactable component
2 parents bc629ab + 5ea8808 commit 52e722b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Source/ActorInteractionPlugin/Private/Components/Interactable/ActorInteractableComponentBase.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ void UActorInteractableComponentBase::SetLifecycleCount_Implementation(const int
972972
switch (LifecycleMode)
973973
{
974974
case EInteractableLifecycle::EIL_Cycled:
975-
if (NewLifecycleCount < -1)
975+
if (NewLifecycleCount <= -1)
976976
{
977977
LifecycleCount = -1;
978978
OnLifecycleCountChanged.Broadcast(LifecycleCount);
@@ -1005,8 +1005,8 @@ void UActorInteractableComponentBase::SetCooldownPeriod_Implementation(const flo
10051005
switch (LifecycleMode)
10061006
{
10071007
case EInteractableLifecycle::EIL_Cycled:
1008-
LifecycleCount = FMath::Max(0.1f, NewCooldownPeriod);
1009-
OnLifecycleCountChanged.Broadcast(LifecycleCount);
1008+
CooldownPeriod = FMath::Max(0.1f, NewCooldownPeriod);
1009+
OnCooldownPeriodChanged.Broadcast(CooldownPeriod);
10101010
break;
10111011
case EInteractableLifecycle::EIL_OnlyOnce:
10121012
case EInteractableLifecycle::Default:
@@ -2219,6 +2219,8 @@ void UActorInteractableComponentBase::ResetDefaults()
22192219

22202220
void UActorInteractableComponentBase::PostEditChangeChainProperty(FPropertyChangedChainEvent& PropertyChangedEvent)
22212221
{
2222+
Super::PostEditChangeChainProperty(PropertyChangedEvent);
2223+
22222224
const FName PropertyName = (PropertyChangedEvent.MemberProperty != nullptr) ? PropertyChangedEvent.GetPropertyName() : NAME_None;
22232225

22242226
FString interactableName = GetName();

0 commit comments

Comments
 (0)