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/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/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..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:f986054c9d8609e68bb4ca0f591a85cada17a9a90f4045192d61c3414dce6b47 -size 3669 +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 5c8882e..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:1287a9243fb01d57578f28f7d6fa086b59c94db6798ebafbe7a802460e625117 -size 26167 +oid sha256:6b3b48ee54de4057750220a75ab38b05a71851062d1b598cb7af3de7ed2e6a05 +size 27679 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..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:203ca7e51af57d0ce79a85114f04bda9c3f89e53346febbe05b3af57bdfcfcf0 -size 179528 +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 459997b..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:158be6df4930d58c4cbcda01c3bc2eaa26412952cd1e956e556eac62f68ed3ed -size 56803 +oid sha256:c667e07e8680cae64a05c5e866404ac9e9a7c21e4d48c6c81da9944f7f49f461 +size 60552 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 diff --git a/Content/Legumix/Player/BP_Play.uasset b/Content/Legumix/Player/BP_Play.uasset index d55f464..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:702fdfa7c759cd9be31ce980039bae516d28853a25280019bb7a0fab0d713867 -size 515116 +oid sha256:c1777df2d9f2377eb2929d1c0d531c7b59c5226984dfcacb42aaf66ebb999e1f +size 634881 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/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/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" 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/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/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..576ed93 100644 --- a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp +++ b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp @@ -30,8 +30,8 @@ void ALMShotgun::PrimaryFire() return; } - PlayEvent(FireEvent); PlayAnimation(PrimaryFireAnimation); + Player->PlayAnimation(PrimaryFireArmsAnimation); const FVector Origin = Player->GetWeaponFiringOrigin(); const FVector Direction = Player->GetAimVector(); 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/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. 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; 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;