From ab8be82328ee2282b05f6a4a168313976c200285 Mon Sep 17 00:00:00 2001 From: Emilie Schott <43524962+EmilieSchott@users.noreply.github.com> Date: Sun, 13 Apr 2025 19:32:25 +0200 Subject: [PATCH 1/4] [UPD] Improve enemies repositioning when overlapping on each other. --- .../Ennemy/Common/Context/EQC_DistantEnemyLocations.uasset | 3 +++ Content/Legumix/Ennemy/Common/Context/EQC_EQSOrigin.uasset | 3 +++ .../Ennemy/Common/Context/EQC_MeleeEnemyLocations.uasset | 3 +++ Content/Legumix/Ennemy/Common/Context/EQC_Player.uasset | 3 +++ Content/Legumix/Ennemy/Common/EQSTester_Repositioning.uasset | 3 +++ Content/Legumix/Ennemy/Common/EQS_Repositioning.uasset | 3 +++ .../Ennemy/Common/Service/BTService_RamdomLocation.uasset | 3 +++ .../Legumix/Ennemy/Context/EQC_DistantEnemyLocations.uasset | 3 --- Content/Legumix/Ennemy/Context/EQC_EQSOrigin.uasset | 3 --- Content/Legumix/Ennemy/Context/EQC_MeleeEnemyLocations.uasset | 3 --- Content/Legumix/Ennemy/Context/EQC_Player.uasset | 3 --- Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset | 4 ++-- Content/Legumix/Ennemy/MeleeEnemy/AI/EQS_MeleeEnnemy.uasset | 4 ++-- Content/Legumix/Ennemy/MeleeEnemy/AIC_MeleeEnemy.uasset | 4 ++-- Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset | 4 ++-- Content/Legumix/Ennemy/RangeEnemy/AI/EQS_RangeEnnemy.uasset | 4 ++-- Content/Legumix/Ennemy/RangeEnemy/AIC_DistantEnnemy.uasset | 2 +- .../Legumix/Ennemy/Service/BTService_RamdomLocation.uasset | 3 --- Content/Legumix/Levels/LVL_00.umap | 4 ++-- Content/Legumix/Player/BP_Play.uasset | 4 ++-- 20 files changed, 36 insertions(+), 30 deletions(-) create mode 100644 Content/Legumix/Ennemy/Common/Context/EQC_DistantEnemyLocations.uasset create mode 100644 Content/Legumix/Ennemy/Common/Context/EQC_EQSOrigin.uasset create mode 100644 Content/Legumix/Ennemy/Common/Context/EQC_MeleeEnemyLocations.uasset create mode 100644 Content/Legumix/Ennemy/Common/Context/EQC_Player.uasset create mode 100644 Content/Legumix/Ennemy/Common/EQSTester_Repositioning.uasset create mode 100644 Content/Legumix/Ennemy/Common/EQS_Repositioning.uasset create mode 100644 Content/Legumix/Ennemy/Common/Service/BTService_RamdomLocation.uasset delete mode 100644 Content/Legumix/Ennemy/Context/EQC_DistantEnemyLocations.uasset delete mode 100644 Content/Legumix/Ennemy/Context/EQC_EQSOrigin.uasset delete mode 100644 Content/Legumix/Ennemy/Context/EQC_MeleeEnemyLocations.uasset delete mode 100644 Content/Legumix/Ennemy/Context/EQC_Player.uasset delete mode 100644 Content/Legumix/Ennemy/Service/BTService_RamdomLocation.uasset diff --git a/Content/Legumix/Ennemy/Common/Context/EQC_DistantEnemyLocations.uasset b/Content/Legumix/Ennemy/Common/Context/EQC_DistantEnemyLocations.uasset new file mode 100644 index 0000000..4c7cb10 --- /dev/null +++ b/Content/Legumix/Ennemy/Common/Context/EQC_DistantEnemyLocations.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:414f9c35b4c883cb2ae681751eec864ff0f2d3307cbdd3b21349aa8b4cb01857 +size 98785 diff --git a/Content/Legumix/Ennemy/Common/Context/EQC_EQSOrigin.uasset b/Content/Legumix/Ennemy/Common/Context/EQC_EQSOrigin.uasset new file mode 100644 index 0000000..41d1051 --- /dev/null +++ b/Content/Legumix/Ennemy/Common/Context/EQC_EQSOrigin.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28779733f9faf7aa4e00964c1b0172df53474d1dd0af1336a074d08bc0bc6b0a +size 26771 diff --git a/Content/Legumix/Ennemy/Common/Context/EQC_MeleeEnemyLocations.uasset b/Content/Legumix/Ennemy/Common/Context/EQC_MeleeEnemyLocations.uasset new file mode 100644 index 0000000..b48fdf9 --- /dev/null +++ b/Content/Legumix/Ennemy/Common/Context/EQC_MeleeEnemyLocations.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0044fabe903f2477e9e45ee3432d504ec1af408a1f3d9e23ce100e015651327b +size 59697 diff --git a/Content/Legumix/Ennemy/Common/Context/EQC_Player.uasset b/Content/Legumix/Ennemy/Common/Context/EQC_Player.uasset new file mode 100644 index 0000000..3c7dcc0 --- /dev/null +++ b/Content/Legumix/Ennemy/Common/Context/EQC_Player.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3dd00350a42adbea2236a4e1536ca7f975243c9bf97e24a23185336bdf36d313 +size 29332 diff --git a/Content/Legumix/Ennemy/Common/EQSTester_Repositioning.uasset b/Content/Legumix/Ennemy/Common/EQSTester_Repositioning.uasset new file mode 100644 index 0000000..4fa7ae1 --- /dev/null +++ b/Content/Legumix/Ennemy/Common/EQSTester_Repositioning.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f37ca1a3f9c81163b62687b9c406666bf31bac78366c50b9b419007b2448ce6 +size 26415 diff --git a/Content/Legumix/Ennemy/Common/EQS_Repositioning.uasset b/Content/Legumix/Ennemy/Common/EQS_Repositioning.uasset new file mode 100644 index 0000000..29df4e7 --- /dev/null +++ b/Content/Legumix/Ennemy/Common/EQS_Repositioning.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d6b4fab61969e548d7c048bf703105576ae3029cbe7d90c99d94f69f071964a +size 77340 diff --git a/Content/Legumix/Ennemy/Common/Service/BTService_RamdomLocation.uasset b/Content/Legumix/Ennemy/Common/Service/BTService_RamdomLocation.uasset new file mode 100644 index 0000000..8b5bfda --- /dev/null +++ b/Content/Legumix/Ennemy/Common/Service/BTService_RamdomLocation.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5af4610a8c675dd5b36cd8a2903c78d583bcfab255ba9f93c150fcce58064456 +size 45679 diff --git a/Content/Legumix/Ennemy/Context/EQC_DistantEnemyLocations.uasset b/Content/Legumix/Ennemy/Context/EQC_DistantEnemyLocations.uasset deleted file mode 100644 index 00320a5..0000000 --- a/Content/Legumix/Ennemy/Context/EQC_DistantEnemyLocations.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd3864611f85af64f94bfb9239c8a25e20ca2e652dee5b7fdd0456703ce96462 -size 98764 diff --git a/Content/Legumix/Ennemy/Context/EQC_EQSOrigin.uasset b/Content/Legumix/Ennemy/Context/EQC_EQSOrigin.uasset deleted file mode 100644 index 4fdf5fd..0000000 --- a/Content/Legumix/Ennemy/Context/EQC_EQSOrigin.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb6b98c938f787edd39ba7b5eba1d247b5d8486e1552c00a2e972453dcb89568 -size 26750 diff --git a/Content/Legumix/Ennemy/Context/EQC_MeleeEnemyLocations.uasset b/Content/Legumix/Ennemy/Context/EQC_MeleeEnemyLocations.uasset deleted file mode 100644 index 523d790..0000000 --- a/Content/Legumix/Ennemy/Context/EQC_MeleeEnemyLocations.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc82f9b82ae4e63d2b30eaebebdf434e8e4d5366e887fb69b92b8c0d0a2cc223 -size 59676 diff --git a/Content/Legumix/Ennemy/Context/EQC_Player.uasset b/Content/Legumix/Ennemy/Context/EQC_Player.uasset deleted file mode 100644 index b55a8b7..0000000 --- a/Content/Legumix/Ennemy/Context/EQC_Player.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67db24a9755938d1f2299ed42fbaf542c6b3f29a5ade1be09a3998293abfe23b -size 29311 diff --git a/Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset b/Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset index bdcb28d..4414c5a 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:70ea675921109cba06dabcf233ae24f1b7f95143edd6af99a2b7d7b61d161935 -size 60558 +oid sha256:7c6df0893b30d980b186fc7bc667dd39ae2de290e28aef99505b4617b23f785e +size 60680 diff --git a/Content/Legumix/Ennemy/MeleeEnemy/AI/EQS_MeleeEnnemy.uasset b/Content/Legumix/Ennemy/MeleeEnemy/AI/EQS_MeleeEnnemy.uasset index 06bdfbc..5fd1260 100644 --- a/Content/Legumix/Ennemy/MeleeEnemy/AI/EQS_MeleeEnnemy.uasset +++ b/Content/Legumix/Ennemy/MeleeEnemy/AI/EQS_MeleeEnnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:92159f04f84e6abff81679ec9579ad1bc82a56c32d09b2f5ab7f395ed6b0d53f -size 77513 +oid sha256:869bdcdd4f344e2ab66a64ec42a0856af0652693304e2e440c90f8e8359e93c5 +size 77534 diff --git a/Content/Legumix/Ennemy/MeleeEnemy/AIC_MeleeEnemy.uasset b/Content/Legumix/Ennemy/MeleeEnemy/AIC_MeleeEnemy.uasset index 24f124f..19264b6 100644 --- a/Content/Legumix/Ennemy/MeleeEnemy/AIC_MeleeEnemy.uasset +++ b/Content/Legumix/Ennemy/MeleeEnemy/AIC_MeleeEnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59e0c939d99558cb5e28257c0c79c3d0dbb4b75008f5f3e05be4a61f193bc2d2 -size 259366 +oid sha256:e1f929f3afefc9553504746b0ab89b6f52984538381c1d63e507c622da72b1a8 +size 259248 diff --git a/Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset b/Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset index 5118190..a256b1e 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:623fa1d22fc3f9672642bddfcbbf90f2044035db0c5ea9fe06d792a0b9798857 -size 77035 +oid sha256:36ba1b9096c93a89827b3d99d43f9aba2ca1b908ac2720e0cec56a40c700009e +size 77160 diff --git a/Content/Legumix/Ennemy/RangeEnemy/AI/EQS_RangeEnnemy.uasset b/Content/Legumix/Ennemy/RangeEnemy/AI/EQS_RangeEnnemy.uasset index cc6ceca..2ca4e00 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/AI/EQS_RangeEnnemy.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/AI/EQS_RangeEnnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f55695ded4787b3438d6050906111547df1659c52fdce064fbe8cdf8bb9daad5 -size 55613 +oid sha256:6a116d3cdfe68fd120a0318c053ca3d6ef9a6c0991400f34d3fa1eeb9143cfd0 +size 55634 diff --git a/Content/Legumix/Ennemy/RangeEnemy/AIC_DistantEnnemy.uasset b/Content/Legumix/Ennemy/RangeEnemy/AIC_DistantEnnemy.uasset index 0576fa4..ffe685d 100644 --- a/Content/Legumix/Ennemy/RangeEnemy/AIC_DistantEnnemy.uasset +++ b/Content/Legumix/Ennemy/RangeEnemy/AIC_DistantEnnemy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3f82f83b107cddb7a194937d15ae99b836d73552882f9778cd0c62408fad5b90 +oid sha256:ca6ef27a68c3c6a0edd7716b9d94be42eb4733f75e76161305b2c82aa7abd7f9 size 250747 diff --git a/Content/Legumix/Ennemy/Service/BTService_RamdomLocation.uasset b/Content/Legumix/Ennemy/Service/BTService_RamdomLocation.uasset deleted file mode 100644 index 6950ee3..0000000 --- a/Content/Legumix/Ennemy/Service/BTService_RamdomLocation.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:472a683876e160fa7e935e2d40825fad4d85fcff48bd3a90da4e8aa9407b8b31 -size 45644 diff --git a/Content/Legumix/Levels/LVL_00.umap b/Content/Legumix/Levels/LVL_00.umap index 154756a..b283107 100644 --- a/Content/Legumix/Levels/LVL_00.umap +++ b/Content/Legumix/Levels/LVL_00.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9cb07fa559d9b54125bdefbfc83ab7b3ad198a82b4cdf276f9de01623818ff49 -size 149373 +oid sha256:d7dc221bff32a83b0babd6af8dc485f118e2633e1ea5f1103c6735aa8fec73d1 +size 173196 diff --git a/Content/Legumix/Player/BP_Play.uasset b/Content/Legumix/Player/BP_Play.uasset index 099de9f..d41dfa8 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:afcadbb313be0cd15c4e326c756d83a0de86b0a76ebb4720e69e5a60dac3dc4d -size 713087 +oid sha256:dc0f435c3bc80004c4057b0b0cf78d843abc1e8f4af5d4fb98f5b673bddaba07 +size 692338 From e581fbd67cf73fdc4eeb8b3bf02e1e6a422d71b2 Mon Sep 17 00:00:00 2001 From: TjgL Date: Sun, 13 Apr 2025 19:35:32 +0200 Subject: [PATCH 2/4] Added additional check to the ledge grab Signed-off-by: TjgL --- Content/Legumix/Player/BP_Play.uasset | 4 ++-- Source/LegumeMix/Private/Player/LMPlayer.cpp | 20 +++++++++++++++++++- Source/LegumeMix/Public/Player/LMPlayer.h | 3 +++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Content/Legumix/Player/BP_Play.uasset b/Content/Legumix/Player/BP_Play.uasset index 099de9f..1c933c7 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:afcadbb313be0cd15c4e326c756d83a0de86b0a76ebb4720e69e5a60dac3dc4d -size 713087 +oid sha256:7a4f92a92c0ec69de7372bb1d84c99045289f6d16e294c4510588044e9950325 +size 709359 diff --git a/Source/LegumeMix/Private/Player/LMPlayer.cpp b/Source/LegumeMix/Private/Player/LMPlayer.cpp index e0634ac..3728f62 100644 --- a/Source/LegumeMix/Private/Player/LMPlayer.cpp +++ b/Source/LegumeMix/Private/Player/LMPlayer.cpp @@ -283,11 +283,29 @@ void ALMPlayer::DoLedgeGrabCheck() FVector Dir = LedgeGrabOrigin->GetUpVector() * FVector(0, 0, -LedgeGrabTraceLength); FVector Ray = Origin + Dir; + EDrawDebugTrace::Type DrawDebug = bShowLedgeDebug ? EDrawDebugTrace::ForDuration : EDrawDebugTrace::None; + FHitResult Hit; const bool Results = UKismetSystemLibrary::LineTraceSingleByProfile(GetWorld(), Origin, Ray, TEXT("BlockAll"), false - , {}, EDrawDebugTrace::None, Hit, true, FLinearColor::Red, FLinearColor::Green, 0.2f); + , {}, DrawDebug, Hit, true, FLinearColor::Red, FLinearColor::Green, 10.f); if (Results) { + FHitResult CapsuleCheck; + float HalfHeight = LegumixMovementComponent->bWantsToCrouch ? LegumixMovementComponent->CrouchedHalfHeight : GetCapsuleComponent()->GetScaledCapsuleHalfHeight(); + const FVector Offset = Hit.ImpactPoint + FVector(0, 0, HalfHeight + GetCapsuleComponent()->GetScaledCapsuleRadius()); + + const bool IsObstructed = UKismetSystemLibrary::CapsuleTraceSingleByProfile(GetWorld(), Offset, Offset, + GetCapsuleComponent()->GetScaledCapsuleRadius(), + GetCapsuleComponent()->GetScaledCapsuleHalfHeight(), TEXT("BlockAll"), false, + {}, DrawDebug, CapsuleCheck, true, FLinearColor::Green, FLinearColor::Red, 10.f); + + if (IsObstructed) + { + return; + // if (CapsuleCheck.ImpactPoint.Z > CapsuleCheck.Location.Z - HalfHeight) + // return; + } + FVector TeleportLocation = FVector(Hit.Location.X, Hit.Location.Y, Hit.Location.Z + GetCapsuleComponent()->GetScaledCapsuleHalfHeight()); SetActorLocation(TeleportLocation, false, nullptr, ETeleportType::ResetPhysics); } diff --git a/Source/LegumeMix/Public/Player/LMPlayer.h b/Source/LegumeMix/Public/Player/LMPlayer.h index 55d8524..50d7c22 100644 --- a/Source/LegumeMix/Public/Player/LMPlayer.h +++ b/Source/LegumeMix/Public/Player/LMPlayer.h @@ -217,6 +217,9 @@ private: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta = (AllowPrivateAccess = true, ClampMin = 0.01f)) float CoyoteTimeLength = 0.5f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|LedgeGrab", meta = (AllowPrivateAccess = true, ClampMin = 0.f)) + bool bShowLedgeDebug = false; + /** * Actualize all parameters needed to calculate PlayerViewOcclusionPercent */ From 323846b4dd029baa1fe8e92e61fa61aad989eda5 Mon Sep 17 00:00:00 2001 From: TjgL Date: Sun, 13 Apr 2025 19:38:28 +0200 Subject: [PATCH 3/4] Disabled most debug logs Signed-off-by: TjgL --- .../LegumeMix/Private/Ammo/LMItemDropComponent.cpp | 4 ++-- Source/LegumeMix/Private/LMItemDrop.cpp | 4 ++-- Source/LegumeMix/Private/Player/LMGrabRange.cpp | 4 ++-- Source/LegumeMix/Private/Player/LMHitBox.cpp | 6 +++--- Source/LegumeMix/Private/Player/LMPlayer.cpp | 4 ++-- Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp | 12 ++++++------ 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Source/LegumeMix/Private/Ammo/LMItemDropComponent.cpp b/Source/LegumeMix/Private/Ammo/LMItemDropComponent.cpp index 8a90783..7fd4d92 100644 --- a/Source/LegumeMix/Private/Ammo/LMItemDropComponent.cpp +++ b/Source/LegumeMix/Private/Ammo/LMItemDropComponent.cpp @@ -32,8 +32,8 @@ void ULMItemDropComponent::TryDropItems() const float Percentage = static_cast(Test.AmmoCount) / static_cast(Test.MaxAmmo); const float DropChance = DropChanceAtRemainingAmmo->GetFloatValue(Percentage); - FString Random = FString::Printf(TEXT("Drop Chance of %f for ammo (%i / %i) %f with random at %f"), DropChance, Test.AmmoCount, Test.MaxAmmo, Percentage, Result); - GEngine->AddOnScreenDebugMessage(INDEX_NONE, 5.f, FColor::Green, Random); + // FString Random = FString::Printf(TEXT("Drop Chance of %f for ammo (%i / %i) %f with random at %f"), DropChance, Test.AmmoCount, Test.MaxAmmo, Percentage, Result); + // GEngine->AddOnScreenDebugMessage(INDEX_NONE, 5.f, FColor::Green, Random); if (DropChance >= Result) { SpawnAmmo(); diff --git a/Source/LegumeMix/Private/LMItemDrop.cpp b/Source/LegumeMix/Private/LMItemDrop.cpp index e6ad47e..0a3155b 100644 --- a/Source/LegumeMix/Private/LMItemDrop.cpp +++ b/Source/LegumeMix/Private/LMItemDrop.cpp @@ -43,8 +43,8 @@ void ALMItemDrop::DoMovingTowardsTarget() const float Duration = MoveTime / MoveDuration; - FString text = FString::Printf(TEXT("Time : %f / %f = %f"), MoveTime, MoveDuration, Duration); - GEngine->AddOnScreenDebugMessage(-15, 1.f, FColor::Red, text); + // FString text = FString::Printf(TEXT("Time : %f / %f = %f"), MoveTime, MoveDuration, Duration); + // GEngine->AddOnScreenDebugMessage(-15, 1.f, FColor::Red, text); const float CurvePosition = PositionAtTime->GetFloatValue(Duration); const FVector NewPosition = UKismetMathLibrary::VLerp(SpawnLocation, Position, CurvePosition); diff --git a/Source/LegumeMix/Private/Player/LMGrabRange.cpp b/Source/LegumeMix/Private/Player/LMGrabRange.cpp index 0a67c9b..4420350 100644 --- a/Source/LegumeMix/Private/Player/LMGrabRange.cpp +++ b/Source/LegumeMix/Private/Player/LMGrabRange.cpp @@ -28,8 +28,8 @@ void ULMGrabRange::TickComponent(float DeltaTime, enum ELevelTick TickType, FAct const FVector Position = GetComponentLocation(); const float DistanceLeft = FVector::Dist(ItemPosition, Position); - FString text = FString::Printf(TEXT("Item %s at distance %f"), *Item->GetName(), DistanceLeft); - GEngine->AddOnScreenDebugMessage(i, 1.f, FColor::Cyan, text); + // FString text = FString::Printf(TEXT("Item %s at distance %f"), *Item->GetName(), DistanceLeft); + // GEngine->AddOnScreenDebugMessage(i, 1.f, FColor::Cyan, text); if (DistanceLeft <= RangeToGrab) { diff --git a/Source/LegumeMix/Private/Player/LMHitBox.cpp b/Source/LegumeMix/Private/Player/LMHitBox.cpp index 28fffb2..8428090 100644 --- a/Source/LegumeMix/Private/Player/LMHitBox.cpp +++ b/Source/LegumeMix/Private/Player/LMHitBox.cpp @@ -37,13 +37,13 @@ float ULMHitBox::CalculateDamage_Implementation(const float Damage, const float { const float Absorption = Damage - FlatDamageAbsorption; const float FalloffModifier = Falloff->GetFloatValue(Distance / MaxDistance); - UE_LOG(LogTemp, Display, TEXT("Falloff : %f"), FalloffModifier); + // UE_LOG(LogTemp, Display, TEXT("Falloff : %f"), FalloffModifier); const float FalloffDamage = Absorption * FalloffModifier; - UE_LOG(LogTemp, Display, TEXT("Damage With Fallof: %f"), FalloffDamage) + // UE_LOG(LogTemp, Display, TEXT("Damage With Fallof: %f"), FalloffDamage) const float FinalDamage = FalloffDamage * DamageModifier; - UE_LOG(LogTemp, Display, TEXT("Final Damages: %f"), FinalDamage) + // UE_LOG(LogTemp, Display, TEXT("Final Damages: %f"), FinalDamage) return FinalDamage; } diff --git a/Source/LegumeMix/Private/Player/LMPlayer.cpp b/Source/LegumeMix/Private/Player/LMPlayer.cpp index 3728f62..7ea275e 100644 --- a/Source/LegumeMix/Private/Player/LMPlayer.cpp +++ b/Source/LegumeMix/Private/Player/LMPlayer.cpp @@ -89,8 +89,8 @@ bool ALMPlayer::PickUpAmmo(ALMAmmo* Ammo) { if (GEngine) { - const FString AmmoAmount = FString::Printf(TEXT("Quantité de munition : %i"), Ammo->GetAmmoAmount()); - GEngine->AddOnScreenDebugMessage(INDEX_NONE, 30.f, FColor::Red, AmmoAmount); + // const FString AmmoAmount = FString::Printf(TEXT("Quantité de munition : %i"), Ammo->GetAmmoAmount()); + // GEngine->AddOnScreenDebugMessage(INDEX_NONE, 30.f, FColor::Red, AmmoAmount); } if (WeaponManager->AddAmmoType(Ammo->GetAmmoType(), Ammo->GetAmmoAmount())) diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp index 86cc68e..98d3437 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp @@ -56,17 +56,17 @@ int ULMWeaponManager::RemoveAmmo(const EAmmoType Ammo, const int Count) FLMAmmoData &Data = AmmoData[Ammo]; int Difference = Data.AmmoCount - Count; - UE_LOG(LogTemp, Display, TEXT("Difference: %i | Removing: %i | Storage: %i"), Difference, Count, Data.AmmoCount) + // UE_LOG(LogTemp, Display, TEXT("Difference: %i | Removing: %i | Storage: %i"), Difference, Count, Data.AmmoCount) if (Difference < 0) { - UE_LOG(LogTemp, Error, TEXT("%i - %i = %i"), Data.AmmoCount, Count, Data.AmmoCount - Count); + // UE_LOG(LogTemp, Error, TEXT("%i - %i = %i"), Data.AmmoCount, Count, Data.AmmoCount - Count); Data.AmmoCount = FMath::Clamp(Data.AmmoCount - Count, InfiniteAmmo == 1 ? 1 : 0, Data.MaxAmmo); - UE_LOG(LogTemp, Warning, TEXT("Difference < 0 | Munition to add: %i | Removed: %i | New Munition: %i"), Count + Difference, Count, Data.AmmoCount) + // UE_LOG(LogTemp, Warning, TEXT("Difference < 0 | Munition to add: %i | Removed: %i | New Munition: %i"), Count + Difference, Count, Data.AmmoCount) return Count + Difference; } Data.AmmoCount -= Count; - UE_LOG(LogTemp, Warning, TEXT("New munition: %i | Removed: %i"), Data.AmmoCount, Count) + // UE_LOG(LogTemp, Warning, TEXT("New munition: %i | Removed: %i"), Data.AmmoCount, Count) return Count; } @@ -110,8 +110,8 @@ void ULMWeaponManager::Initialize(USkeletalMeshComponent* Mesh) bool ULMWeaponManager::AddAmmoType(EAmmoType AmmoType, int AmmoCount) { - FString Debug = FString::Printf(TEXT("Adding %i ammo of type %i"), AmmoCount, AmmoType); - GEngine->AddOnScreenDebugMessage(1, 1.f, FColor::Cyan, Debug); + // FString Debug = FString::Printf(TEXT("Adding %i ammo of type %i"), AmmoCount, AmmoType); + // GEngine->AddOnScreenDebugMessage(1, 1.f, FColor::Cyan, Debug); if (AmmoData.Contains(AmmoType)) { From e4f0f54eb3cde58c68ab5a3fc8fad10b0429f095 Mon Sep 17 00:00:00 2001 From: TjgL Date: Sun, 13 Apr 2025 19:41:47 +0200 Subject: [PATCH 4/4] Added enemies spawn curves Signed-off-by: TjgL --- Content/Legumix/Levels/LVL_TEST_003.umap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content/Legumix/Levels/LVL_TEST_003.umap b/Content/Legumix/Levels/LVL_TEST_003.umap index 54ef61f..fa2c4a2 100644 --- a/Content/Legumix/Levels/LVL_TEST_003.umap +++ b/Content/Legumix/Levels/LVL_TEST_003.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec06bdabab534c892c887a3610e3f3bf39daedf1b65150240b30af4c053ef1f8 -size 2052408 +oid sha256:42cb6a1b5cdf4aa98127c695d9988488d2606168ea58d82280bc8138ea3ba9ff +size 2071324