From 878cf0c2e2fe0a55e220fa3c68e791b8be6b9472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric?= Date: Tue, 16 Jul 2024 17:14:22 +0200 Subject: [PATCH] add overlaped component on monitor overlap --- .../Private/GAS/Tasks/GBFAT_MonitorOverlap.cpp | 8 ++++---- .../Public/GAS/Tasks/GBFAT_MonitorOverlap.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/GameBaseFramework/Private/GAS/Tasks/GBFAT_MonitorOverlap.cpp b/Source/GameBaseFramework/Private/GAS/Tasks/GBFAT_MonitorOverlap.cpp index bca9240f..d541ed62 100644 --- a/Source/GameBaseFramework/Private/GAS/Tasks/GBFAT_MonitorOverlap.cpp +++ b/Source/GameBaseFramework/Private/GAS/Tasks/GBFAT_MonitorOverlap.cpp @@ -51,19 +51,19 @@ UPrimitiveComponent * UGBFAT_MonitorOverlap::GetPrimitiveComponent() } // ReSharper disable once CppMemberFunctionMayBeConst -void UGBFAT_MonitorOverlap::OnComponentBeginOverlap( UPrimitiveComponent * /*overlapped_component*/, AActor * other_actor, UPrimitiveComponent * other_component, int32 /*other_body_index*/, bool /*from_sweep*/, const FHitResult & /*hit_result*/ ) +void UGBFAT_MonitorOverlap::OnComponentBeginOverlap( UPrimitiveComponent * overlapped_component, AActor * other_actor, UPrimitiveComponent * other_component, int32 /*other_body_index*/, bool /*from_sweep*/, const FHitResult & /*hit_result*/ ) { if ( ShouldBroadcastAbilityTaskDelegates() ) { - OnComponentBeginOverlapDelegate.Broadcast( other_actor, other_component ); + OnComponentBeginOverlapDelegate.Broadcast( other_actor, other_component, overlapped_component ); } } // ReSharper disable once CppMemberFunctionMayBeConst -void UGBFAT_MonitorOverlap::OnComponentEndOverlap( UPrimitiveComponent * /*overlapped_component*/, AActor * other_actor, UPrimitiveComponent * other_component, int32 /*other_body_index*/ ) +void UGBFAT_MonitorOverlap::OnComponentEndOverlap( UPrimitiveComponent * overlapped_component, AActor * other_actor, UPrimitiveComponent * other_component, int32 /*other_body_index*/ ) { if ( ShouldBroadcastAbilityTaskDelegates() ) { - OnComponentEndOverlapDelegate.Broadcast( other_actor, other_component ); + OnComponentEndOverlapDelegate.Broadcast( other_actor, other_component, overlapped_component ); } } diff --git a/Source/GameBaseFramework/Public/GAS/Tasks/GBFAT_MonitorOverlap.h b/Source/GameBaseFramework/Public/GAS/Tasks/GBFAT_MonitorOverlap.h index 76f423e3..dd8786f8 100644 --- a/Source/GameBaseFramework/Public/GAS/Tasks/GBFAT_MonitorOverlap.h +++ b/Source/GameBaseFramework/Public/GAS/Tasks/GBFAT_MonitorOverlap.h @@ -7,7 +7,7 @@ class UPrimitiveComponent; -DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams( FOnMonitorOverlapDelegate, AActor *, OtherActor, UPrimitiveComponent *, OtherComponent ); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams( FOnMonitorOverlapDelegate, AActor *, OtherActor, UPrimitiveComponent *, OtherComponent, UPrimitiveComponent *, OverlapedComponent ); UCLASS() class GAMEBASEFRAMEWORK_API UGBFAT_MonitorOverlap final : public UAbilityTask