From 6b0ad46704186a09ce09999a08e997d19a126439 Mon Sep 17 00:00:00 2001 From: TjgL Date: Fri, 14 Mar 2025 14:02:13 +0100 Subject: [PATCH 01/10] Updated sound handling for firing animations Signed-off-by: TjgL --- Content/Legumix/Weapon/Revolver/BP_Revolver.uasset | 4 ++-- .../Weapon/Revolver/FireAnimationTest/AM_Arms_Fire.uasset | 4 ++-- .../Weapon/Revolver/FireAnimationTest/AM_Revolver_Fire.uasset | 4 ++-- Source/LegumeMix/Private/Player/LMMovementComponent.cpp | 2 -- Source/LegumeMix/Private/Weapon/LMRevolver.cpp | 1 - Source/LegumeMix/Private/Weapon/LMShotgun.cpp | 1 - Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp | 3 ++- Source/LegumeMix/Public/Weapon/LMWeaponBase.h | 4 ---- 8 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset b/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset index 92a847a..eee6a19 100644 --- a/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset +++ b/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d1eee27429be23ec90a0198461a714754f31e35522fb90cfed1b36418035628d -size 41121 +oid sha256:5ab24c5cba0f1316130d619e956a722029dfabf90cd52eb6663424c300833b3a +size 40933 diff --git a/Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Arms_Fire.uasset b/Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Arms_Fire.uasset index a39d0b1..7094c2a 100644 --- a/Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Arms_Fire.uasset +++ b/Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Arms_Fire.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:855d73bcfa5e25367347516a9224bc10fb96d76093e8dc3ef17925998557fed8 -size 11228 +oid sha256:4f5ace6f765194ccd96acf84fcdda453b9e9127e590117829f76d8764a38dab2 +size 8630 diff --git a/Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Revolver_Fire.uasset b/Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Revolver_Fire.uasset index 69b73bb..d1e159e 100644 --- a/Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Revolver_Fire.uasset +++ b/Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Revolver_Fire.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cd11587ecdf7670c85147fab8c54c9eed9458d7f6bde32729ffddb5b59a39c4d -size 9654 +oid sha256:eb0bc469bc20c59eff1d8ff60040dcfd52dac32211cd567d014b0a44ef53b3ad +size 12271 diff --git a/Source/LegumeMix/Private/Player/LMMovementComponent.cpp b/Source/LegumeMix/Private/Player/LMMovementComponent.cpp index 4d1955c..5161537 100644 --- a/Source/LegumeMix/Private/Player/LMMovementComponent.cpp +++ b/Source/LegumeMix/Private/Player/LMMovementComponent.cpp @@ -154,7 +154,6 @@ bool ULMMovementComponent::IsCustomMovementMode(ECustomMovementModes InCustomMov void ULMMovementComponent::EnterSlide() { - UE_LOG(LogTemp, Error, TEXT("Entering Slide")); bWantsToCrouch = true; Velocity += Velocity.GetSafeNormal2D() * SlideEnterImpulse; SetMovementMode(EMovementMode::MOVE_Custom, ECustomMovementModes::ECMM_Sliding); @@ -162,7 +161,6 @@ void ULMMovementComponent::EnterSlide() void ULMMovementComponent::ExitSlide() { - UE_LOG(LogTemp, Error, TEXT("Exiting Slide")); bWantsToCrouch = false; FQuat NewRotation = FRotationMatrix::MakeFromXZ(UpdatedComponent->GetForwardVector().GetSafeNormal2D(), FVector::UpVector).ToQuat(); diff --git a/Source/LegumeMix/Private/Weapon/LMRevolver.cpp b/Source/LegumeMix/Private/Weapon/LMRevolver.cpp index 994d261..cbf2f5e 100644 --- a/Source/LegumeMix/Private/Weapon/LMRevolver.cpp +++ b/Source/LegumeMix/Private/Weapon/LMRevolver.cpp @@ -30,7 +30,6 @@ void ALMRevolver::PrimaryFire() return; } - PlayEvent(FireEvent); PlayAnimation(PrimaryFireAnimation); Player->PlayAnimation(PrimaryFireArmsAnimation); diff --git a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp index 4f81507..0312f59 100644 --- a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp +++ b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp @@ -30,7 +30,6 @@ void ALMShotgun::PrimaryFire() return; } - PlayEvent(FireEvent); PlayAnimation(PrimaryFireAnimation); const FVector Origin = Player->GetWeaponFiringOrigin(); diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp index cbb8d8d..5b21505 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp @@ -100,12 +100,13 @@ bool ALMWeaponBase::DefaultReload() if (ClipAmmo >= MaxClip) return false; + // TODO: replace with anim notifies PlayEvent(ReloadSound); PlayAnimation(ReloadAnimation); + Player->PlayAnimation(ReloadArmsAnimation); State = EWeaponState::EWS_Reloading; - // TODO: Use Animations OnDefaultReload(); GetWorldTimerManager().SetTimer(ReloadTimer, this, &ALMWeaponBase::AllowRefire, ReloadDelay); Player->OnReload(); diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h index 6742944..28deb93 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h @@ -71,10 +71,6 @@ public: protected: /* Weapon Data */ FTimerHandle FireTimer; FTimerHandle ReloadTimer; - - /** The sound to play when firing. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds") - TObjectPtr FireEvent; UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds") TObjectPtr ReloadSound; From be2e59e0031f5bbbc8b8e93293c18ceba3510ecf Mon Sep 17 00:00:00 2001 From: TjgL Date: Fri, 14 Mar 2025 14:17:01 +0100 Subject: [PATCH 02/10] Updated shotgun firing animation Signed-off-by: TjgL --- .gitignore | 4 ++-- Content/Legumix/Weapon/Shotgun/Animations/ABP_Shotgun.uasset | 3 +++ Content/Legumix/Weapon/Shotgun/Animations/AM_Arms_Fire.uasset | 3 +++ .../Legumix/Weapon/Shotgun/Animations/AM_Shotgun_Fire.uasset | 3 +++ Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset | 4 ++-- Source/LegumeMix/Private/Weapon/LMShotgun.cpp | 1 + 6 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 Content/Legumix/Weapon/Shotgun/Animations/ABP_Shotgun.uasset create mode 100644 Content/Legumix/Weapon/Shotgun/Animations/AM_Arms_Fire.uasset create mode 100644 Content/Legumix/Weapon/Shotgun/Animations/AM_Shotgun_Fire.uasset diff --git a/.gitignore b/.gitignore index 216cec3..4d0683e 100644 --- a/.gitignore +++ b/.gitignore @@ -47,8 +47,8 @@ SourceArt/**/*.png SourceArt/**/*.tga # Binary Files -#Binaries/* -#Plugins/**/Binaries/* +Binaries/* +Plugins/**/Binaries/* # Builds Build/* diff --git a/Content/Legumix/Weapon/Shotgun/Animations/ABP_Shotgun.uasset b/Content/Legumix/Weapon/Shotgun/Animations/ABP_Shotgun.uasset new file mode 100644 index 0000000..2eb022a --- /dev/null +++ b/Content/Legumix/Weapon/Shotgun/Animations/ABP_Shotgun.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9128b4299e23d8a62e598657abf4c77656f1a54c0918648905a67db1404a7906 +size 35909 diff --git a/Content/Legumix/Weapon/Shotgun/Animations/AM_Arms_Fire.uasset b/Content/Legumix/Weapon/Shotgun/Animations/AM_Arms_Fire.uasset new file mode 100644 index 0000000..c22fda4 --- /dev/null +++ b/Content/Legumix/Weapon/Shotgun/Animations/AM_Arms_Fire.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43a53023023971e8632e9bdfdb2b73dd0bff411b4a4eaddb4f19aad0168d53bb +size 8620 diff --git a/Content/Legumix/Weapon/Shotgun/Animations/AM_Shotgun_Fire.uasset b/Content/Legumix/Weapon/Shotgun/Animations/AM_Shotgun_Fire.uasset new file mode 100644 index 0000000..9f07be8 --- /dev/null +++ b/Content/Legumix/Weapon/Shotgun/Animations/AM_Shotgun_Fire.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d09af8cbf1947b5661ceef9f7952c9ff2b86578b4c8a08c9a67cc95a07d9011d +size 12249 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset index 0365395..8cccd9c 100644 --- a/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset +++ b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edd6a16c3e3c46dfc46d703dd1c9bb23252ba92ff80d39152f10465af60e7755 -size 40178 +oid sha256:b90b3bcbbf678bf45bf01242c7c579d28efc797de7c67039fc639c06463b154a +size 40700 diff --git a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp index 0312f59..576ed93 100644 --- a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp +++ b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp @@ -31,6 +31,7 @@ void ALMShotgun::PrimaryFire() } PlayAnimation(PrimaryFireAnimation); + Player->PlayAnimation(PrimaryFireArmsAnimation); const FVector Origin = Player->GetWeaponFiringOrigin(); const FVector Direction = Player->GetAimVector(); From ce3730bd6c7cea33589469d1d535f9de2f208ed2 Mon Sep 17 00:00:00 2001 From: Emilie Schott Date: Fri, 14 Mar 2025 14:54:12 +0100 Subject: [PATCH 03/10] BugFix : Range enemy movement --- Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset | 4 ++-- .../Ennemy/MeleeEnemy/AI/Task/BTTask_FindPlayer.uasset | 4 ++-- Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset | 4 ++-- Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset | 4 ++-- .../Ennemy/RangeEnemy/AI/Task/BTTask_RangeAttack.uasset | 4 ++-- Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset | 4 ++-- .../Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset | 4 ++-- Content/Legumix/Levels/LVL_GYM_00.umap | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset b/Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset index c7ee0a2..063f4b8 100644 --- a/Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset +++ b/Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6378b00a49eb22f5a0bf3fb8852860f903e69b3ceb022e0e8aaf6626b36dfc57 -size 16748 +oid sha256:333971f60afcc8b96ac35a1a7b9a25cb8eecb53bafca56a95b8156004c238b18 +size 16777 diff --git a/Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_FindPlayer.uasset b/Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_FindPlayer.uasset index b7eee9f..9919362 100644 --- a/Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_FindPlayer.uasset +++ b/Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_FindPlayer.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edaad464ec81ca911c65d273d3976a6fa942791ec9ae70d2f82d6cb290999259 -size 30310 +oid sha256:87754190472186fec4076259d74d61a92f9ed8e435620d485e88a02856824f6b +size 30544 diff --git a/Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset b/Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset index 5e9a4ef..f8d5881 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f986054c9d8609e68bb4ca0f591a85cada17a9a90f4045192d61c3414dce6b47 -size 3669 +oid sha256:9a107424ffc6ebb0f23396a35dd508a2d8b9a5db2db575b6630c3ddf4c636b70 +size 3751 diff --git a/Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset b/Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset index 5c8882e..0e6df4d 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1287a9243fb01d57578f28f7d6fa086b59c94db6798ebafbe7a802460e625117 -size 26167 +oid sha256:6a38163c2ae9205a9e045f96a2b83f45b1e9ec839d2d3dc960ec92ce95f66957 +size 39255 diff --git a/Content/Legumix/Ennemy/RangeEnemy/AI/Task/BTTask_RangeAttack.uasset b/Content/Legumix/Ennemy/RangeEnemy/AI/Task/BTTask_RangeAttack.uasset index 2eda788..ee12041 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/AI/Task/BTTask_RangeAttack.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/AI/Task/BTTask_RangeAttack.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4bc1ae4d1866751e5e37f55c1973966ab5449989e4ed118aaa605053358b646d -size 38916 +oid sha256:10450a5e384eada909803ce06b7fea3e9c716fa2881495c5138b8912470143b7 +size 38201 diff --git a/Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset b/Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset index 4ea7a2c..73fdb97 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:203ca7e51af57d0ce79a85114f04bda9c3f89e53346febbe05b3af57bdfcfcf0 -size 179528 +oid sha256:f7fdc538e287b86a265644d815e86864477eb473a9cea3bf5db18f2cbb560b16 +size 228106 diff --git a/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset b/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset index 459997b..623f4c0 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:158be6df4930d58c4cbcda01c3bc2eaa26412952cd1e956e556eac62f68ed3ed -size 56803 +oid sha256:0c960323528ca29ca55b28f61e99be357ab78a5bf5a7ac4fd2d9f2540b2d7a66 +size 56731 diff --git a/Content/Legumix/Levels/LVL_GYM_00.umap b/Content/Legumix/Levels/LVL_GYM_00.umap index 48d8ef6..925670b 100644 --- a/Content/Legumix/Levels/LVL_GYM_00.umap +++ b/Content/Legumix/Levels/LVL_GYM_00.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f32629d6de36883982deddd5b59f414d2e55a1ced79b227ff98b91f86c4954f4 -size 994910 +oid sha256:0e9ceb56bc959159a80b725406a2de750159f7a776fa8aa0b1fc5d614722439c +size 997821 From b69db53351e52c94945bbf2b87286aac39a3bd3d Mon Sep 17 00:00:00 2001 From: Bastien Date: Fri, 14 Mar 2025 14:58:46 +0100 Subject: [PATCH 04/10] Added new custom event to play camera shakes on hit --- Content/Legumix/Player/BP_Play.uasset | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content/Legumix/Player/BP_Play.uasset b/Content/Legumix/Player/BP_Play.uasset index d55f464..7d8d7a9 100644 --- a/Content/Legumix/Player/BP_Play.uasset +++ b/Content/Legumix/Player/BP_Play.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:702fdfa7c759cd9be31ce980039bae516d28853a25280019bb7a0fab0d713867 -size 515116 +oid sha256:fafb7518c3878a26281dd34fd931cce01fc25c9c20bac45945fac4b52e7159da +size 611886 From cf5ed7536467c214b4580e03c5280da51c66d557 Mon Sep 17 00:00:00 2001 From: Emilie Schott Date: Fri, 14 Mar 2025 15:05:11 +0100 Subject: [PATCH 05/10] Bugfix : projectile collision and damage --- .../Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset b/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset index 623f4c0..bd11337 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c960323528ca29ca55b28f61e99be357ab78a5bf5a7ac4fd2d9f2540b2d7a66 -size 56731 +oid sha256:2d0ef574d7a66351e5bfac859899a6433e7347ebc154f3c3b63159aa79cc0d12 +size 68006 From db589dc8458a274a42edf445ce67297e535a5c42 Mon Sep 17 00:00:00 2001 From: TjgL Date: Fri, 14 Mar 2025 15:11:00 +0100 Subject: [PATCH 06/10] Transformed OnHit to delegate Signed-off-by: TjgL --- Content/Legumix/Ennemy/BP_HealthComponent.uasset | 4 ++-- Content/Legumix/Player/BP_Play.uasset | 4 ++-- Source/LegumeMix/Private/Player/LMHealthComponent.cpp | 2 +- Source/LegumeMix/Public/Player/LMHealthComponent.h | 5 +++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Content/Legumix/Ennemy/BP_HealthComponent.uasset b/Content/Legumix/Ennemy/BP_HealthComponent.uasset index 5dc6b9d..dc89df2 100644 --- a/Content/Legumix/Ennemy/BP_HealthComponent.uasset +++ b/Content/Legumix/Ennemy/BP_HealthComponent.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a020ddfbb8be8268af6cc1f390ac62a655eb45b91686ed4418cb6d56f0ccc9ea -size 40801 +oid sha256:d1ed2f67f85c6f41219d8911dc65b44c68f5191f5b92824230f700f5000b321a +size 33627 diff --git a/Content/Legumix/Player/BP_Play.uasset b/Content/Legumix/Player/BP_Play.uasset index 7d8d7a9..0d185c5 100644 --- a/Content/Legumix/Player/BP_Play.uasset +++ b/Content/Legumix/Player/BP_Play.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fafb7518c3878a26281dd34fd931cce01fc25c9c20bac45945fac4b52e7159da -size 611886 +oid sha256:c1777df2d9f2377eb2929d1c0d531c7b59c5226984dfcacb42aaf66ebb999e1f +size 634881 diff --git a/Source/LegumeMix/Private/Player/LMHealthComponent.cpp b/Source/LegumeMix/Private/Player/LMHealthComponent.cpp index 06d80ab..596a4fc 100644 --- a/Source/LegumeMix/Private/Player/LMHealthComponent.cpp +++ b/Source/LegumeMix/Private/Player/LMHealthComponent.cpp @@ -58,7 +58,7 @@ void ULMHealthComponent::Kill() void ULMHealthComponent::HitBoxHit(ULMHitBox* HitBox, const float Damage, const FVector& Origin, const FHitResult& HitInfo) { TakeDamage(Damage); - OnHit(Damage, Origin, HitInfo); + OnHit.Broadcast(Damage, Origin, HitInfo); } diff --git a/Source/LegumeMix/Public/Player/LMHealthComponent.h b/Source/LegumeMix/Public/Player/LMHealthComponent.h index 112493c..d6e7d0b 100644 --- a/Source/LegumeMix/Public/Player/LMHealthComponent.h +++ b/Source/LegumeMix/Public/Player/LMHealthComponent.h @@ -17,6 +17,7 @@ class LEGUMEMIX_API ULMHealthComponent : public UActorComponent DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnHealthChangedSignature, float, Health, float, Damage); DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnDeathSignature); + DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnHitSignature, float, Damage, const FVector&, Origin, const FHitResult&, HitInfo); public: ULMHealthComponent(); @@ -78,8 +79,8 @@ public: * @param Origin The origin of the damage. * @param HitInfo The collisions informations. */ - UFUNCTION(BlueprintImplementableEvent, Category=Legumix, meta=(Keywords = "Refill")) - void OnHit(float Damage, const FVector& Origin, const FHitResult& HitInfo); + UPROPERTY(BlueprintCallable, BlueprintAssignable, Category=Legumix) + FOnHitSignature OnHit; /** * Completely refill the health of the component. From fdac89c84c78477f4db54c740709517356f525b5 Mon Sep 17 00:00:00 2001 From: TjgL Date: Fri, 14 Mar 2025 15:31:45 +0100 Subject: [PATCH 07/10] Updated hitboxes OnHit signature Signed-off-by: TjgL --- Source/LegumeMix/Private/Player/LMHitBox.cpp | 10 +++++++--- Source/LegumeMix/Public/Player/LMHitBox.h | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Source/LegumeMix/Private/Player/LMHitBox.cpp b/Source/LegumeMix/Private/Player/LMHitBox.cpp index 59d2772..28fffb2 100644 --- a/Source/LegumeMix/Private/Player/LMHitBox.cpp +++ b/Source/LegumeMix/Private/Player/LMHitBox.cpp @@ -14,11 +14,15 @@ ULMHitBox::ULMHitBox() void ULMHitBox::OnHit(const FLMBulletInfo& BulletInfo, const FHitResult& Hit) { - const float Damage = BulletInfo.Damage; const double Distance = FVector::Distance(BulletInfo.Origin, GetComponentLocation()); - const float TotalDamage = CalculateDamage(Damage, Distance, BulletInfo.Falloff, BulletInfo.MaxDistance); - OnHitBoxHit.Broadcast(this, TotalDamage, BulletInfo.Origin, Hit); + const float TotalDamage = CalculateDamage(BulletInfo.Damage, Distance, BulletInfo.Falloff, BulletInfo.MaxDistance); + OnHitSimple(TotalDamage, BulletInfo.Origin, Hit); +} + +void ULMHitBox::OnHitSimple(float const Damage, FVector const Origin, const FHitResult& Hit) +{ + OnHitBoxHit.Broadcast(this, Damage, Origin, Hit); } bool ULMHitBox::CanBeHitByTeam(const ETeam Team) const diff --git a/Source/LegumeMix/Public/Player/LMHitBox.h b/Source/LegumeMix/Public/Player/LMHitBox.h index d7730e0..cf43325 100644 --- a/Source/LegumeMix/Public/Player/LMHitBox.h +++ b/Source/LegumeMix/Public/Player/LMHitBox.h @@ -20,7 +20,12 @@ class LEGUMEMIX_API ULMHitBox : public UCapsuleComponent public: ULMHitBox(); + UFUNCTION(BlueprintCallable, Category=Legumix) void OnHit(const FLMBulletInfo& BulletInfo, const FHitResult& Hit); + + UFUNCTION(BlueprintCallable, Category=Legumix) + void OnHitSimple(float const Damage, FVector const Origin, const FHitResult& Hit); + void SetHealthComponent(ULMHealthComponent* NewHealthComponent) { HealthComponent = NewHealthComponent; } bool CanBeHitByTeam(ETeam Team) const; From 93902db9f387035077866e9178dc911af9a4db55 Mon Sep 17 00:00:00 2001 From: Bastien Date: Fri, 14 Mar 2025 15:32:17 +0100 Subject: [PATCH 08/10] Updated HitBoxes of Distant Enemy --- Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset b/Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset index 73fdb97..ae5bddb 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7fdc538e287b86a265644d815e86864477eb473a9cea3bf5db18f2cbb560b16 -size 228106 +oid sha256:b8bf7ffe8da31caf170e1f29ab0c1f5bbe18f5968ac10245c639b45f31408800 +size 225874 From a00f8fe34fc3cb7ef08ab2e83adcceb8bc8f9189 Mon Sep 17 00:00:00 2001 From: Emilie Schott Date: Fri, 14 Mar 2025 15:58:44 +0100 Subject: [PATCH 09/10] Add visibility check to range enemy --- Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset | 4 ++-- Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset | 4 ++-- Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset | 4 ++-- .../Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset b/Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset index f8d5881..fdf0bca 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a107424ffc6ebb0f23396a35dd508a2d8b9a5db2db575b6630c3ddf4c636b70 -size 3751 +oid sha256:3ec010f9d10c746d023616187617e0ac72835c6db41aba07e35a8e070836234c +size 4061 diff --git a/Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset b/Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset index 0e6df4d..d217f40 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a38163c2ae9205a9e045f96a2b83f45b1e9ec839d2d3dc960ec92ce95f66957 -size 39255 +oid sha256:6b3b48ee54de4057750220a75ab38b05a71851062d1b598cb7af3de7ed2e6a05 +size 27679 diff --git a/Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset b/Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset index 73fdb97..2acadc3 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7fdc538e287b86a265644d815e86864477eb473a9cea3bf5db18f2cbb560b16 -size 228106 +oid sha256:d9e809836ff6ce303a3459a6f7e54984d9300918c1de0a04299f3f6a28c085f4 +size 319722 diff --git a/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset b/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset index bd11337..d50f3c8 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d0ef574d7a66351e5bfac859899a6433e7347ebc154f3c3b63159aa79cc0d12 -size 68006 +oid sha256:c667e07e8680cae64a05c5e866404ac9e9a7c21e4d48c6c81da9944f7f49f461 +size 60552 From 80e3a5190f1d0018eaa2d34ad75af2984b17862f Mon Sep 17 00:00:00 2001 From: TjgL Date: Fri, 14 Mar 2025 16:00:01 +0100 Subject: [PATCH 10/10] Removed incorrect include Signed-off-by: TjgL --- Source/LegumeMix/Private/LMWaveManager.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/LegumeMix/Private/LMWaveManager.cpp b/Source/LegumeMix/Private/LMWaveManager.cpp index c2228b2..2e4427c 100644 --- a/Source/LegumeMix/Private/LMWaveManager.cpp +++ b/Source/LegumeMix/Private/LMWaveManager.cpp @@ -2,7 +2,6 @@ #include "LMWaveManager.h" -#include "IPropertyTable.h" #include "Components/CapsuleComponent.h" #include "Enemy/LMEnemy.h"