From 5524705f609634e503035a7b8ffe506625c81abc Mon Sep 17 00:00:00 2001 From: TjgL Date: Wed, 22 Jan 2025 16:10:41 +0100 Subject: [PATCH 01/30] Updated some data types --- Source/LegumeMix/Private/Player/LMPlayer.cpp | 9 ++++----- Source/LegumeMix/Public/Player/LMPlayer.h | 8 ++++---- Source/LegumeMix/Public/Weapon/LMAmmo.h | 7 +------ Source/LegumeMix/Public/Weapon/LMAmmoType.h | 8 ++++++++ .../Public/Weapon/LMWeaponDataStructure.h | 19 +++++++++++-------- 5 files changed, 28 insertions(+), 23 deletions(-) create mode 100644 Source/LegumeMix/Public/Weapon/LMAmmoType.h diff --git a/Source/LegumeMix/Private/Player/LMPlayer.cpp b/Source/LegumeMix/Private/Player/LMPlayer.cpp index b3b65f5..b32b23e 100644 --- a/Source/LegumeMix/Private/Player/LMPlayer.cpp +++ b/Source/LegumeMix/Private/Player/LMPlayer.cpp @@ -17,8 +17,8 @@ ALMPlayer::ALMPlayer() Camera->bUsePawnControlRotation = true; Camera->SetRelativeLocation(FVector(20, 0, 90)); - WeaponSkeletalMeshComponent = CreateDefaultSubobject(TEXT("Weapon Mesh")); - WeaponSkeletalMeshComponent->SetupAttachment(Camera); + ArmsMesh = CreateDefaultSubobject(TEXT("Arms Mesh")); + ArmsMesh->SetupAttachment(Camera); } // Called when the game starts or when spawned @@ -48,16 +48,15 @@ void ALMPlayer::SetWeaponManager(ULMWeaponManager* Manager) } WeaponManager = Manager; - WeaponManager->Initialize(WeaponSkeletalMeshComponent); + WeaponManager->Initialize(ArmsMesh); } -// Called every frame + void ALMPlayer::Tick(float DeltaTime) { Super::Tick(DeltaTime); } -// Called to bind functionality to input void ALMPlayer::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) { Super::SetupPlayerInputComponent(PlayerInputComponent); diff --git a/Source/LegumeMix/Public/Player/LMPlayer.h b/Source/LegumeMix/Public/Player/LMPlayer.h index 4027c1b..510b8c2 100644 --- a/Source/LegumeMix/Public/Player/LMPlayer.h +++ b/Source/LegumeMix/Public/Player/LMPlayer.h @@ -37,12 +37,12 @@ public: void SetWeaponManager(ULMWeaponManager* Manager); private: - UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Legumix", meta = (AllowPrivateAccess = true)) + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Legumix, meta = (AllowPrivateAccess = true)) TObjectPtr WeaponManager; - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Legumix", meta = (AllowPrivateAccess = true)) - TObjectPtr WeaponSkeletalMeshComponent; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Legumix, meta = (AllowPrivateAccess = true)) + TObjectPtr ArmsMesh; - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Legumix", meta = (AllowPrivateAccess = true)) + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Legumix, meta = (AllowPrivateAccess = true)) TObjectPtr Camera; }; diff --git a/Source/LegumeMix/Public/Weapon/LMAmmo.h b/Source/LegumeMix/Public/Weapon/LMAmmo.h index d397a72..a799d5a 100644 --- a/Source/LegumeMix/Public/Weapon/LMAmmo.h +++ b/Source/LegumeMix/Public/Weapon/LMAmmo.h @@ -3,17 +3,12 @@ #pragma once #include "CoreMinimal.h" +#include "LMAmmoType.h" #include "GameFramework/Actor.h" #include "LMAmmo.generated.h" class USphereComponent; -UENUM(BlueprintType) -enum class EAmmoType : uint8 -{ - EAT_RadishAmmo UMETA(DisplayName = "Radish Ammo"), - EAT_CornAmmo UMETA(DisplayName = "Corn Ammo") -}; UCLASS() class LEGUMEMIX_API ALMAmmo : public AActor diff --git a/Source/LegumeMix/Public/Weapon/LMAmmoType.h b/Source/LegumeMix/Public/Weapon/LMAmmoType.h new file mode 100644 index 0000000..3d84e1d --- /dev/null +++ b/Source/LegumeMix/Public/Weapon/LMAmmoType.h @@ -0,0 +1,8 @@ +#pragma once + +UENUM(BlueprintType) +enum class EAmmoType : uint8 +{ + EAT_RadishAmmo UMETA(DisplayName = "Radish Ammo"), + EAT_CornAmmo UMETA(DisplayName = "Corn Ammo") +}; \ No newline at end of file diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h b/Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h index 033939a..0572676 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h @@ -1,6 +1,4 @@ #pragma once -#include "AnimationBlueprintEditorSettings.h" -#include "LMAmmo.h" #include "LMWeaponDataStructure.generated.h" USTRUCT(BlueprintType) @@ -8,18 +6,23 @@ struct FLMWeaponDataStructure : public FTableRowBase { GENERATED_BODY() + /** Max ammo in inventory */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - int MaxAmmo; // Max ammo in "inventory" + int MaxAmmo; + /** Max ammo in clip. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - int MaxClipAmmo; // Max ammo in clip + int MaxClipAmmo; + /** Mesh of the weapon display in the scene. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - TObjectPtr MeshWeapon; //Mesh of the weapon display in the scene + TObjectPtr MeshWeapon; + /** The animation blueprint to animate the mesh. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - EAmmoType AmmoType; //Type of ammo, which ammo this weapon is using + TObjectPtr AnimationBluePrint; - UPROPERTY(EditAnywhere, BlueprintReadWrite) - TObjectPtr AnimationBluePrint; //The animation blueprint to animate the mesh + /** The sound to play when firing. */ + UPROPERTY(EditAnywhere, BlueprintReadWrite,Category=Legumix) + TObjectPtr FireSound; }; From 26464154a96feb0957bf6e26394130d95a4823ba Mon Sep 17 00:00:00 2001 From: Bastien Date: Wed, 22 Jan 2025 16:23:17 +0100 Subject: [PATCH 02/30] Modified Player Movement Values --- Content/Legumix/Levels/LVL_GYM_00.umap | 2 +- Content/Legumix/Player/BP_Player.uasset | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Content/Legumix/Levels/LVL_GYM_00.umap b/Content/Legumix/Levels/LVL_GYM_00.umap index 202adb4..5180c7d 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:02a3e5240840e4086eea8b689538c778fb26536f32e99535e6ed5c5ae2c6ea67 +oid sha256:7a8523cf97a45511a568e3f567df9520df69d4c92ba5f8a975b5032e984d19a5 size 62710 diff --git a/Content/Legumix/Player/BP_Player.uasset b/Content/Legumix/Player/BP_Player.uasset index a92705a..4d5bcfa 100644 --- a/Content/Legumix/Player/BP_Player.uasset +++ b/Content/Legumix/Player/BP_Player.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1b36ac7333d2d6b72f26ce3e384ba1dcee67208a17231d67c021037a7e9f4f0 -size 42647 +oid sha256:de3853f2ca8bfb65e3452717604b954e6be0282eec2300b16225233c159b4838 +size 42996 From 2995cfe8843f6b22d6ddc4ccd7cc13c60c954ffc Mon Sep 17 00:00:00 2001 From: Antoine Caru Date: Wed, 22 Jan 2025 16:45:29 +0100 Subject: [PATCH 03/30] Update LD --- Binaries/Win64/LegumeMixEditor.target | 32 +++++++++---------- Binaries/Win64/UnrealEditor-LegumeMix.exp | 4 +-- Binaries/Win64/UnrealEditor-LegumeMix.pdb | 4 +-- Content/Legumix/Levels/LVL_00.umap | 3 ++ Content/Legumix/Levels/LVL_GYM_00.umap | 4 +-- .../CubeGridToolOutput_022C40EA.uasset | 4 +-- .../CubeGridToolOutput_4F03E9CA.uasset | 3 ++ 7 files changed, 30 insertions(+), 24 deletions(-) create mode 100644 Content/Legumix/Levels/LVL_00.umap create mode 100644 Content/_GENERATED/Antoine/CubeGridToolOutput_4F03E9CA.uasset diff --git a/Binaries/Win64/LegumeMixEditor.target b/Binaries/Win64/LegumeMixEditor.target index 314c033..a7ca2f1 100644 --- a/Binaries/Win64/LegumeMixEditor.target +++ b/Binaries/Win64/LegumeMixEditor.target @@ -21,18 +21,6 @@ "BuildId": "37670630" }, "BuildProducts": [ - { - "Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor-LegumeMix.dll", - "Type": "DynamicLibrary" - }, - { - "Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor-LegumeMix.pdb", - "Type": "SymbolFile" - }, - { - "Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor.modules", - "Type": "RequiredResource" - }, { "Path": "$(EngineDir)/Binaries/ThirdParty/USD/UsdResources/Win64/plugins/ar/resources/plugInfo.json", "Type": "RequiredResource" @@ -4816,13 +4804,21 @@ { "Path": "$(EngineDir)/Plugins/XGEController/Binaries/Win64/UnrealEditor.modules", "Type": "RequiredResource" + }, + { + "Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor-LegumeMix.dll", + "Type": "DynamicLibrary" + }, + { + "Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor-LegumeMix.pdb", + "Type": "SymbolFile" + }, + { + "Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor.modules", + "Type": "RequiredResource" } ], "RuntimeDependencies": [ - { - "Path": "$(ProjectDir)/LegumeMix.uproject", - "Type": "UFS" - }, { "Path": "$(EngineDir)/Binaries/ThirdParty/DbgHelp/dbghelp.dll", "Type": "NonUFS" @@ -30546,6 +30542,10 @@ { "Path": "$(EngineDir)/Plugins/XGEController/XGEController.uplugin", "Type": "UFS" + }, + { + "Path": "$(ProjectDir)/LegumeMix.uproject", + "Type": "UFS" } ], "BuildPlugins": [ diff --git a/Binaries/Win64/UnrealEditor-LegumeMix.exp b/Binaries/Win64/UnrealEditor-LegumeMix.exp index 97f87d6..a3c29bb 100644 --- a/Binaries/Win64/UnrealEditor-LegumeMix.exp +++ b/Binaries/Win64/UnrealEditor-LegumeMix.exp @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68b86cef883a7e338f87c5c36d61538d2d03210a35190a72c22f98f092391a66 -size 46484 +oid sha256:4819b18f3a30cd8f1f9dd4262ff07f8ad4761c4dc66764b1c56d680901f73001 +size 46500 diff --git a/Binaries/Win64/UnrealEditor-LegumeMix.pdb b/Binaries/Win64/UnrealEditor-LegumeMix.pdb index 48a3dbd..0c410ee 100644 --- a/Binaries/Win64/UnrealEditor-LegumeMix.pdb +++ b/Binaries/Win64/UnrealEditor-LegumeMix.pdb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f8d21845e3d8fc57431ae1ae85d637472513a830bff3db7a401b08d23a21ef3 -size 60092416 +oid sha256:953b61f6b9c8407afb0be82725d98136bad5a38c72477cc8992dfc8ddf979d68 +size 60887040 diff --git a/Content/Legumix/Levels/LVL_00.umap b/Content/Legumix/Levels/LVL_00.umap new file mode 100644 index 0000000..d3b26ec --- /dev/null +++ b/Content/Legumix/Levels/LVL_00.umap @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ff7802316a2825862b3f744cab558f19365a0554ad66c6a778ce4d27eaace81 +size 47715 diff --git a/Content/Legumix/Levels/LVL_GYM_00.umap b/Content/Legumix/Levels/LVL_GYM_00.umap index 202adb4..d611976 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:02a3e5240840e4086eea8b689538c778fb26536f32e99535e6ed5c5ae2c6ea67 -size 62710 +oid sha256:8c5e18ec2db7d32bde93aef39d96c44d4f612d835cc3f7489d68b735d937b6da +size 64646 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_022C40EA.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_022C40EA.uasset index c49944d..a92ea8b 100644 --- a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_022C40EA.uasset +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_022C40EA.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee509b43b22dece2577eab6adc2fca89a65ec852b249bfc5b485858964b40a75 -size 16447 +oid sha256:20a1186331a202bfa42b8cc734acca623ef1b7d051211d3b6ed3b04681b9af88 +size 17210 diff --git a/Content/_GENERATED/Antoine/CubeGridToolOutput_4F03E9CA.uasset b/Content/_GENERATED/Antoine/CubeGridToolOutput_4F03E9CA.uasset new file mode 100644 index 0000000..45f4f62 --- /dev/null +++ b/Content/_GENERATED/Antoine/CubeGridToolOutput_4F03E9CA.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7189b5d0b7624a6aa4cc00c6e1568c2b992d43e242231444d47f1113b826b64 +size 14953 From f639b7e3a98aa2db959ddceeb235892b56a5169c Mon Sep 17 00:00:00 2001 From: TjgL Date: Wed, 22 Jan 2025 17:14:37 +0100 Subject: [PATCH 04/30] Started working on a new weapon system --- .../LegumeMix/Private/Player/LMBulletInfo.h | 33 +++++++ Source/LegumeMix/Private/Player/LMPlayer.cpp | 12 +++ Source/LegumeMix/Private/Weapon/LMShotgun.cpp | 39 +++++++++ .../LegumeMix/Private/Weapon/LMWeaponBase.cpp | 56 ++++++++++++ .../Private/Weapon/LMWeaponManager.cpp | 53 ++++++----- Source/LegumeMix/Public/Player/LMPlayer.h | 13 +++ Source/LegumeMix/Public/Weapon/LMShotgun.h | 23 +++++ Source/LegumeMix/Public/Weapon/LMWeaponBase.h | 87 +++++++++++++++++++ .../LegumeMix/Public/Weapon/LMWeaponManager.h | 31 +++---- 9 files changed, 304 insertions(+), 43 deletions(-) create mode 100644 Source/LegumeMix/Private/Player/LMBulletInfo.h create mode 100644 Source/LegumeMix/Private/Weapon/LMShotgun.cpp create mode 100644 Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp create mode 100644 Source/LegumeMix/Public/Weapon/LMShotgun.h create mode 100644 Source/LegumeMix/Public/Weapon/LMWeaponBase.h diff --git a/Source/LegumeMix/Private/Player/LMBulletInfo.h b/Source/LegumeMix/Private/Player/LMBulletInfo.h new file mode 100644 index 0000000..2cac23d --- /dev/null +++ b/Source/LegumeMix/Private/Player/LMBulletInfo.h @@ -0,0 +1,33 @@ +#pragma once +#include "Weapon/LMAmmoType.h" +#include "LMBulletInfo.generated.h" + +USTRUCT(BlueprintType) +struct FLMBulletInfo +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int BulletCount; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FVector Origin; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FVector Direction; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FVector Spread; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float MaxDistance; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FFloatCurve Falloff; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + EAmmoType AmmoType; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float Damage; +}; diff --git a/Source/LegumeMix/Private/Player/LMPlayer.cpp b/Source/LegumeMix/Private/Player/LMPlayer.cpp index b32b23e..9396841 100644 --- a/Source/LegumeMix/Private/Player/LMPlayer.cpp +++ b/Source/LegumeMix/Private/Player/LMPlayer.cpp @@ -3,6 +3,8 @@ #include "Player/LMPlayer.h" +#include "KismetTraceUtils.h" +#include "LMBulletInfo.h" #include "Camera/CameraComponent.h" #include "Weapon/LMAmmo.h" #include "Weapon/LMWeaponManager.h" @@ -51,6 +53,16 @@ void ALMPlayer::SetWeaponManager(ULMWeaponManager* Manager) WeaponManager->Initialize(ArmsMesh); } +void ALMPlayer::PlayAnimation(UAnimMontage* Animation) +{ +} + +void ALMPlayer::FireBullets(const FLMBulletInfo Settings) +{ + FVector EndLocation = Settings.Origin + (Settings.Direction * Settings.MaxDistance); + TArray Hits; + DrawDebugLineTraceMulti(GetWorld(), Settings.Origin, EndLocation, EDrawDebugTrace::ForDuration, true, Hits, FColor::Green, FColor::Red, 10.f); +} void ALMPlayer::Tick(float DeltaTime) { diff --git a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp new file mode 100644 index 0000000..f379187 --- /dev/null +++ b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp @@ -0,0 +1,39 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "Weapon/LMShotgun.h" + +#include "Player/LMBulletInfo.h" +#include "Player/LMPlayer.h" + + +ALMShotgun::ALMShotgun() +{ + PrimaryActorTick.bCanEverTick = true; +} + + +void ALMShotgun::PrimaryFire() +{ + ALMPlayer* Player = Cast(GetOuter()); + if (!Player) + return; + + PlaySound(Data.FireSound); + PlayAnimation(PrimaryFireAnimation); + + FVector Origin = Player->GetWeaponFiringOrigin(); + FVector Direction = Player->GetAimVector(); + + ClipAmmo--; + + FLMBulletInfo ShotInfo = FLMBulletInfo(PelletCount, Origin, Direction, WeaponSpread, MaxDistance, DamageFalloff, AmmoType, Damage); + + Player->FireBullets(ShotInfo); +} + +void ALMShotgun::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); +} + diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp new file mode 100644 index 0000000..3f8abb4 --- /dev/null +++ b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp @@ -0,0 +1,56 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "Weapon/LMWeaponBase.h" + +#include "Components/AudioComponent.h" + + +ALMWeaponBase::ALMWeaponBase() +{ + PrimaryActorTick.bCanEverTick = true; + + RootComponent = CreateDefaultSubobject(TEXT("Root")); + + AudioComponent = CreateDefaultSubobject(TEXT("Audio")); + AudioComponent->SetupAttachment(RootComponent); + + WeaponMesh = CreateDefaultSubobject(TEXT("Mesh")); + WeaponMesh->SetupAttachment(RootComponent); + + WeaponSocket = FName(); +} + +void ALMWeaponBase::BeginPlay() +{ + Super::BeginPlay(); + +} + +void ALMWeaponBase::Reload() +{ +} + +void ALMWeaponBase::PrimaryFire() +{ +} + +void ALMWeaponBase::PlaySound(USoundWave* Sound, const bool Replacing) +{ + if (AudioComponent->IsPlaying() && !Replacing) + return; + + AudioComponent->Stop(); + AudioComponent->SetSound(Sound); + AudioComponent->Play(); +} + +void ALMWeaponBase::PlayAnimation(UAnimMontage* Animation) +{ + UAnimInstance* AnimInstance = WeaponMesh->GetAnimInstance(); + + if (Animation && AnimInstance) + { + AnimInstance->Montage_Play(Animation); + } +} \ No newline at end of file diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp index fcea7aa..d2ea688 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp @@ -3,7 +3,7 @@ #include "Weapon/LMWeaponManager.h" -#include "Weapon/LMWeapon.h" +#include "Weapon/LMWeaponBase.h" ULMWeaponManager::ULMWeaponManager() @@ -18,17 +18,25 @@ void ULMWeaponManager::BeginPlay() void ULMWeaponManager::Initialize(USkeletalMeshComponent* Mesh) { - SetWeaponMeshComponent(Mesh); - - for (auto Weapon : StartingWeapons) - { - if (Weapon) - { - ULMWeapon* Instance = NewObject(this, Weapon); - Weapons.Add(Instance); + ArmsMesh = Mesh; - Instance->Initialize(Mesh->GetRelativeLocation()); - } + for (auto WeaponTemplate : StartingWeapons) + { + if (!WeaponTemplate) + continue; + + ALMWeaponBase* Instance = GetWorld()->SpawnActor(WeaponTemplate); + GEngine->AddOnScreenDebugMessage(INDEX_NONE, 2.f, FColor::Blue, TEXT("Spawing")); + Instance->SetActorHiddenInGame(true); + + Weapons.Add(Instance); + + FAttachmentTransformRules Rules = FAttachmentTransformRules(EAttachmentRule::SnapToTarget, + EAttachmentRule::KeepRelative, + EAttachmentRule::KeepRelative, + false); + + Instance->AttachToComponent(ArmsMesh, Rules); } if (!Weapons.IsEmpty()) @@ -41,29 +49,23 @@ void 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); - - for (const auto Weapon : Weapons) - { - if (Weapon->WeaponDataStructure.AmmoType != AmmoType) - continue; - Weapon->AddAmmo(AmmoCount); - } + } void ULMWeaponManager::Fire() { - ULMWeapon* Weapon = GetCurrentWeapon(); + ALMWeaponBase* Weapon = GetCurrentWeapon(); GEngine->AddOnScreenDebugMessage(2, 1.f, FColor::Cyan, "Fire"); - Weapon->Fire(); + Weapon->PrimaryFire(); } void ULMWeaponManager::Reload() { GEngine->AddOnScreenDebugMessage(3, 1.f, FColor::Cyan, "Reloading"); - ULMWeapon* Weapon = GetCurrentWeapon(); + ALMWeaponBase* Weapon = GetCurrentWeapon(); Weapon->Reload(); } @@ -91,13 +93,8 @@ void ULMWeaponManager::SetWeapon(const int Index) return; } + GetCurrentWeapon()->SetActorHiddenInGame(true); CurrentWeaponIndex = Index; - - if (WeaponMeshComponent) - { - GEngine->AddOnScreenDebugMessage(INDEX_NONE, 5, FColor::Red, "Has Mesh"); - - WeaponMeshComponent->SetSkeletalMeshAsset(GetCurrentWeapon()->WeaponDataStructure.MeshWeapon); - } + GetCurrentWeapon()->SetActorHiddenInGame(false); } diff --git a/Source/LegumeMix/Public/Player/LMPlayer.h b/Source/LegumeMix/Public/Player/LMPlayer.h index 510b8c2..78c74f7 100644 --- a/Source/LegumeMix/Public/Player/LMPlayer.h +++ b/Source/LegumeMix/Public/Player/LMPlayer.h @@ -3,6 +3,7 @@ #pragma once #include "CoreMinimal.h" +#include "Camera/CameraComponent.h" #include "GameFramework/Character.h" #include "LMPlayer.generated.h" @@ -36,6 +37,18 @@ public: UFUNCTION(BlueprintCallable) void SetWeaponManager(ULMWeaponManager* Manager); + UFUNCTION(BlueprintCallable) + void PlayAnimation(UAnimMontage* Animation); + + UFUNCTION(BlueprintCallable) + void FireBullets(const FLMBulletInfo Settings); + + UFUNCTION(BlueprintCallable) + FVector GetWeaponFiringOrigin() const { return Camera->GetComponentLocation(); } + + UFUNCTION(BlueprintCallable) + FVector GetAimVector() const { return Camera->GetForwardVector(); } + private: UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Legumix, meta = (AllowPrivateAccess = true)) TObjectPtr WeaponManager; diff --git a/Source/LegumeMix/Public/Weapon/LMShotgun.h b/Source/LegumeMix/Public/Weapon/LMShotgun.h new file mode 100644 index 0000000..b067ff1 --- /dev/null +++ b/Source/LegumeMix/Public/Weapon/LMShotgun.h @@ -0,0 +1,23 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "LMWeaponBase.h" +#include "LMShotgun.generated.h" + +UCLASS() +class LEGUMEMIX_API ALMShotgun : public ALMWeaponBase +{ + GENERATED_BODY() + +public: + ALMShotgun(); + virtual void Tick(float DeltaTime) override; + virtual void PrimaryFire() override; + +private: + /** The number of pellets fired by the shotgun. */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta = (AllowPrivateAccess = true)) + int PelletCount = 8; +}; diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h new file mode 100644 index 0000000..4c1c3d5 --- /dev/null +++ b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h @@ -0,0 +1,87 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "LMAmmo.h" +#include "LMWeaponDataStructure.h" +#include "GameFramework/Actor.h" +#include "GameFramework/SpringArmComponent.h" +#include "LMWeaponBase.generated.h" + + +UCLASS() +class LEGUMEMIX_API ALMWeaponBase : public AActor +{ + GENERATED_BODY() + +public: + ALMWeaponBase(); + virtual void BeginPlay() override; + +public: + UFUNCTION(BlueprintCallable) + virtual void Reload(); + + UFUNCTION(BlueprintCallable) + virtual void PrimaryFire(); + + UFUNCTION(BlueprintCallable) + void PlaySound(USoundWave* Sound, bool Replacing = false); + + UFUNCTION(BlueprintCallable) + void PlayAnimation(UAnimMontage* Animation); + + /** The socket to attach the weapon to. + * @return The socket. + */ + UFUNCTION(BlueprintCallable) + FName GetAttachmentSocketName() const { return WeaponSocket; } + +protected: /* Weapon Data */ + /** The weapon static data. */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) + FLMWeaponDataStructure Data; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Animations", meta=(AllowPrivateAccess=true)) + TObjectPtr PrimaryFireAnimation; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Legumix|Animations", meta=(AllowPrivateAccess=true)) + TObjectPtr ReloadAnimation; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) + float Damage = 10.f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) + FVector WeaponSpread = FVector::ZeroVector; + + /** The max distance (cm) between the origin and the target before doing minimal damage. */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) + float MaxDistance = 100000.f; + + /** The damage falloff distance in a 0-1 scale. */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) + FFloatCurve DamageFalloff; + + /** The type of ammo used by this weapon. */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) + EAmmoType AmmoType; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) + int ClipAmmo; + +private: + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) + FDataTableRowHandle DataTableRow; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) + FName WeaponSocket; + +private: /* Components */ + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Legumix, meta=(AllowPrivateAccess=true)) + TObjectPtr AudioComponent; + + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Legumix, meta=(AllowPrivateAccess=true)) + TObjectPtr WeaponMesh; +}; + diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponManager.h b/Source/LegumeMix/Public/Weapon/LMWeaponManager.h index 7103bfb..b38b175 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponManager.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponManager.h @@ -8,35 +8,36 @@ #include "LMWeaponManager.generated.h" +class ALMWeaponBase; class ULMWeapon; -UCLASS(Blueprintable, BlueprintType, ClassGroup="Legumix", meta=(BlueprintSpawnableComponent)) +UCLASS(Blueprintable, BlueprintType, ClassGroup=Legumix, meta=(BlueprintSpawnableComponent)) class LEGUMEMIX_API ULMWeaponManager : public UActorComponent { GENERATED_BODY() public: ULMWeaponManager(); - void SetWeaponMeshComponent(USkeletalMeshComponent* Mesh) { WeaponMeshComponent = Mesh; } + void SetArmsMesh(USkeletalMeshComponent* Mesh) { ArmsMesh = Mesh; } public: /** * Get the Weapon currently equipped. * @return The Current Weapon. */ - UFUNCTION(BlueprintCallable, Category="Legumix") - ULMWeapon* GetCurrentWeapon() { return Weapons[CurrentWeaponIndex]; } + UFUNCTION(BlueprintCallable, Category=Legumix) + ALMWeaponBase* GetCurrentWeapon() { return Weapons[CurrentWeaponIndex]; } - UFUNCTION(BlueprintCallable, Category="Legumix") + UFUNCTION(BlueprintCallable, Category=Legumix) void SetWeapon(int Index); - UFUNCTION(BlueprintCallable, Category="Legumix") + UFUNCTION(BlueprintCallable, Category=Legumix) void AddAmmoType(EAmmoType AmmoType, int AmmoCount); - UFUNCTION(BlueprintCallable, Category="Legumix") + UFUNCTION(BlueprintCallable, Category=Legumix) void Fire(); - UFUNCTION(BlueprintCallable, Category="Legumix") + UFUNCTION(BlueprintCallable, Category=Legumix) void Reload(); void SwitchWeapon(int Direction); @@ -46,16 +47,16 @@ protected: virtual void BeginPlay() override; private: - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix", meta = (AllowPrivateAccess = "true")) - TObjectPtr WeaponMeshComponent; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta = (AllowPrivateAccess = "true")) + TObjectPtr ArmsMesh; /** The weapons the player starts with. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix", meta=(AllowPrivateAccess=true)) - TArray> StartingWeapons; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) + TArray> StartingWeapons; - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Legumix", meta=(AllowPrivateAccess=true)) - TArray> Weapons; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Legumix, meta=(AllowPrivateAccess=true)) + TArray> Weapons; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix", meta=(AllowPrivateAccess=true)) + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) int CurrentWeaponIndex = 0; }; From 7aa5600117860a78040f519ea766b3c161897515 Mon Sep 17 00:00:00 2001 From: TjgL Date: Wed, 22 Jan 2025 17:15:12 +0100 Subject: [PATCH 05/30] Created test blueprints --- Content/Legumix/Player/BP_Player.uasset | 4 ++-- Content/Legumix/Weapon/BP_WeaponManager.uasset | 4 ++-- Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset | 3 +++ Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset | 3 +++ 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset create mode 100644 Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset diff --git a/Content/Legumix/Player/BP_Player.uasset b/Content/Legumix/Player/BP_Player.uasset index a92705a..6b3ffb3 100644 --- a/Content/Legumix/Player/BP_Player.uasset +++ b/Content/Legumix/Player/BP_Player.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1b36ac7333d2d6b72f26ce3e384ba1dcee67208a17231d67c021037a7e9f4f0 -size 42647 +oid sha256:738933e4c809f3d4c429cba8b7b4cad77447c28c01d4aae08fd101bb379baf17 +size 43805 diff --git a/Content/Legumix/Weapon/BP_WeaponManager.uasset b/Content/Legumix/Weapon/BP_WeaponManager.uasset index 0d3685c..536be36 100644 --- a/Content/Legumix/Weapon/BP_WeaponManager.uasset +++ b/Content/Legumix/Weapon/BP_WeaponManager.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:76dde9bd31fe7b9c92b2537215bc3a2b4fc67a3ea9fd83ccf9faa93d1af0d962 -size 15175 +oid sha256:4e88097185e867848256e02ec6286f9e07c38f4ca138443c1410a96f3d9533f6 +size 15372 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset b/Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset new file mode 100644 index 0000000..e2b2ae0 --- /dev/null +++ b/Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05cad08ea69ef270f1838c74ae098b03e1a419febe857b984e747987ab20b93b +size 34483 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset new file mode 100644 index 0000000..27db14c --- /dev/null +++ b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df121a93495b25dedf1d472eb4ee1289ecccff9d1513776960ee6c6ba701bc5e +size 33696 From 55daf8b1dabb26f2d491f70e74aed810b0ca0cd5 Mon Sep 17 00:00:00 2001 From: Antoine Caru Date: Wed, 22 Jan 2025 20:14:23 +0100 Subject: [PATCH 06/30] Note the gym LVL with Text actors and rework it --- Content/Legumix/Levels/LVL_GYM_00.umap | 4 ++-- .../_GENERATED/Antoine/CubeGridToolOutput_01BFF3FC.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_022C40EA.uasset | 4 ++-- .../_GENERATED/Antoine/CubeGridToolOutput_5F577DD6.uasset | 4 ++-- .../_GENERATED/Antoine/CubeGridToolOutput_AD080CE9.uasset | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_01BFF3FC.uasset diff --git a/Content/Legumix/Levels/LVL_GYM_00.umap b/Content/Legumix/Levels/LVL_GYM_00.umap index 5180c7d..5e05a17 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:7a8523cf97a45511a568e3f567df9520df69d4c92ba5f8a975b5032e984d19a5 -size 62710 +oid sha256:a34f80524cee3df1d34a6dc5371af40de96cb2e6dc3f02290d9ee1a05965333d +size 152873 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_01BFF3FC.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_01BFF3FC.uasset new file mode 100644 index 0000000..facfca7 --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_01BFF3FC.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82523919ef5c6c4939c15008ead82e3a4f448c4197bc9b036e38cedfce89eb24 +size 22328 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_022C40EA.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_022C40EA.uasset index a92ea8b..7987fe7 100644 --- a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_022C40EA.uasset +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_022C40EA.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:20a1186331a202bfa42b8cc734acca623ef1b7d051211d3b6ed3b04681b9af88 -size 17210 +oid sha256:81363dd959c68575abac1216a0377e80f673af9592c3268f5fd814bc1f4d54c9 +size 32884 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_5F577DD6.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_5F577DD6.uasset index fe0f395..22dca7f 100644 --- a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_5F577DD6.uasset +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_5F577DD6.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bfdae45015374f16e4d4aba918f9d36e564fe5b22b3b7c5c431c39f61d06183b -size 22306 +oid sha256:85520ee0f43a76d5d7b70faa2552df1b9c67236ae0ed16b1c42725ab9c08bf73 +size 40086 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_AD080CE9.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_AD080CE9.uasset index 470e7bf..a7b6ddb 100644 --- a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_AD080CE9.uasset +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_AD080CE9.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55aa967c777a6d7be251b715fcc2a7a21842c28fe651a781aed128caa0251c2b -size 42457 +oid sha256:1af47ab41e16f19f6d0525b038aa9d2bc50384d0aad0536cb145f40894ca5e4d +size 77274 From 6c3072d6f9ea71f29e9bb453bf691ca0a6d7a562 Mon Sep 17 00:00:00 2001 From: TjgL Date: Wed, 22 Jan 2025 22:09:27 +0100 Subject: [PATCH 07/30] Fixed crash + added line trace when shooting --- Content/Legumix/BP_GameMode.uasset | 4 ++-- Content/Legumix/Player/BP_Play.uasset | 3 +++ Content/Legumix/Player/BP_Player.uasset | 4 ++-- .../Legumix/Weapon/Shotgun/BP_Revolver.uasset | 4 ++-- Source/LegumeMix/Private/Player/LMPlayer.cpp | 17 +++++++++++++++-- Source/LegumeMix/Private/Weapon/LMShotgun.cpp | 1 - .../LegumeMix/Private/Weapon/LMWeaponBase.cpp | 13 +++++++++++++ .../Private/Weapon/LMWeaponManager.cpp | 10 +--------- Source/LegumeMix/Public/Weapon/LMWeaponBase.h | 8 +++++++- 9 files changed, 45 insertions(+), 19 deletions(-) create mode 100644 Content/Legumix/Player/BP_Play.uasset diff --git a/Content/Legumix/BP_GameMode.uasset b/Content/Legumix/BP_GameMode.uasset index ae68f7c..c44688e 100644 --- a/Content/Legumix/BP_GameMode.uasset +++ b/Content/Legumix/BP_GameMode.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6ef764f0d6d17fb2309efb34815b5a2714079966472e420a0d6181a5021a0b5e -size 21071 +oid sha256:e675e0cde9b82aaa2171be4f5bdaafc7ec19a9b3ca674a5d06f6756741c0ed01 +size 20983 diff --git a/Content/Legumix/Player/BP_Play.uasset b/Content/Legumix/Player/BP_Play.uasset new file mode 100644 index 0000000..d907bc7 --- /dev/null +++ b/Content/Legumix/Player/BP_Play.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25d6d112aa65ffa05aee3109028ba543898d1a9acf24646f6d6171ce7ead5945 +size 50606 diff --git a/Content/Legumix/Player/BP_Player.uasset b/Content/Legumix/Player/BP_Player.uasset index 4d5bcfa..2f17b6b 100644 --- a/Content/Legumix/Player/BP_Player.uasset +++ b/Content/Legumix/Player/BP_Player.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de3853f2ca8bfb65e3452717604b954e6be0282eec2300b16225233c159b4838 -size 42996 +oid sha256:753ea5e4b6acedce454e964d906df3a3a0532fa7f9c6535a87505bf4e8f60a21 +size 60088 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset b/Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset index e2b2ae0..b9b9428 100644 --- a/Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset +++ b/Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:05cad08ea69ef270f1838c74ae098b03e1a419febe857b984e747987ab20b93b -size 34483 +oid sha256:3cf116185fa5ffa77f1c1b0bcd58ced74d48270ec611a0bdf2bbb9afc6c00f4c +size 32168 diff --git a/Source/LegumeMix/Private/Player/LMPlayer.cpp b/Source/LegumeMix/Private/Player/LMPlayer.cpp index 9396841..834c8a3 100644 --- a/Source/LegumeMix/Private/Player/LMPlayer.cpp +++ b/Source/LegumeMix/Private/Player/LMPlayer.cpp @@ -60,10 +60,23 @@ void ALMPlayer::PlayAnimation(UAnimMontage* Animation) void ALMPlayer::FireBullets(const FLMBulletInfo Settings) { FVector EndLocation = Settings.Origin + (Settings.Direction * Settings.MaxDistance); - TArray Hits; - DrawDebugLineTraceMulti(GetWorld(), Settings.Origin, EndLocation, EDrawDebugTrace::ForDuration, true, Hits, FColor::Green, FColor::Red, 10.f); + TArray Hits = TArray(); + GetWorld()->LineTraceMultiByChannel(Hits, Settings.Origin, EndLocation, ECC_Camera); + DrawDebugLineTraceMulti(GetWorld(), Settings.Origin, EndLocation, EDrawDebugTrace::ForDuration, Hits.Num() > 0, Hits, FColor::Green, FColor::Red, 10.f); } +FVector ALMPlayer::GetWeaponFiringOrigin() const +{ + if (!Camera) + { + GEngine->AddOnScreenDebugMessage(INDEX_NONE, 10.f, FColor::Silver, TEXT("No camera ???")); + return FVector::ZeroVector; + } + return Camera->GetComponentTransform().GetLocation(); +} +FVector ALMPlayer::GetAimVector() const { return Camera->GetForwardVector(); } + + void ALMPlayer::Tick(float DeltaTime) { Super::Tick(DeltaTime); diff --git a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp index f379187..1382d63 100644 --- a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp +++ b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp @@ -15,7 +15,6 @@ ALMShotgun::ALMShotgun() void ALMShotgun::PrimaryFire() { - ALMPlayer* Player = Cast(GetOuter()); if (!Player) return; diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp index 3f8abb4..c0e78dd 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp @@ -4,6 +4,7 @@ #include "Weapon/LMWeaponBase.h" #include "Components/AudioComponent.h" +#include "Player/LMPlayer.h" ALMWeaponBase::ALMWeaponBase() @@ -27,6 +28,18 @@ void ALMWeaponBase::BeginPlay() } +void ALMWeaponBase::Setup(USkeletalMeshComponent* Mesh, AActor* CharOwner) +{ + SetActorHiddenInGame(true); + FAttachmentTransformRules Rules = FAttachmentTransformRules(EAttachmentRule::SnapToTarget, + EAttachmentRule::KeepRelative, + EAttachmentRule::KeepRelative, + false); + + AttachToComponent(Mesh, Rules); + Player = Cast(CharOwner); +} + void ALMWeaponBase::Reload() { } diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp index d2ea688..043998e 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp @@ -27,16 +27,8 @@ void ULMWeaponManager::Initialize(USkeletalMeshComponent* Mesh) ALMWeaponBase* Instance = GetWorld()->SpawnActor(WeaponTemplate); GEngine->AddOnScreenDebugMessage(INDEX_NONE, 2.f, FColor::Blue, TEXT("Spawing")); - Instance->SetActorHiddenInGame(true); - + Instance->Setup(ArmsMesh, GetOwner()); Weapons.Add(Instance); - - FAttachmentTransformRules Rules = FAttachmentTransformRules(EAttachmentRule::SnapToTarget, - EAttachmentRule::KeepRelative, - EAttachmentRule::KeepRelative, - false); - - Instance->AttachToComponent(ArmsMesh, Rules); } if (!Weapons.IsEmpty()) diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h index 4c1c3d5..1cbeece 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h @@ -6,10 +6,11 @@ #include "LMAmmo.h" #include "LMWeaponDataStructure.h" #include "GameFramework/Actor.h" -#include "GameFramework/SpringArmComponent.h" #include "LMWeaponBase.generated.h" +class ALMPlayer; + UCLASS() class LEGUMEMIX_API ALMWeaponBase : public AActor { @@ -18,6 +19,7 @@ class LEGUMEMIX_API ALMWeaponBase : public AActor public: ALMWeaponBase(); virtual void BeginPlay() override; + void Setup(USkeletalMeshComponent* Mesh, AActor* CharOwner); public: UFUNCTION(BlueprintCallable) @@ -70,6 +72,10 @@ protected: /* Weapon Data */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) int ClipAmmo; + UPROPERTY(VisibleInstanceOnly, BlueprintReadWrite, Category=Legumix) + TObjectPtr Player; + + private: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) FDataTableRowHandle DataTableRow; From fc50cd631796779e3eac6f75b7abb8139b20ba68 Mon Sep 17 00:00:00 2001 From: TjgL Date: Wed, 22 Jan 2025 22:10:19 +0100 Subject: [PATCH 08/30] Removed unwanted inline methods --- Source/LegumeMix/Public/Player/LMPlayer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/LegumeMix/Public/Player/LMPlayer.h b/Source/LegumeMix/Public/Player/LMPlayer.h index 78c74f7..91f31d2 100644 --- a/Source/LegumeMix/Public/Player/LMPlayer.h +++ b/Source/LegumeMix/Public/Player/LMPlayer.h @@ -44,10 +44,10 @@ public: void FireBullets(const FLMBulletInfo Settings); UFUNCTION(BlueprintCallable) - FVector GetWeaponFiringOrigin() const { return Camera->GetComponentLocation(); } + FVector GetWeaponFiringOrigin() const; UFUNCTION(BlueprintCallable) - FVector GetAimVector() const { return Camera->GetForwardVector(); } + FVector GetAimVector() const; private: UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Legumix, meta = (AllowPrivateAccess = true)) From 35f81fa5ef67448fbe7829c3876e24c7a916df1e Mon Sep 17 00:00:00 2001 From: Antoine Caru Date: Wed, 22 Jan 2025 23:14:22 +0100 Subject: [PATCH 09/30] Updated LVL GYM --- Content/Legumix/Levels/LVL_GYM_00.umap | 4 ++-- .../_GENERATED/Antoine/CubeGridToolOutput_2FFAD046.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_3808D550.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_87EB3798.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_E3DAEC0B.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_F57C4A5B.uasset | 3 +++ 6 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_2FFAD046.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_3808D550.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_87EB3798.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_E3DAEC0B.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_F57C4A5B.uasset diff --git a/Content/Legumix/Levels/LVL_GYM_00.umap b/Content/Legumix/Levels/LVL_GYM_00.umap index 5e05a17..044df44 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:a34f80524cee3df1d34a6dc5371af40de96cb2e6dc3f02290d9ee1a05965333d -size 152873 +oid sha256:5165a92383897fa72119eb6eb4bc1ea115999ea8a8b5a31f46f6eef0ff593e24 +size 334633 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_2FFAD046.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_2FFAD046.uasset new file mode 100644 index 0000000..9915e74 --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_2FFAD046.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8323ed2fbf1d24b5412e85e03208b170656be152e651195fe6f8fe250ce205e +size 165425 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_3808D550.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_3808D550.uasset new file mode 100644 index 0000000..14c22b4 --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_3808D550.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da32dab9bb6be40499838244103eb93abe01520e3583b5a38df1929da391c996 +size 34513 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_87EB3798.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_87EB3798.uasset new file mode 100644 index 0000000..6d0d12e --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_87EB3798.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fab1e0ed1cf3de8a67a5acbc57ad29998b6f6733fe3eace3a08e007e61f5147e +size 22130 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_E3DAEC0B.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_E3DAEC0B.uasset new file mode 100644 index 0000000..954ecbd --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_E3DAEC0B.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9030332ae885ae776fa37c6cc5c0267ff6a26965c206c2d184e295a1859796a +size 16899 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_F57C4A5B.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_F57C4A5B.uasset new file mode 100644 index 0000000..aa0ebba --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_F57C4A5B.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e56d4837d80f867ce0002f33a306790fd53a7fd796bdbacf4df4f5d404389473 +size 112554 From ac4176e2f704f3e8ac295c00753313b380f4a7f8 Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 10:04:35 +0100 Subject: [PATCH 10/30] Started working on new ammo system --- .../Private/{Weapon => Ammo}/LMAmmo.cpp | 3 +- .../LegumeMix/Private/Player/LMBulletInfo.h | 2 +- Source/LegumeMix/Private/Player/LMPlayer.cpp | 2 +- .../Private/Weapon/LMWeaponManager.cpp | 28 +++++++++++++++++-- .../Public/{Weapon => Ammo}/LMAmmo.h | 0 Source/LegumeMix/Public/Ammo/LMAmmoData.h | 26 +++++++++++++++++ .../Public/{Weapon => Ammo}/LMAmmoType.h | 0 Source/LegumeMix/Public/Weapon/LMWeaponBase.h | 2 +- .../LegumeMix/Public/Weapon/LMWeaponManager.h | 15 +++++++++- 9 files changed, 70 insertions(+), 8 deletions(-) rename Source/LegumeMix/Private/{Weapon => Ammo}/LMAmmo.cpp (94%) rename Source/LegumeMix/Public/{Weapon => Ammo}/LMAmmo.h (100%) create mode 100644 Source/LegumeMix/Public/Ammo/LMAmmoData.h rename Source/LegumeMix/Public/{Weapon => Ammo}/LMAmmoType.h (100%) diff --git a/Source/LegumeMix/Private/Weapon/LMAmmo.cpp b/Source/LegumeMix/Private/Ammo/LMAmmo.cpp similarity index 94% rename from Source/LegumeMix/Private/Weapon/LMAmmo.cpp rename to Source/LegumeMix/Private/Ammo/LMAmmo.cpp index 2fee821..e5bd484 100644 --- a/Source/LegumeMix/Private/Weapon/LMAmmo.cpp +++ b/Source/LegumeMix/Private/Ammo/LMAmmo.cpp @@ -1,9 +1,8 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "Weapon/LMAmmo.h" +#include "Ammo/LMAmmo.h" -#include "Components/BoxComponent.h" #include "Components/SphereComponent.h" #include "Player/LMPlayer.h" diff --git a/Source/LegumeMix/Private/Player/LMBulletInfo.h b/Source/LegumeMix/Private/Player/LMBulletInfo.h index 2cac23d..855621c 100644 --- a/Source/LegumeMix/Private/Player/LMBulletInfo.h +++ b/Source/LegumeMix/Private/Player/LMBulletInfo.h @@ -1,5 +1,5 @@ #pragma once -#include "Weapon/LMAmmoType.h" +#include "Ammo/LMAmmoType.h" #include "LMBulletInfo.generated.h" USTRUCT(BlueprintType) diff --git a/Source/LegumeMix/Private/Player/LMPlayer.cpp b/Source/LegumeMix/Private/Player/LMPlayer.cpp index 834c8a3..375ea0e 100644 --- a/Source/LegumeMix/Private/Player/LMPlayer.cpp +++ b/Source/LegumeMix/Private/Player/LMPlayer.cpp @@ -6,7 +6,7 @@ #include "KismetTraceUtils.h" #include "LMBulletInfo.h" #include "Camera/CameraComponent.h" -#include "Weapon/LMAmmo.h" +#include "Ammo/LMAmmo.h" #include "Weapon/LMWeaponManager.h" ALMPlayer::ALMPlayer() diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp index 043998e..3c5e78b 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp @@ -14,6 +14,32 @@ ULMWeaponManager::ULMWeaponManager() void ULMWeaponManager::BeginPlay() { Super::BeginPlay(); + + if (AmmoData.IsEmpty()) + SetupAmmoData(); +} + +void ULMWeaponManager::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) +{ + Super::PostEditChangeProperty(PropertyChangedEvent); + + if (AmmoDataTable) + SetupAmmoData(); +} + +void ULMWeaponManager::SetupAmmoData() +{ + TArray Rows; + AmmoData.Empty(); + + AmmoDataTable->GetAllRows(TEXT(""), Rows); + for (const auto Data : Rows) + { + if (AmmoData.Contains(Data->AmmoType)) + continue; + + AmmoData.Add(Data->AmmoType, *Data); + } } void ULMWeaponManager::Initialize(USkeletalMeshComponent* Mesh) @@ -48,8 +74,6 @@ void ULMWeaponManager::AddAmmoType(EAmmoType AmmoType, int AmmoCount) void ULMWeaponManager::Fire() { ALMWeaponBase* Weapon = GetCurrentWeapon(); - - GEngine->AddOnScreenDebugMessage(2, 1.f, FColor::Cyan, "Fire"); Weapon->PrimaryFire(); } diff --git a/Source/LegumeMix/Public/Weapon/LMAmmo.h b/Source/LegumeMix/Public/Ammo/LMAmmo.h similarity index 100% rename from Source/LegumeMix/Public/Weapon/LMAmmo.h rename to Source/LegumeMix/Public/Ammo/LMAmmo.h diff --git a/Source/LegumeMix/Public/Ammo/LMAmmoData.h b/Source/LegumeMix/Public/Ammo/LMAmmoData.h new file mode 100644 index 0000000..89e13f1 --- /dev/null +++ b/Source/LegumeMix/Public/Ammo/LMAmmoData.h @@ -0,0 +1,26 @@ +#pragma once + +#include "LMAmmoType.h" +#include "Kismet/KismetMathLibrary.h" +#include "LMAmmoData.generated.h" + + +USTRUCT(BlueprintType) +struct FLMAmmoData : public FTableRowBase +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + EAmmoType AmmoType; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(ClampMin=1, ClampMax=1000, Uimin=1, Uimax=1000)) + int MaxAmmo; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(ClampMin=0, Uimin=0)) + int AmmoCount; + + void AddAmmo(const int Quantity) + { + AmmoCount += UKismetMathLibrary::Clamp(Quantity, 0, MaxAmmo); + } +}; diff --git a/Source/LegumeMix/Public/Weapon/LMAmmoType.h b/Source/LegumeMix/Public/Ammo/LMAmmoType.h similarity index 100% rename from Source/LegumeMix/Public/Weapon/LMAmmoType.h rename to Source/LegumeMix/Public/Ammo/LMAmmoType.h diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h index 1cbeece..da9f54a 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h @@ -3,7 +3,7 @@ #pragma once #include "CoreMinimal.h" -#include "LMAmmo.h" +#include "Ammo/LMAmmo.h" #include "LMWeaponDataStructure.h" #include "GameFramework/Actor.h" #include "LMWeaponBase.generated.h" diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponManager.h b/Source/LegumeMix/Public/Weapon/LMWeaponManager.h index b38b175..411e287 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponManager.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponManager.h @@ -3,7 +3,7 @@ #pragma once #include "CoreMinimal.h" -#include "LMAmmo.h" +#include "Ammo/LMAmmoData.h" #include "Components/ActorComponent.h" #include "LMWeaponManager.generated.h" @@ -43,12 +43,20 @@ public: void Initialize(USkeletalMeshComponent* Mesh); + UFUNCTION(BlueprintCallable, Category="Legumix|Ammo") + void SetupAmmoData(); + protected: virtual void BeginPlay() override; + virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override; private: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta = (AllowPrivateAccess = "true")) TObjectPtr ArmsMesh; + +private: + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Ammo", meta=(AllowPrivateAccess=true)) + TObjectPtr AmmoDataTable; /** The weapons the player starts with. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) @@ -59,4 +67,9 @@ private: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) int CurrentWeaponIndex = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Ammo", meta=(AllowPrivateAccess=true)) + TMap AmmoData; + + }; From 09559d06b1e0940e2cf7ab8ff79c8bf26d8ae0ab Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 10:05:08 +0100 Subject: [PATCH 11/30] Minor struct cleanup --- Source/LegumeMix/Private/Weapon/LMWeaponDataStructure.cpp | 1 - Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h | 4 ---- 2 files changed, 5 deletions(-) delete mode 100644 Source/LegumeMix/Private/Weapon/LMWeaponDataStructure.cpp diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponDataStructure.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponDataStructure.cpp deleted file mode 100644 index 1a3991c..0000000 --- a/Source/LegumeMix/Private/Weapon/LMWeaponDataStructure.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "Weapon/LMWeaponDataStructure.h" diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h b/Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h index 0572676..20aa20a 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h @@ -6,10 +6,6 @@ struct FLMWeaponDataStructure : public FTableRowBase { GENERATED_BODY() - /** Max ammo in inventory */ - UPROPERTY(EditAnywhere, BlueprintReadWrite) - int MaxAmmo; - /** Max ammo in clip. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) int MaxClipAmmo; From f50779e62176f497598a4e9a8195815701bf2854 Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 10:05:28 +0100 Subject: [PATCH 12/30] Added Munition Data Table --- Content/Legumix/Weapon/Ammo/DT_Munitions.uasset | 3 +++ Content/Legumix/Weapon/BP_WeaponManager.uasset | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 Content/Legumix/Weapon/Ammo/DT_Munitions.uasset diff --git a/Content/Legumix/Weapon/Ammo/DT_Munitions.uasset b/Content/Legumix/Weapon/Ammo/DT_Munitions.uasset new file mode 100644 index 0000000..e342489 --- /dev/null +++ b/Content/Legumix/Weapon/Ammo/DT_Munitions.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f0458385ebf5c720d5e11d2a115c2dce6179e24c4250e87f2de95070c8159d8 +size 2597 diff --git a/Content/Legumix/Weapon/BP_WeaponManager.uasset b/Content/Legumix/Weapon/BP_WeaponManager.uasset index 536be36..ce38a6a 100644 --- a/Content/Legumix/Weapon/BP_WeaponManager.uasset +++ b/Content/Legumix/Weapon/BP_WeaponManager.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e88097185e867848256e02ec6286f9e07c38f4ca138443c1410a96f3d9533f6 -size 15372 +oid sha256:cedb028e7e61821b30692bc77c901339b7ad8e14b2bfc4de63f2cb34dc7dff70 +size 7486 From ed227445ad7533bda520c518ceaeae4bbb435e02 Mon Sep 17 00:00:00 2001 From: Antoine Caru Date: Thu, 23 Jan 2025 18:52:11 +0100 Subject: [PATCH 13/30] Added new box mesh and some textures --- Config/DefaultEditor.ini | 4 ++++ Content/Legumix/Levels/Assets/Carott_Container.uasset | 3 +++ Content/Legumix/Levels/Assets/Container_Green.uasset | 3 +++ Content/Legumix/Levels/Assets/Container_Green2.uasset | 3 +++ Content/Legumix/Levels/Assets/Container_Grey.uasset | 3 +++ Content/Legumix/Levels/Assets/Container_Light.uasset | 3 +++ Content/Legumix/Levels/Assets/Container_Magenta.uasset | 3 +++ Content/Legumix/Levels/Assets/Container_Orange.uasset | 3 +++ Content/Legumix/Levels/Assets/Container_White.uasset | 3 +++ Content/Legumix/Levels/Assets/Radish_Container.uasset | 3 +++ Content/Legumix/Levels/LVL_GYM_00.umap | 4 ++-- Content/Legumix/Levels/T_GabaritChecker_Gray.uasset | 3 +++ Content/Legumix/Levels/T_GabaritChecker_Gray_Mat.uasset | 3 +++ 13 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 Content/Legumix/Levels/Assets/Carott_Container.uasset create mode 100644 Content/Legumix/Levels/Assets/Container_Green.uasset create mode 100644 Content/Legumix/Levels/Assets/Container_Green2.uasset create mode 100644 Content/Legumix/Levels/Assets/Container_Grey.uasset create mode 100644 Content/Legumix/Levels/Assets/Container_Light.uasset create mode 100644 Content/Legumix/Levels/Assets/Container_Magenta.uasset create mode 100644 Content/Legumix/Levels/Assets/Container_Orange.uasset create mode 100644 Content/Legumix/Levels/Assets/Container_White.uasset create mode 100644 Content/Legumix/Levels/Assets/Radish_Container.uasset create mode 100644 Content/Legumix/Levels/T_GabaritChecker_Gray.uasset create mode 100644 Content/Legumix/Levels/T_GabaritChecker_Gray_Mat.uasset diff --git a/Config/DefaultEditor.ini b/Config/DefaultEditor.ini index e69de29..e1711df 100644 --- a/Config/DefaultEditor.ini +++ b/Config/DefaultEditor.ini @@ -0,0 +1,4 @@ +[/Script/AdvancedPreviewScene.SharedProfiles] ++Profiles=(ProfileName="Epic Headquarters",bSharedProfile=True,bIsEngineDefaultProfile=True,bUseSkyLighting=True,DirectionalLightIntensity=1.000000,DirectionalLightColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SkyLightIntensity=1.000000,bRotateLightingRig=False,bShowEnvironment=True,bShowFloor=True,bShowGrid=False,EnvironmentColor=(R=0.200000,G=0.200000,B=0.200000,A=1.000000),EnvironmentIntensity=1.000000,EnvironmentCubeMapPath="/Engine/EditorMaterials/AssetViewer/EpicQuadPanorama_CC+EV1.EpicQuadPanorama_CC+EV1",bPostProcessingEnabled=True,PostProcessingSettings=(bOverride_TemperatureType=False,bOverride_WhiteTemp=False,bOverride_WhiteTint=False,bOverride_ColorSaturation=False,bOverride_ColorContrast=False,bOverride_ColorGamma=False,bOverride_ColorGain=False,bOverride_ColorOffset=False,bOverride_ColorSaturationShadows=False,bOverride_ColorContrastShadows=False,bOverride_ColorGammaShadows=False,bOverride_ColorGainShadows=False,bOverride_ColorOffsetShadows=False,bOverride_ColorSaturationMidtones=False,bOverride_ColorContrastMidtones=False,bOverride_ColorGammaMidtones=False,bOverride_ColorGainMidtones=False,bOverride_ColorOffsetMidtones=False,bOverride_ColorSaturationHighlights=False,bOverride_ColorContrastHighlights=False,bOverride_ColorGammaHighlights=False,bOverride_ColorGainHighlights=False,bOverride_ColorOffsetHighlights=False,bOverride_ColorCorrectionShadowsMax=False,bOverride_ColorCorrectionHighlightsMin=False,bOverride_ColorCorrectionHighlightsMax=False,bOverride_BlueCorrection=False,bOverride_ExpandGamut=False,bOverride_ToneCurveAmount=False,bOverride_FilmSlope=False,bOverride_FilmToe=False,bOverride_FilmShoulder=False,bOverride_FilmBlackClip=False,bOverride_FilmWhiteClip=False,bOverride_SceneColorTint=False,bOverride_SceneFringeIntensity=False,bOverride_ChromaticAberrationStartOffset=False,bOverride_bMegaLights=False,bOverride_AmbientCubemapTint=False,bOverride_AmbientCubemapIntensity=False,bOverride_BloomMethod=False,bOverride_BloomIntensity=False,bOverride_BloomThreshold=False,bOverride_Bloom1Tint=False,bOverride_Bloom1Size=False,bOverride_Bloom2Size=False,bOverride_Bloom2Tint=False,bOverride_Bloom3Tint=False,bOverride_Bloom3Size=False,bOverride_Bloom4Tint=False,bOverride_Bloom4Size=False,bOverride_Bloom5Tint=False,bOverride_Bloom5Size=False,bOverride_Bloom6Tint=False,bOverride_Bloom6Size=False,bOverride_BloomSizeScale=False,bOverride_BloomConvolutionTexture=False,bOverride_BloomConvolutionScatterDispersion=False,bOverride_BloomConvolutionSize=False,bOverride_BloomConvolutionCenterUV=False,bOverride_BloomConvolutionPreFilterMin=False,bOverride_BloomConvolutionPreFilterMax=False,bOverride_BloomConvolutionPreFilterMult=False,bOverride_BloomConvolutionBufferScale=False,bOverride_BloomDirtMaskIntensity=False,bOverride_BloomDirtMaskTint=False,bOverride_BloomDirtMask=False,bOverride_CameraShutterSpeed=False,bOverride_CameraISO=False,bOverride_AutoExposureMethod=False,bOverride_AutoExposureLowPercent=False,bOverride_AutoExposureHighPercent=False,bOverride_AutoExposureMinBrightness=False,bOverride_AutoExposureMaxBrightness=False,bOverride_AutoExposureSpeedUp=False,bOverride_AutoExposureSpeedDown=False,bOverride_AutoExposureBias=False,bOverride_AutoExposureBiasCurve=False,bOverride_AutoExposureMeterMask=False,bOverride_AutoExposureApplyPhysicalCameraExposure=False,bOverride_HistogramLogMin=False,bOverride_HistogramLogMax=False,bOverride_LocalExposureMethod=False,bOverride_LocalExposureHighlightContrastScale=False,bOverride_LocalExposureShadowContrastScale=False,bOverride_LocalExposureHighlightContrastCurve=False,bOverride_LocalExposureShadowContrastCurve=False,bOverride_LocalExposureHighlightThreshold=False,bOverride_LocalExposureShadowThreshold=False,bOverride_LocalExposureDetailStrength=False,bOverride_LocalExposureBlurredLuminanceBlend=False,bOverride_LocalExposureBlurredLuminanceKernelSizePercent=False,bOverride_LocalExposureMiddleGreyBias=False,bOverride_LensFlareIntensity=False,bOverride_LensFlareTint=False,bOverride_LensFlareTints=False,bOverride_LensFlareBokehSize=False,bOverride_LensFlareBokehShape=False,bOverride_LensFlareThreshold=False,bOverride_VignetteIntensity=False,bOverride_Sharpen=False,bOverride_FilmGrainIntensity=False,bOverride_FilmGrainIntensityShadows=False,bOverride_FilmGrainIntensityMidtones=False,bOverride_FilmGrainIntensityHighlights=False,bOverride_FilmGrainShadowsMax=False,bOverride_FilmGrainHighlightsMin=False,bOverride_FilmGrainHighlightsMax=False,bOverride_FilmGrainTexelSize=False,bOverride_FilmGrainTexture=False,bOverride_AmbientOcclusionIntensity=False,bOverride_AmbientOcclusionStaticFraction=False,bOverride_AmbientOcclusionRadius=False,bOverride_AmbientOcclusionFadeDistance=False,bOverride_AmbientOcclusionFadeRadius=False,bOverride_AmbientOcclusionRadiusInWS=False,bOverride_AmbientOcclusionPower=False,bOverride_AmbientOcclusionBias=False,bOverride_AmbientOcclusionQuality=False,bOverride_AmbientOcclusionMipBlend=False,bOverride_AmbientOcclusionMipScale=False,bOverride_AmbientOcclusionMipThreshold=False,bOverride_AmbientOcclusionTemporalBlendWeight=False,bOverride_RayTracingAO=False,bOverride_RayTracingAOSamplesPerPixel=False,bOverride_RayTracingAOIntensity=False,bOverride_RayTracingAORadius=False,bOverride_IndirectLightingColor=False,bOverride_IndirectLightingIntensity=False,bOverride_ColorGradingIntensity=False,bOverride_ColorGradingLUT=False,bOverride_DepthOfFieldFocalDistance=False,bOverride_DepthOfFieldFstop=False,bOverride_DepthOfFieldMinFstop=False,bOverride_DepthOfFieldBladeCount=False,bOverride_DepthOfFieldSensorWidth=False,bOverride_DepthOfFieldSqueezeFactor=False,bOverride_DepthOfFieldDepthBlurRadius=False,bOverride_DepthOfFieldUseHairDepth=False,bOverride_DepthOfFieldDepthBlurAmount=False,bOverride_DepthOfFieldFocalRegion=False,bOverride_DepthOfFieldNearTransitionRegion=False,bOverride_DepthOfFieldFarTransitionRegion=False,bOverride_DepthOfFieldScale=False,bOverride_DepthOfFieldNearBlurSize=False,bOverride_DepthOfFieldFarBlurSize=False,bOverride_MobileHQGaussian=False,bOverride_DepthOfFieldOcclusion=False,bOverride_DepthOfFieldSkyFocusDistance=False,bOverride_DepthOfFieldVignetteSize=False,bOverride_MotionBlurAmount=False,bOverride_MotionBlurMax=False,bOverride_MotionBlurTargetFPS=False,bOverride_MotionBlurPerObjectSize=False,bOverride_ReflectionMethod=False,bOverride_LumenReflectionQuality=False,bOverride_ScreenSpaceReflectionIntensity=False,bOverride_ScreenSpaceReflectionQuality=False,bOverride_ScreenSpaceReflectionMaxRoughness=False,bOverride_ScreenSpaceReflectionRoughnessScale=False,bOverride_UserFlags=False,bOverride_RayTracingReflectionsMaxRoughness=False,bOverride_RayTracingReflectionsMaxBounces=False,bOverride_RayTracingReflectionsSamplesPerPixel=False,bOverride_RayTracingReflectionsShadows=False,bOverride_RayTracingReflectionsTranslucency=False,bOverride_TranslucencyType=False,bOverride_RayTracingTranslucencyMaxRoughness=False,bOverride_RayTracingTranslucencyRefractionRays=False,bOverride_RayTracingTranslucencySamplesPerPixel=False,bOverride_RayTracingTranslucencyShadows=False,bOverride_RayTracingTranslucencyRefraction=False,bOverride_DynamicGlobalIlluminationMethod=False,bOverride_LumenSceneLightingQuality=False,bOverride_LumenSceneDetail=False,bOverride_LumenSceneViewDistance=False,bOverride_LumenSceneLightingUpdateSpeed=False,bOverride_LumenFinalGatherQuality=False,bOverride_LumenFinalGatherLightingUpdateSpeed=False,bOverride_LumenFinalGatherScreenTraces=False,bOverride_LumenMaxTraceDistance=False,bOverride_LumenDiffuseColorBoost=False,bOverride_LumenSkylightLeaking=False,bOverride_LumenFullSkylightLeakingDistance=False,bOverride_LumenRayLightingMode=False,bOverride_LumenReflectionsScreenTraces=False,bOverride_LumenFrontLayerTranslucencyReflections=False,bOverride_LumenMaxRoughnessToTraceReflections=False,bOverride_LumenMaxReflectionBounces=False,bOverride_LumenMaxRefractionBounces=False,bOverride_LumenSurfaceCacheResolution=False,bOverride_RayTracingGI=False,bOverride_RayTracingGIMaxBounces=False,bOverride_RayTracingGISamplesPerPixel=False,bOverride_PathTracingMaxBounces=False,bOverride_PathTracingSamplesPerPixel=False,bOverride_PathTracingMaxPathIntensity=False,bOverride_PathTracingEnableEmissiveMaterials=False,bOverride_PathTracingEnableReferenceDOF=False,bOverride_PathTracingEnableReferenceAtmosphere=False,bOverride_PathTracingEnableDenoiser=False,bOverride_PathTracingIncludeEmissive=False,bOverride_PathTracingIncludeDiffuse=False,bOverride_PathTracingIncludeIndirectDiffuse=False,bOverride_PathTracingIncludeSpecular=False,bOverride_PathTracingIncludeIndirectSpecular=False,bOverride_PathTracingIncludeVolume=False,bOverride_PathTracingIncludeIndirectVolume=False,bMobileHQGaussian=False,BloomMethod=BM_SOG,AutoExposureMethod=AEM_Histogram,TemperatureType=TEMP_WhiteBalance,WhiteTemp=6500.000000,WhiteTint=0.000000,ColorSaturation=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrast=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGamma=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGain=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffset=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetShadows=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetMidtones=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetHighlights=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorCorrectionHighlightsMin=0.500000,ColorCorrectionHighlightsMax=1.000000,ColorCorrectionShadowsMax=0.090000,BlueCorrection=0.600000,ExpandGamut=1.000000,ToneCurveAmount=1.000000,FilmSlope=0.880000,FilmToe=0.550000,FilmShoulder=0.260000,FilmBlackClip=0.000000,FilmWhiteClip=0.040000,SceneColorTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SceneFringeIntensity=0.000000,ChromaticAberrationStartOffset=0.000000,BloomIntensity=0.675000,BloomThreshold=-1.000000,BloomSizeScale=4.000000,Bloom1Size=0.300000,Bloom2Size=1.000000,Bloom3Size=2.000000,Bloom4Size=10.000000,Bloom5Size=30.000000,Bloom6Size=64.000000,Bloom1Tint=(R=0.346500,G=0.346500,B=0.346500,A=1.000000),Bloom2Tint=(R=0.138000,G=0.138000,B=0.138000,A=1.000000),Bloom3Tint=(R=0.117600,G=0.117600,B=0.117600,A=1.000000),Bloom4Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom5Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom6Tint=(R=0.061000,G=0.061000,B=0.061000,A=1.000000),BloomConvolutionScatterDispersion=1.000000,BloomConvolutionSize=1.000000,BloomConvolutionTexture=None,BloomConvolutionCenterUV=(X=0.500000,Y=0.500000),BloomConvolutionPreFilterMin=7.000000,BloomConvolutionPreFilterMax=15000.000000,BloomConvolutionPreFilterMult=15.000000,BloomConvolutionBufferScale=0.133000,BloomDirtMask=None,BloomDirtMaskIntensity=0.000000,BloomDirtMaskTint=(R=0.500000,G=0.500000,B=0.500000,A=1.000000),DynamicGlobalIlluminationMethod=Lumen,IndirectLightingColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),IndirectLightingIntensity=1.000000,LumenRayLightingMode=Default,LumenSceneLightingQuality=1.000000,LumenSceneDetail=1.000000,LumenSceneViewDistance=20000.000000,LumenSceneLightingUpdateSpeed=1.000000,LumenFinalGatherQuality=1.000000,LumenFinalGatherLightingUpdateSpeed=1.000000,LumenFinalGatherScreenTraces=True,LumenMaxTraceDistance=20000.000000,LumenDiffuseColorBoost=1.000000,LumenSkylightLeaking=0.000000,LumenFullSkylightLeakingDistance=1000.000000,LumenSurfaceCacheResolution=1.000000,ReflectionMethod=Lumen,LumenReflectionQuality=1.000000,LumenReflectionsScreenTraces=True,LumenFrontLayerTranslucencyReflections=False,LumenMaxRoughnessToTraceReflections=0.400000,LumenMaxReflectionBounces=1,LumenMaxRefractionBounces=0,ScreenSpaceReflectionIntensity=100.000000,ScreenSpaceReflectionQuality=50.000000,ScreenSpaceReflectionMaxRoughness=0.600000,bMegaLights=True,AmbientCubemapTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),AmbientCubemapIntensity=1.000000,AmbientCubemap=None,CameraShutterSpeed=60.000000,CameraISO=100.000000,DepthOfFieldFstop=4.000000,DepthOfFieldMinFstop=1.200000,DepthOfFieldBladeCount=5,AutoExposureBias=1.000000,AutoExposureBiasBackup=0.000000,bOverride_AutoExposureBiasBackup=False,AutoExposureApplyPhysicalCameraExposure=True,AutoExposureBiasCurve=None,AutoExposureMeterMask=None,AutoExposureLowPercent=10.000000,AutoExposureHighPercent=90.000000,AutoExposureMinBrightness=-10.000000,AutoExposureMaxBrightness=20.000000,AutoExposureSpeedUp=3.000000,AutoExposureSpeedDown=1.000000,HistogramLogMin=-10.000000,HistogramLogMax=20.000000,LocalExposureMethod=Bilateral,LocalExposureHighlightContrastScale=1.000000,LocalExposureShadowContrastScale=1.000000,LocalExposureHighlightContrastCurve=None,LocalExposureShadowContrastCurve=None,LocalExposureHighlightThreshold=0.000000,LocalExposureShadowThreshold=0.000000,LocalExposureDetailStrength=1.000000,LocalExposureBlurredLuminanceBlend=0.600000,LocalExposureBlurredLuminanceKernelSizePercent=50.000000,LocalExposureMiddleGreyBias=0.000000,LensFlareIntensity=1.000000,LensFlareTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),LensFlareBokehSize=3.000000,LensFlareThreshold=8.000000,LensFlareBokehShape=None,LensFlareTints[0]=(R=1.000000,G=0.800000,B=0.400000,A=0.600000),LensFlareTints[1]=(R=1.000000,G=1.000000,B=0.600000,A=0.530000),LensFlareTints[2]=(R=0.800000,G=0.800000,B=1.000000,A=0.460000),LensFlareTints[3]=(R=0.500000,G=1.000000,B=0.400000,A=0.390000),LensFlareTints[4]=(R=0.500000,G=0.800000,B=1.000000,A=0.310000),LensFlareTints[5]=(R=0.900000,G=1.000000,B=0.800000,A=0.270000),LensFlareTints[6]=(R=1.000000,G=0.800000,B=0.400000,A=0.220000),LensFlareTints[7]=(R=0.900000,G=0.700000,B=0.700000,A=0.150000),VignetteIntensity=0.400000,Sharpen=0.000000,FilmGrainIntensity=0.000000,FilmGrainIntensityShadows=1.000000,FilmGrainIntensityMidtones=1.000000,FilmGrainIntensityHighlights=1.000000,FilmGrainShadowsMax=0.090000,FilmGrainHighlightsMin=0.500000,FilmGrainHighlightsMax=1.000000,FilmGrainTexelSize=1.000000,FilmGrainTexture=None,AmbientOcclusionIntensity=0.500000,AmbientOcclusionStaticFraction=1.000000,AmbientOcclusionRadius=200.000000,AmbientOcclusionRadiusInWS=False,AmbientOcclusionFadeDistance=8000.000000,AmbientOcclusionFadeRadius=5000.000000,AmbientOcclusionPower=2.000000,AmbientOcclusionBias=3.000000,AmbientOcclusionQuality=50.000000,AmbientOcclusionMipBlend=0.600000,AmbientOcclusionMipScale=1.700000,AmbientOcclusionMipThreshold=0.010000,AmbientOcclusionTemporalBlendWeight=0.100000,RayTracingAO=False,RayTracingAOSamplesPerPixel=1,RayTracingAOIntensity=1.000000,RayTracingAORadius=200.000000,ColorGradingIntensity=1.000000,ColorGradingLUT=None,DepthOfFieldSensorWidth=24.576000,DepthOfFieldSqueezeFactor=1.000000,DepthOfFieldFocalDistance=0.000000,DepthOfFieldDepthBlurAmount=1.000000,DepthOfFieldDepthBlurRadius=0.000000,DepthOfFieldUseHairDepth=False,DepthOfFieldFocalRegion=0.000000,DepthOfFieldNearTransitionRegion=300.000000,DepthOfFieldFarTransitionRegion=500.000000,DepthOfFieldScale=0.000000,DepthOfFieldNearBlurSize=15.000000,DepthOfFieldFarBlurSize=15.000000,DepthOfFieldOcclusion=0.400000,DepthOfFieldSkyFocusDistance=0.000000,DepthOfFieldVignetteSize=200.000000,MotionBlurAmount=0.500000,MotionBlurMax=5.000000,MotionBlurTargetFPS=30,MotionBlurPerObjectSize=0.000000,TranslucencyType=Raster,RayTracingTranslucencyMaxRoughness=0.600000,RayTracingTranslucencyRefractionRays=3,RayTracingTranslucencySamplesPerPixel=1,RayTracingTranslucencyShadows=Hard_shadows,RayTracingTranslucencyRefraction=True,PathTracingMaxBounces=32,PathTracingSamplesPerPixel=2048,PathTracingMaxPathIntensity=24.000000,PathTracingEnableEmissiveMaterials=True,PathTracingEnableReferenceDOF=False,PathTracingEnableReferenceAtmosphere=False,PathTracingEnableDenoiser=True,PathTracingIncludeEmissive=True,PathTracingIncludeDiffuse=True,PathTracingIncludeIndirectDiffuse=True,PathTracingIncludeSpecular=True,PathTracingIncludeIndirectSpecular=True,PathTracingIncludeVolume=True,PathTracingIncludeIndirectVolume=True,UserFlags=0,WeightedBlendables=(Array=)),LightingRigRotation=0.000000,RotationSpeed=2.000000,DirectionalLightRotation=(Pitch=-40.000000,Yaw=-67.500000,Roll=0.000000),bEnableToneMapping=True,bShowMeshEdges=False) ++Profiles=(ProfileName="Grey Wireframe",bSharedProfile=True,bIsEngineDefaultProfile=True,bUseSkyLighting=True,DirectionalLightIntensity=1.000000,DirectionalLightColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SkyLightIntensity=1.000000,bRotateLightingRig=False,bShowEnvironment=False,bShowFloor=False,bShowGrid=True,EnvironmentColor=(R=0.039216,G=0.039216,B=0.039216,A=1.000000),EnvironmentIntensity=1.000000,EnvironmentCubeMapPath="/Engine/EditorMaterials/AssetViewer/EpicQuadPanorama_CC+EV1.EpicQuadPanorama_CC+EV1",bPostProcessingEnabled=False,PostProcessingSettings=(bOverride_TemperatureType=False,bOverride_WhiteTemp=False,bOverride_WhiteTint=False,bOverride_ColorSaturation=False,bOverride_ColorContrast=False,bOverride_ColorGamma=False,bOverride_ColorGain=False,bOverride_ColorOffset=False,bOverride_ColorSaturationShadows=False,bOverride_ColorContrastShadows=False,bOverride_ColorGammaShadows=False,bOverride_ColorGainShadows=False,bOverride_ColorOffsetShadows=False,bOverride_ColorSaturationMidtones=False,bOverride_ColorContrastMidtones=False,bOverride_ColorGammaMidtones=False,bOverride_ColorGainMidtones=False,bOverride_ColorOffsetMidtones=False,bOverride_ColorSaturationHighlights=False,bOverride_ColorContrastHighlights=False,bOverride_ColorGammaHighlights=False,bOverride_ColorGainHighlights=False,bOverride_ColorOffsetHighlights=False,bOverride_ColorCorrectionShadowsMax=False,bOverride_ColorCorrectionHighlightsMin=False,bOverride_ColorCorrectionHighlightsMax=False,bOverride_BlueCorrection=False,bOverride_ExpandGamut=False,bOverride_ToneCurveAmount=False,bOverride_FilmSlope=False,bOverride_FilmToe=False,bOverride_FilmShoulder=False,bOverride_FilmBlackClip=False,bOverride_FilmWhiteClip=False,bOverride_SceneColorTint=False,bOverride_SceneFringeIntensity=False,bOverride_ChromaticAberrationStartOffset=False,bOverride_bMegaLights=False,bOverride_AmbientCubemapTint=False,bOverride_AmbientCubemapIntensity=False,bOverride_BloomMethod=False,bOverride_BloomIntensity=False,bOverride_BloomThreshold=False,bOverride_Bloom1Tint=False,bOverride_Bloom1Size=False,bOverride_Bloom2Size=False,bOverride_Bloom2Tint=False,bOverride_Bloom3Tint=False,bOverride_Bloom3Size=False,bOverride_Bloom4Tint=False,bOverride_Bloom4Size=False,bOverride_Bloom5Tint=False,bOverride_Bloom5Size=False,bOverride_Bloom6Tint=False,bOverride_Bloom6Size=False,bOverride_BloomSizeScale=False,bOverride_BloomConvolutionTexture=False,bOverride_BloomConvolutionScatterDispersion=False,bOverride_BloomConvolutionSize=False,bOverride_BloomConvolutionCenterUV=False,bOverride_BloomConvolutionPreFilterMin=False,bOverride_BloomConvolutionPreFilterMax=False,bOverride_BloomConvolutionPreFilterMult=False,bOverride_BloomConvolutionBufferScale=False,bOverride_BloomDirtMaskIntensity=False,bOverride_BloomDirtMaskTint=False,bOverride_BloomDirtMask=False,bOverride_CameraShutterSpeed=False,bOverride_CameraISO=False,bOverride_AutoExposureMethod=False,bOverride_AutoExposureLowPercent=False,bOverride_AutoExposureHighPercent=False,bOverride_AutoExposureMinBrightness=False,bOverride_AutoExposureMaxBrightness=False,bOverride_AutoExposureSpeedUp=False,bOverride_AutoExposureSpeedDown=False,bOverride_AutoExposureBias=False,bOverride_AutoExposureBiasCurve=False,bOverride_AutoExposureMeterMask=False,bOverride_AutoExposureApplyPhysicalCameraExposure=False,bOverride_HistogramLogMin=False,bOverride_HistogramLogMax=False,bOverride_LocalExposureMethod=False,bOverride_LocalExposureHighlightContrastScale=False,bOverride_LocalExposureShadowContrastScale=False,bOverride_LocalExposureHighlightContrastCurve=False,bOverride_LocalExposureShadowContrastCurve=False,bOverride_LocalExposureHighlightThreshold=False,bOverride_LocalExposureShadowThreshold=False,bOverride_LocalExposureDetailStrength=False,bOverride_LocalExposureBlurredLuminanceBlend=False,bOverride_LocalExposureBlurredLuminanceKernelSizePercent=False,bOverride_LocalExposureMiddleGreyBias=False,bOverride_LensFlareIntensity=False,bOverride_LensFlareTint=False,bOverride_LensFlareTints=False,bOverride_LensFlareBokehSize=False,bOverride_LensFlareBokehShape=False,bOverride_LensFlareThreshold=False,bOverride_VignetteIntensity=False,bOverride_Sharpen=False,bOverride_FilmGrainIntensity=False,bOverride_FilmGrainIntensityShadows=False,bOverride_FilmGrainIntensityMidtones=False,bOverride_FilmGrainIntensityHighlights=False,bOverride_FilmGrainShadowsMax=False,bOverride_FilmGrainHighlightsMin=False,bOverride_FilmGrainHighlightsMax=False,bOverride_FilmGrainTexelSize=False,bOverride_FilmGrainTexture=False,bOverride_AmbientOcclusionIntensity=False,bOverride_AmbientOcclusionStaticFraction=False,bOverride_AmbientOcclusionRadius=False,bOverride_AmbientOcclusionFadeDistance=False,bOverride_AmbientOcclusionFadeRadius=False,bOverride_AmbientOcclusionRadiusInWS=False,bOverride_AmbientOcclusionPower=False,bOverride_AmbientOcclusionBias=False,bOverride_AmbientOcclusionQuality=False,bOverride_AmbientOcclusionMipBlend=False,bOverride_AmbientOcclusionMipScale=False,bOverride_AmbientOcclusionMipThreshold=False,bOverride_AmbientOcclusionTemporalBlendWeight=False,bOverride_RayTracingAO=False,bOverride_RayTracingAOSamplesPerPixel=False,bOverride_RayTracingAOIntensity=False,bOverride_RayTracingAORadius=False,bOverride_IndirectLightingColor=False,bOverride_IndirectLightingIntensity=False,bOverride_ColorGradingIntensity=False,bOverride_ColorGradingLUT=False,bOverride_DepthOfFieldFocalDistance=False,bOverride_DepthOfFieldFstop=False,bOverride_DepthOfFieldMinFstop=False,bOverride_DepthOfFieldBladeCount=False,bOverride_DepthOfFieldSensorWidth=False,bOverride_DepthOfFieldSqueezeFactor=False,bOverride_DepthOfFieldDepthBlurRadius=False,bOverride_DepthOfFieldUseHairDepth=False,bOverride_DepthOfFieldDepthBlurAmount=False,bOverride_DepthOfFieldFocalRegion=False,bOverride_DepthOfFieldNearTransitionRegion=False,bOverride_DepthOfFieldFarTransitionRegion=False,bOverride_DepthOfFieldScale=False,bOverride_DepthOfFieldNearBlurSize=False,bOverride_DepthOfFieldFarBlurSize=False,bOverride_MobileHQGaussian=False,bOverride_DepthOfFieldOcclusion=False,bOverride_DepthOfFieldSkyFocusDistance=False,bOverride_DepthOfFieldVignetteSize=False,bOverride_MotionBlurAmount=False,bOverride_MotionBlurMax=False,bOverride_MotionBlurTargetFPS=False,bOverride_MotionBlurPerObjectSize=False,bOverride_ReflectionMethod=False,bOverride_LumenReflectionQuality=False,bOverride_ScreenSpaceReflectionIntensity=False,bOverride_ScreenSpaceReflectionQuality=False,bOverride_ScreenSpaceReflectionMaxRoughness=False,bOverride_ScreenSpaceReflectionRoughnessScale=False,bOverride_UserFlags=False,bOverride_RayTracingReflectionsMaxRoughness=False,bOverride_RayTracingReflectionsMaxBounces=False,bOverride_RayTracingReflectionsSamplesPerPixel=False,bOverride_RayTracingReflectionsShadows=False,bOverride_RayTracingReflectionsTranslucency=False,bOverride_TranslucencyType=False,bOverride_RayTracingTranslucencyMaxRoughness=False,bOverride_RayTracingTranslucencyRefractionRays=False,bOverride_RayTracingTranslucencySamplesPerPixel=False,bOverride_RayTracingTranslucencyShadows=False,bOverride_RayTracingTranslucencyRefraction=False,bOverride_DynamicGlobalIlluminationMethod=False,bOverride_LumenSceneLightingQuality=False,bOverride_LumenSceneDetail=False,bOverride_LumenSceneViewDistance=False,bOverride_LumenSceneLightingUpdateSpeed=False,bOverride_LumenFinalGatherQuality=False,bOverride_LumenFinalGatherLightingUpdateSpeed=False,bOverride_LumenFinalGatherScreenTraces=False,bOverride_LumenMaxTraceDistance=False,bOverride_LumenDiffuseColorBoost=False,bOverride_LumenSkylightLeaking=False,bOverride_LumenFullSkylightLeakingDistance=False,bOverride_LumenRayLightingMode=False,bOverride_LumenReflectionsScreenTraces=False,bOverride_LumenFrontLayerTranslucencyReflections=False,bOverride_LumenMaxRoughnessToTraceReflections=False,bOverride_LumenMaxReflectionBounces=False,bOverride_LumenMaxRefractionBounces=False,bOverride_LumenSurfaceCacheResolution=False,bOverride_RayTracingGI=False,bOverride_RayTracingGIMaxBounces=False,bOverride_RayTracingGISamplesPerPixel=False,bOverride_PathTracingMaxBounces=False,bOverride_PathTracingSamplesPerPixel=False,bOverride_PathTracingMaxPathIntensity=False,bOverride_PathTracingEnableEmissiveMaterials=False,bOverride_PathTracingEnableReferenceDOF=False,bOverride_PathTracingEnableReferenceAtmosphere=False,bOverride_PathTracingEnableDenoiser=False,bOverride_PathTracingIncludeEmissive=False,bOverride_PathTracingIncludeDiffuse=False,bOverride_PathTracingIncludeIndirectDiffuse=False,bOverride_PathTracingIncludeSpecular=False,bOverride_PathTracingIncludeIndirectSpecular=False,bOverride_PathTracingIncludeVolume=False,bOverride_PathTracingIncludeIndirectVolume=False,bMobileHQGaussian=False,BloomMethod=BM_SOG,AutoExposureMethod=AEM_Histogram,TemperatureType=TEMP_WhiteBalance,WhiteTemp=6500.000000,WhiteTint=0.000000,ColorSaturation=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrast=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGamma=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGain=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffset=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetShadows=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetMidtones=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetHighlights=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorCorrectionHighlightsMin=0.500000,ColorCorrectionHighlightsMax=1.000000,ColorCorrectionShadowsMax=0.090000,BlueCorrection=0.600000,ExpandGamut=1.000000,ToneCurveAmount=1.000000,FilmSlope=0.880000,FilmToe=0.550000,FilmShoulder=0.260000,FilmBlackClip=0.000000,FilmWhiteClip=0.040000,SceneColorTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SceneFringeIntensity=0.000000,ChromaticAberrationStartOffset=0.000000,BloomIntensity=0.675000,BloomThreshold=-1.000000,BloomSizeScale=4.000000,Bloom1Size=0.300000,Bloom2Size=1.000000,Bloom3Size=2.000000,Bloom4Size=10.000000,Bloom5Size=30.000000,Bloom6Size=64.000000,Bloom1Tint=(R=0.346500,G=0.346500,B=0.346500,A=1.000000),Bloom2Tint=(R=0.138000,G=0.138000,B=0.138000,A=1.000000),Bloom3Tint=(R=0.117600,G=0.117600,B=0.117600,A=1.000000),Bloom4Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom5Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom6Tint=(R=0.061000,G=0.061000,B=0.061000,A=1.000000),BloomConvolutionScatterDispersion=1.000000,BloomConvolutionSize=1.000000,BloomConvolutionTexture=None,BloomConvolutionCenterUV=(X=0.500000,Y=0.500000),BloomConvolutionPreFilterMin=7.000000,BloomConvolutionPreFilterMax=15000.000000,BloomConvolutionPreFilterMult=15.000000,BloomConvolutionBufferScale=0.133000,BloomDirtMask=None,BloomDirtMaskIntensity=0.000000,BloomDirtMaskTint=(R=0.500000,G=0.500000,B=0.500000,A=1.000000),DynamicGlobalIlluminationMethod=Lumen,IndirectLightingColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),IndirectLightingIntensity=1.000000,LumenRayLightingMode=Default,LumenSceneLightingQuality=1.000000,LumenSceneDetail=1.000000,LumenSceneViewDistance=20000.000000,LumenSceneLightingUpdateSpeed=1.000000,LumenFinalGatherQuality=1.000000,LumenFinalGatherLightingUpdateSpeed=1.000000,LumenFinalGatherScreenTraces=True,LumenMaxTraceDistance=20000.000000,LumenDiffuseColorBoost=1.000000,LumenSkylightLeaking=0.000000,LumenFullSkylightLeakingDistance=1000.000000,LumenSurfaceCacheResolution=1.000000,ReflectionMethod=Lumen,LumenReflectionQuality=1.000000,LumenReflectionsScreenTraces=True,LumenFrontLayerTranslucencyReflections=False,LumenMaxRoughnessToTraceReflections=0.400000,LumenMaxReflectionBounces=1,LumenMaxRefractionBounces=0,ScreenSpaceReflectionIntensity=100.000000,ScreenSpaceReflectionQuality=50.000000,ScreenSpaceReflectionMaxRoughness=0.600000,bMegaLights=True,AmbientCubemapTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),AmbientCubemapIntensity=1.000000,AmbientCubemap=None,CameraShutterSpeed=60.000000,CameraISO=100.000000,DepthOfFieldFstop=4.000000,DepthOfFieldMinFstop=1.200000,DepthOfFieldBladeCount=5,AutoExposureBias=1.000000,AutoExposureBiasBackup=0.000000,bOverride_AutoExposureBiasBackup=False,AutoExposureApplyPhysicalCameraExposure=True,AutoExposureBiasCurve=None,AutoExposureMeterMask=None,AutoExposureLowPercent=10.000000,AutoExposureHighPercent=90.000000,AutoExposureMinBrightness=-10.000000,AutoExposureMaxBrightness=20.000000,AutoExposureSpeedUp=3.000000,AutoExposureSpeedDown=1.000000,HistogramLogMin=-10.000000,HistogramLogMax=20.000000,LocalExposureMethod=Bilateral,LocalExposureHighlightContrastScale=1.000000,LocalExposureShadowContrastScale=1.000000,LocalExposureHighlightContrastCurve=None,LocalExposureShadowContrastCurve=None,LocalExposureHighlightThreshold=0.000000,LocalExposureShadowThreshold=0.000000,LocalExposureDetailStrength=1.000000,LocalExposureBlurredLuminanceBlend=0.600000,LocalExposureBlurredLuminanceKernelSizePercent=50.000000,LocalExposureMiddleGreyBias=0.000000,LensFlareIntensity=1.000000,LensFlareTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),LensFlareBokehSize=3.000000,LensFlareThreshold=8.000000,LensFlareBokehShape=None,LensFlareTints[0]=(R=1.000000,G=0.800000,B=0.400000,A=0.600000),LensFlareTints[1]=(R=1.000000,G=1.000000,B=0.600000,A=0.530000),LensFlareTints[2]=(R=0.800000,G=0.800000,B=1.000000,A=0.460000),LensFlareTints[3]=(R=0.500000,G=1.000000,B=0.400000,A=0.390000),LensFlareTints[4]=(R=0.500000,G=0.800000,B=1.000000,A=0.310000),LensFlareTints[5]=(R=0.900000,G=1.000000,B=0.800000,A=0.270000),LensFlareTints[6]=(R=1.000000,G=0.800000,B=0.400000,A=0.220000),LensFlareTints[7]=(R=0.900000,G=0.700000,B=0.700000,A=0.150000),VignetteIntensity=0.400000,Sharpen=0.000000,FilmGrainIntensity=0.000000,FilmGrainIntensityShadows=1.000000,FilmGrainIntensityMidtones=1.000000,FilmGrainIntensityHighlights=1.000000,FilmGrainShadowsMax=0.090000,FilmGrainHighlightsMin=0.500000,FilmGrainHighlightsMax=1.000000,FilmGrainTexelSize=1.000000,FilmGrainTexture=None,AmbientOcclusionIntensity=0.500000,AmbientOcclusionStaticFraction=1.000000,AmbientOcclusionRadius=200.000000,AmbientOcclusionRadiusInWS=False,AmbientOcclusionFadeDistance=8000.000000,AmbientOcclusionFadeRadius=5000.000000,AmbientOcclusionPower=2.000000,AmbientOcclusionBias=3.000000,AmbientOcclusionQuality=50.000000,AmbientOcclusionMipBlend=0.600000,AmbientOcclusionMipScale=1.700000,AmbientOcclusionMipThreshold=0.010000,AmbientOcclusionTemporalBlendWeight=0.100000,RayTracingAO=False,RayTracingAOSamplesPerPixel=1,RayTracingAOIntensity=1.000000,RayTracingAORadius=200.000000,ColorGradingIntensity=1.000000,ColorGradingLUT=None,DepthOfFieldSensorWidth=24.576000,DepthOfFieldSqueezeFactor=1.000000,DepthOfFieldFocalDistance=0.000000,DepthOfFieldDepthBlurAmount=1.000000,DepthOfFieldDepthBlurRadius=0.000000,DepthOfFieldUseHairDepth=False,DepthOfFieldFocalRegion=0.000000,DepthOfFieldNearTransitionRegion=300.000000,DepthOfFieldFarTransitionRegion=500.000000,DepthOfFieldScale=0.000000,DepthOfFieldNearBlurSize=15.000000,DepthOfFieldFarBlurSize=15.000000,DepthOfFieldOcclusion=0.400000,DepthOfFieldSkyFocusDistance=0.000000,DepthOfFieldVignetteSize=200.000000,MotionBlurAmount=0.500000,MotionBlurMax=5.000000,MotionBlurTargetFPS=30,MotionBlurPerObjectSize=0.000000,TranslucencyType=Raster,RayTracingTranslucencyMaxRoughness=0.600000,RayTracingTranslucencyRefractionRays=3,RayTracingTranslucencySamplesPerPixel=1,RayTracingTranslucencyShadows=Hard_shadows,RayTracingTranslucencyRefraction=True,PathTracingMaxBounces=32,PathTracingSamplesPerPixel=2048,PathTracingMaxPathIntensity=24.000000,PathTracingEnableEmissiveMaterials=True,PathTracingEnableReferenceDOF=False,PathTracingEnableReferenceAtmosphere=False,PathTracingEnableDenoiser=True,PathTracingIncludeEmissive=True,PathTracingIncludeDiffuse=True,PathTracingIncludeIndirectDiffuse=True,PathTracingIncludeSpecular=True,PathTracingIncludeIndirectSpecular=True,PathTracingIncludeVolume=True,PathTracingIncludeIndirectVolume=True,UserFlags=0,WeightedBlendables=(Array=)),LightingRigRotation=0.000000,RotationSpeed=2.000000,DirectionalLightRotation=(Pitch=-40.000000,Yaw=-67.500000,Roll=0.000000),bEnableToneMapping=False,bShowMeshEdges=True) + diff --git a/Content/Legumix/Levels/Assets/Carott_Container.uasset b/Content/Legumix/Levels/Assets/Carott_Container.uasset new file mode 100644 index 0000000..ccd080e --- /dev/null +++ b/Content/Legumix/Levels/Assets/Carott_Container.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69e29b2095c81be7f0d55dc9dc852446565cf98c1c173ab705a5b7b854a9a137 +size 163896 diff --git a/Content/Legumix/Levels/Assets/Container_Green.uasset b/Content/Legumix/Levels/Assets/Container_Green.uasset new file mode 100644 index 0000000..1696a00 --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container_Green.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f9e9dc6e47539df3360077dcff2c8dd8f8d5a9136e454ccccdf6fe720044088 +size 53094 diff --git a/Content/Legumix/Levels/Assets/Container_Green2.uasset b/Content/Legumix/Levels/Assets/Container_Green2.uasset new file mode 100644 index 0000000..c410eec --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container_Green2.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b0ca8df086c059b8fac25d7af4a56b7f102f9b42b38b010054e817a8113063e +size 55514 diff --git a/Content/Legumix/Levels/Assets/Container_Grey.uasset b/Content/Legumix/Levels/Assets/Container_Grey.uasset new file mode 100644 index 0000000..13879bd --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container_Grey.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63671e34f689549c0c82d51165ff6c55efb5fc010a98990c5203a46a05ec25e1 +size 55499 diff --git a/Content/Legumix/Levels/Assets/Container_Light.uasset b/Content/Legumix/Levels/Assets/Container_Light.uasset new file mode 100644 index 0000000..61b27d7 --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container_Light.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:539406f14540c070e70002505cef3dd07c1954287196e16f827933089fd07d15 +size 53513 diff --git a/Content/Legumix/Levels/Assets/Container_Magenta.uasset b/Content/Legumix/Levels/Assets/Container_Magenta.uasset new file mode 100644 index 0000000..a173b0a --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container_Magenta.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e6805930594c78479153fb6e4bcf17485c2bc6cd1ce1377ba56a8606e612713 +size 55405 diff --git a/Content/Legumix/Levels/Assets/Container_Orange.uasset b/Content/Legumix/Levels/Assets/Container_Orange.uasset new file mode 100644 index 0000000..78e4a47 --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container_Orange.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffa9092b5e7780e4cb7690de20f5b0e0f37251d71bc379424f775e14656b0cad +size 53084 diff --git a/Content/Legumix/Levels/Assets/Container_White.uasset b/Content/Legumix/Levels/Assets/Container_White.uasset new file mode 100644 index 0000000..c67a70f --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container_White.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c12bbd4048779b5415c1f1534d6fb4d1ae4b6058cddfdd168fb68efd93bbf2ea +size 52992 diff --git a/Content/Legumix/Levels/Assets/Radish_Container.uasset b/Content/Legumix/Levels/Assets/Radish_Container.uasset new file mode 100644 index 0000000..f1a222d --- /dev/null +++ b/Content/Legumix/Levels/Assets/Radish_Container.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8554754f7d814355ab7a2495d5f0e5b80279f7062a5f4e27e04374eaa1722e8a +size 164916 diff --git a/Content/Legumix/Levels/LVL_GYM_00.umap b/Content/Legumix/Levels/LVL_GYM_00.umap index 044df44..7621f41 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:5165a92383897fa72119eb6eb4bc1ea115999ea8a8b5a31f46f6eef0ff593e24 -size 334633 +oid sha256:8288a99dc21633f43618636963c724f8c6805d0fea1e2ede73366bb31308aa3f +size 337073 diff --git a/Content/Legumix/Levels/T_GabaritChecker_Gray.uasset b/Content/Legumix/Levels/T_GabaritChecker_Gray.uasset new file mode 100644 index 0000000..c889a52 --- /dev/null +++ b/Content/Legumix/Levels/T_GabaritChecker_Gray.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c898b2856411ccbe7548209cdb752d65c31e58de33306547ccca994a0583f09 +size 18032 diff --git a/Content/Legumix/Levels/T_GabaritChecker_Gray_Mat.uasset b/Content/Legumix/Levels/T_GabaritChecker_Gray_Mat.uasset new file mode 100644 index 0000000..33c8982 --- /dev/null +++ b/Content/Legumix/Levels/T_GabaritChecker_Gray_Mat.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65ed160760c280c0a6f9dbb1a8ddb9ff6d01347b5df7d6fb668d8cacfbf42278 +size 10716 From b468f703f9bd782b28e637d2380b5d03fee2bf2e Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 21:09:06 +0100 Subject: [PATCH 14/30] Added docstrings --- Source/LegumeMix/Public/Ammo/LMAmmoData.h | 8 ++++-- .../{Private => Public}/Player/LMBulletInfo.h | 24 +++++++++++------ Source/LegumeMix/Public/Player/LMPlayer.h | 4 +++ Source/LegumeMix/Public/Weapon/LMWeaponBase.h | 26 ++++++++++++------- .../Public/Weapon/LMWeaponDataStructure.h | 8 ------ .../LegumeMix/Public/Weapon/LMWeaponState.h | 9 +++++++ 6 files changed, 52 insertions(+), 27 deletions(-) rename Source/LegumeMix/{Private => Public}/Player/LMBulletInfo.h (59%) create mode 100644 Source/LegumeMix/Public/Weapon/LMWeaponState.h diff --git a/Source/LegumeMix/Public/Ammo/LMAmmoData.h b/Source/LegumeMix/Public/Ammo/LMAmmoData.h index 89e13f1..06eb078 100644 --- a/Source/LegumeMix/Public/Ammo/LMAmmoData.h +++ b/Source/LegumeMix/Public/Ammo/LMAmmoData.h @@ -14,11 +14,15 @@ struct FLMAmmoData : public FTableRowBase EAmmoType AmmoType; UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(ClampMin=1, ClampMax=1000, Uimin=1, Uimax=1000)) - int MaxAmmo; + int MaxAmmo = 32; UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(ClampMin=0, Uimin=0)) - int AmmoCount; + int AmmoCount = 8; + /** + * An utility method to add and + * @param Quantity The quantity of ammo to add. + */ void AddAmmo(const int Quantity) { AmmoCount += UKismetMathLibrary::Clamp(Quantity, 0, MaxAmmo); diff --git a/Source/LegumeMix/Private/Player/LMBulletInfo.h b/Source/LegumeMix/Public/Player/LMBulletInfo.h similarity index 59% rename from Source/LegumeMix/Private/Player/LMBulletInfo.h rename to Source/LegumeMix/Public/Player/LMBulletInfo.h index 855621c..0fe06af 100644 --- a/Source/LegumeMix/Private/Player/LMBulletInfo.h +++ b/Source/LegumeMix/Public/Player/LMBulletInfo.h @@ -7,27 +7,35 @@ struct FLMBulletInfo { GENERATED_BODY() + /** The number of bullets to fire. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) int BulletCount; - + + /** The bullets' origins. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) FVector Origin; - + + /** The main direction vector. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) FVector Direction; - + + /** The Random bullet spread angle deviation. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - FVector Spread; - + float Spread; + + /** The maximum distance before the bullet reaches minimum damages. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) float MaxDistance; - + + /** A curve multiplicating the damage of a bullet depending on the distance of the target. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) FFloatCurve Falloff; - + + /** The type of bullet that was fired. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) EAmmoType AmmoType; - + + /** The default amount of damage to apply per bullet. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) float Damage; }; diff --git a/Source/LegumeMix/Public/Player/LMPlayer.h b/Source/LegumeMix/Public/Player/LMPlayer.h index 91f31d2..0b15b06 100644 --- a/Source/LegumeMix/Public/Player/LMPlayer.h +++ b/Source/LegumeMix/Public/Player/LMPlayer.h @@ -3,6 +3,7 @@ #pragma once #include "CoreMinimal.h" +#include "LMBulletInfo.h" #include "Camera/CameraComponent.h" #include "GameFramework/Character.h" #include "LMPlayer.generated.h" @@ -58,4 +59,7 @@ private: UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Legumix, meta = (AllowPrivateAccess = true)) TObjectPtr Camera; + +private: + FRandomStream SpreadStream; }; diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h index da9f54a..6b4839c 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h @@ -4,7 +4,7 @@ #include "CoreMinimal.h" #include "Ammo/LMAmmo.h" -#include "LMWeaponDataStructure.h" +#include "LMWeaponState.h" #include "GameFramework/Actor.h" #include "LMWeaponBase.generated.h" @@ -41,9 +41,9 @@ public: FName GetAttachmentSocketName() const { return WeaponSocket; } protected: /* Weapon Data */ - /** The weapon static data. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) - FLMWeaponDataStructure Data; + /** The sound to play when firing. */ + UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds") + TObjectPtr FireSound; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Animations", meta=(AllowPrivateAccess=true)) TObjectPtr PrimaryFireAnimation; @@ -51,11 +51,13 @@ protected: /* Weapon Data */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Legumix|Animations", meta=(AllowPrivateAccess=true)) TObjectPtr ReloadAnimation; + /** The flat damage number of one bullet. */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) float Damage = 10.f; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) - FVector WeaponSpread = FVector::ZeroVector; + /** The max angle deviation of a bullet from the original ray. In degrees.*/ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true, UIMin=0, UIMax=180)) + float WeaponSpread = 10; /** The max distance (cm) between the origin and the target before doing minimal damage. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) @@ -69,17 +71,23 @@ protected: /* Weapon Data */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) EAmmoType AmmoType; + /** The current number of ammo in the clip. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) int ClipAmmo; + /** The maximum amount of ammo in a clip. */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) + int MaxClip; + UPROPERTY(VisibleInstanceOnly, BlueprintReadWrite, Category=Legumix) TObjectPtr Player; + /** The current state of the weapon. */ + UPROPERTY(VisibleInstanceOnly, BlueprintReadWrite, Category="Legumix|Weapon") + EWeaponState State; private: - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) - FDataTableRowHandle DataTableRow; - + /** An optional socket to attach the weapon to. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) FName WeaponSocket; diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h b/Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h index 20aa20a..7c608af 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h @@ -10,15 +10,7 @@ struct FLMWeaponDataStructure : public FTableRowBase UPROPERTY(EditAnywhere, BlueprintReadWrite) int MaxClipAmmo; - /** Mesh of the weapon display in the scene. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite) - TObjectPtr MeshWeapon; - /** The animation blueprint to animate the mesh. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) TObjectPtr AnimationBluePrint; - - /** The sound to play when firing. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite,Category=Legumix) - TObjectPtr FireSound; }; diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponState.h b/Source/LegumeMix/Public/Weapon/LMWeaponState.h new file mode 100644 index 0000000..286d769 --- /dev/null +++ b/Source/LegumeMix/Public/Weapon/LMWeaponState.h @@ -0,0 +1,9 @@ +#pragma once + +UENUM(Blueprintable) +enum class EWeaponState : uint8 +{ + EWS_Idle = 0 UMETA(DisplayName = "Idle"), + EWS_Firing = 1 UMETA(DisplayName = "Firing"), + EWS_Reloading = 2 UMETA(DisplayName = "Reloading"), +}; \ No newline at end of file From bc9c73df786fd959836c6574cbfad208ce079a94 Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 21:09:33 +0100 Subject: [PATCH 15/30] Implemented ammo collection + random bullet spread --- Source/LegumeMix/Private/Player/LMPlayer.cpp | 22 ++++++++++++++----- Source/LegumeMix/Private/Weapon/LMShotgun.cpp | 2 +- .../Private/Weapon/LMWeaponManager.cpp | 15 ++++++++++++- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/Source/LegumeMix/Private/Player/LMPlayer.cpp b/Source/LegumeMix/Private/Player/LMPlayer.cpp index 375ea0e..0526e8e 100644 --- a/Source/LegumeMix/Private/Player/LMPlayer.cpp +++ b/Source/LegumeMix/Private/Player/LMPlayer.cpp @@ -4,9 +4,9 @@ #include "Player/LMPlayer.h" #include "KismetTraceUtils.h" -#include "LMBulletInfo.h" #include "Camera/CameraComponent.h" #include "Ammo/LMAmmo.h" +#include "Player/LMBulletInfo.h" #include "Weapon/LMWeaponManager.h" ALMPlayer::ALMPlayer() @@ -21,6 +21,8 @@ ALMPlayer::ALMPlayer() ArmsMesh = CreateDefaultSubobject(TEXT("Arms Mesh")); ArmsMesh->SetupAttachment(Camera); + + SpreadStream = FRandomStream(FMath::Rand()); } // Called when the game starts or when spawned @@ -59,10 +61,20 @@ void ALMPlayer::PlayAnimation(UAnimMontage* Animation) void ALMPlayer::FireBullets(const FLMBulletInfo Settings) { - FVector EndLocation = Settings.Origin + (Settings.Direction * Settings.MaxDistance); - TArray Hits = TArray(); - GetWorld()->LineTraceMultiByChannel(Hits, Settings.Origin, EndLocation, ECC_Camera); - DrawDebugLineTraceMulti(GetWorld(), Settings.Origin, EndLocation, EDrawDebugTrace::ForDuration, Hits.Num() > 0, Hits, FColor::Green, FColor::Red, 10.f); + FVector EndLocation; + FVector ShotVector; + FHitResult OutHit = FHitResult(); + + DrawDebugLine(GetWorld(), Settings.Origin, Settings.Origin + (Settings.Direction * Settings.MaxDistance), FColor::Blue, false, 2.f); + + for (int Shots = 0; Shots < Settings.BulletCount; Shots++) + { + ShotVector = UKismetMathLibrary::RandomUnitVectorInConeInDegreesFromStream(SpreadStream, Settings.Direction, Settings.Spread); + EndLocation = Settings.Origin + (ShotVector * Settings.MaxDistance); + + const bool HasHit = GetWorld()->LineTraceSingleByChannel(OutHit, Settings.Origin, EndLocation, ECC_Camera); + DrawDebugLineTraceSingle(GetWorld(), Settings.Origin, EndLocation, EDrawDebugTrace::ForDuration, HasHit, OutHit, FColor::Green, FColor::Red, 2.f); + } } FVector ALMPlayer::GetWeaponFiringOrigin() const diff --git a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp index 1382d63..539b657 100644 --- a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp +++ b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp @@ -18,7 +18,7 @@ void ALMShotgun::PrimaryFire() if (!Player) return; - PlaySound(Data.FireSound); + PlaySound(FireSound); PlayAnimation(PrimaryFireAnimation); FVector Origin = Player->GetWeaponFiringOrigin(); diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp index 3c5e78b..a01d32b 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp @@ -68,7 +68,20 @@ void 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); - + if (AmmoData.Contains(AmmoType)) + { + AmmoData[AmmoType].AddAmmo(AmmoCount); + } + else + { + const FString Warning = FString::Printf(TEXT("Ammo type %i not found"), AmmoType); + GEngine->AddOnScreenDebugMessage(1, 2.f, FColor::Orange, Warning); + + FLMAmmoData Data = FLMAmmoData(); + Data.AmmoType = AmmoType; + Data.AmmoCount = AmmoCount; + AmmoData[AmmoType] = Data; + } } void ULMWeaponManager::Fire() From 6a82183c661881b2baff520f712204465c05c827 Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 22:11:27 +0100 Subject: [PATCH 16/30] Added revolver and basic reloading --- Content/Legumix/Player/Input/IA_Shoot.uasset | 4 +-- .../Legumix/Weapon/BP_WeaponManager.uasset | 4 +-- .../Weapon/Revolver/BP_Revolver.uasset | 3 ++ .../Legumix/Weapon/Shotgun/BP_Revolver.uasset | 3 -- .../Legumix/Weapon/Shotgun/BP_Shotgun.uasset | 4 +-- Source/LegumeMix/Private/Player/LMPlayer.cpp | 10 ++++++ .../LegumeMix/Private/Weapon/LMRevolver.cpp | 32 +++++++++++++++++++ Source/LegumeMix/Private/Weapon/LMShotgun.cpp | 5 --- .../LegumeMix/Private/Weapon/LMWeaponBase.cpp | 26 +++++++++++++-- .../Private/Weapon/LMWeaponManager.cpp | 32 +++++++++++++++++++ Source/LegumeMix/Public/Player/LMPlayer.h | 19 ++++++++++- Source/LegumeMix/Public/Weapon/LMRevolver.h | 17 ++++++++++ Source/LegumeMix/Public/Weapon/LMShotgun.h | 1 - Source/LegumeMix/Public/Weapon/LMWeaponBase.h | 9 ++++++ .../LegumeMix/Public/Weapon/LMWeaponManager.h | 4 +++ 15 files changed, 155 insertions(+), 18 deletions(-) create mode 100644 Content/Legumix/Weapon/Revolver/BP_Revolver.uasset delete mode 100644 Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset create mode 100644 Source/LegumeMix/Private/Weapon/LMRevolver.cpp create mode 100644 Source/LegumeMix/Public/Weapon/LMRevolver.h diff --git a/Content/Legumix/Player/Input/IA_Shoot.uasset b/Content/Legumix/Player/Input/IA_Shoot.uasset index 4e8c799..27c446c 100644 --- a/Content/Legumix/Player/Input/IA_Shoot.uasset +++ b/Content/Legumix/Player/Input/IA_Shoot.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:08c6295c098e9397372285219b1b5d37bc166e40d82eeeb81766dd85d10e91b9 -size 1387 +oid sha256:2d635494781c3c33aa1c50811caaa2351f6a6d4a0b9c8d469a37920cf4cb06c6 +size 1691 diff --git a/Content/Legumix/Weapon/BP_WeaponManager.uasset b/Content/Legumix/Weapon/BP_WeaponManager.uasset index ce38a6a..04a7c7f 100644 --- a/Content/Legumix/Weapon/BP_WeaponManager.uasset +++ b/Content/Legumix/Weapon/BP_WeaponManager.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cedb028e7e61821b30692bc77c901339b7ad8e14b2bfc4de63f2cb34dc7dff70 -size 7486 +oid sha256:1bf2c3d9729731e0e3308fc288e2bf8ba8fd42ec700c615bf431e2a6639c30f2 +size 7487 diff --git a/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset b/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset new file mode 100644 index 0000000..a856f7d --- /dev/null +++ b/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69747eb332341171ff918ae22f4ee76665b726d27b5bfb2526f8d85f4a5483dc +size 49460 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset b/Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset deleted file mode 100644 index b9b9428..0000000 --- a/Content/Legumix/Weapon/Shotgun/BP_Revolver.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3cf116185fa5ffa77f1c1b0bcd58ced74d48270ec611a0bdf2bbb9afc6c00f4c -size 32168 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset index 27db14c..f1cfe7d 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:df121a93495b25dedf1d472eb4ee1289ecccff9d1513776960ee6c6ba701bc5e -size 33696 +oid sha256:ba83cc1f0f293cb4f791e1beab4d509e65a0c141fd8fc799b3336202d1f35765 +size 55015 diff --git a/Source/LegumeMix/Private/Player/LMPlayer.cpp b/Source/LegumeMix/Private/Player/LMPlayer.cpp index 0526e8e..df6129a 100644 --- a/Source/LegumeMix/Private/Player/LMPlayer.cpp +++ b/Source/LegumeMix/Private/Player/LMPlayer.cpp @@ -42,6 +42,16 @@ void ALMPlayer::PickUpAmmo(ALMAmmo* Ammo) WeaponManager->AddAmmoType(Ammo->GetAmmoType(), Ammo->GetAmmoAmount()); } +int ALMPlayer::GetAmmoCount(const EAmmoType AmmoType) const +{ + return WeaponManager->GetAmmoCount(AmmoType); +} + +int ALMPlayer::RemoveAmmo(const EAmmoType AmmoType, const int Count) const +{ + return WeaponManager->RemoveAmmo(AmmoType, Count); +} + void ALMPlayer::SetWeaponManager(ULMWeaponManager* Manager) { UE_LOG(LogTemp, Warning, TEXT("Set weapon manager")) diff --git a/Source/LegumeMix/Private/Weapon/LMRevolver.cpp b/Source/LegumeMix/Private/Weapon/LMRevolver.cpp new file mode 100644 index 0000000..d5e9930 --- /dev/null +++ b/Source/LegumeMix/Private/Weapon/LMRevolver.cpp @@ -0,0 +1,32 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "Weapon/LMRevolver.h" + +#include "Player/LMBulletInfo.h" +#include "Player/LMPlayer.h" + + +ALMRevolver::ALMRevolver() +{ + PrimaryActorTick.bCanEverTick = true; +} + +void ALMRevolver::PrimaryFire() +{ + if (!Player) + return; + + PlaySound(FireSound); + PlayAnimation(PrimaryFireAnimation); + + const FVector Origin = Player->GetWeaponFiringOrigin(); + const FVector Direction = Player->GetAimVector(); + + ClipAmmo--; + + FLMBulletInfo ShotInfo = FLMBulletInfo(1, Origin, Direction, WeaponSpread, MaxDistance, DamageFalloff, AmmoType, Damage); + + Player->FireBullets(ShotInfo); +} + diff --git a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp index 539b657..d2023ab 100644 --- a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp +++ b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp @@ -31,8 +31,3 @@ void ALMShotgun::PrimaryFire() Player->FireBullets(ShotInfo); } -void ALMShotgun::Tick(float DeltaTime) -{ - Super::Tick(DeltaTime); -} - diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp index c0e78dd..7229ad0 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp @@ -42,6 +42,7 @@ void ALMWeaponBase::Setup(USkeletalMeshComponent* Mesh, AActor* CharOwner) void ALMWeaponBase::Reload() { + DefaultReload(); } void ALMWeaponBase::PrimaryFire() @@ -52,7 +53,7 @@ void ALMWeaponBase::PlaySound(USoundWave* Sound, const bool Replacing) { if (AudioComponent->IsPlaying() && !Replacing) return; - + AudioComponent->Stop(); AudioComponent->SetSound(Sound); AudioComponent->Play(); @@ -66,4 +67,25 @@ void ALMWeaponBase::PlayAnimation(UAnimMontage* Animation) { AnimInstance->Montage_Play(Animation); } -} \ No newline at end of file +} + +void ALMWeaponBase::DefaultReload() +{ + if (State != EWeaponState::EWS_Idle) + return; + + const int AmmoCount = Player->GetAmmoCount(AmmoType); + if (AmmoCount <= 0) + return; + + if (ClipAmmo >= MaxClip) + return; + + PlaySound(ReloadSound, true); + PlayAnimation(ReloadAnimation); + + State = EWeaponState::EWS_Reloading; + + // TODO: Use Animations + OnDefaultReload(); +} diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp index a01d32b..bc972f8 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp @@ -42,6 +42,30 @@ void ULMWeaponManager::SetupAmmoData() } } +int ULMWeaponManager::RemoveAmmo(const EAmmoType Ammo, const int Count) +{ + if (AmmoData.Contains(Ammo)) + { + FLMAmmoData &Data = AmmoData[Ammo]; + + int Difference = Data.AmmoCount - Count; + 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); + Data.AmmoCount = FMath::Clamp(Data.AmmoCount - Count, 0, Data.MaxAmmo); + 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) + return Count; + } + + return 0; +} + void ULMWeaponManager::Initialize(USkeletalMeshComponent* Mesh) { ArmsMesh = Mesh; @@ -84,6 +108,14 @@ void ULMWeaponManager::AddAmmoType(EAmmoType AmmoType, int AmmoCount) } } +int ULMWeaponManager::GetAmmoCount(const EAmmoType AmmoType) +{ + if (AmmoData.Contains(AmmoType)) + return AmmoData[AmmoType].AmmoCount; + + return 0; +} + void ULMWeaponManager::Fire() { ALMWeaponBase* Weapon = GetCurrentWeapon(); diff --git a/Source/LegumeMix/Public/Player/LMPlayer.h b/Source/LegumeMix/Public/Player/LMPlayer.h index 0b15b06..2c66c4a 100644 --- a/Source/LegumeMix/Public/Player/LMPlayer.h +++ b/Source/LegumeMix/Public/Player/LMPlayer.h @@ -24,9 +24,26 @@ public: virtual void Tick(float DeltaTime) override; virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; - UFUNCTION() + UFUNCTION(BlueprintCallable) void PickUpAmmo(ALMAmmo* Ammo); + /** + * Gets the number of ammo from the given type. + * @param AmmoType The ammo type to get. + * @return The amount of ammo from the given type. + */ + UFUNCTION(BlueprintCallable) + int GetAmmoCount(EAmmoType AmmoType) const; + + /** + * Removes a given amount of ammo from the type. + * @param AmmoType The type of ammo to remove. + * @param Count The amount of ammo to remove. + * @return The amount that was removed. + */ + UFUNCTION(BlueprintCallable) + int RemoveAmmo(EAmmoType AmmoType, int Count) const; + protected: // Called when the game starts or when spawned virtual void BeginPlay() override; diff --git a/Source/LegumeMix/Public/Weapon/LMRevolver.h b/Source/LegumeMix/Public/Weapon/LMRevolver.h new file mode 100644 index 0000000..17c1c87 --- /dev/null +++ b/Source/LegumeMix/Public/Weapon/LMRevolver.h @@ -0,0 +1,17 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "LMWeaponBase.h" +#include "LMRevolver.generated.h" + +UCLASS() +class LEGUMEMIX_API ALMRevolver : public ALMWeaponBase +{ + GENERATED_BODY() + +public: + ALMRevolver(); + virtual void PrimaryFire() override; +}; diff --git a/Source/LegumeMix/Public/Weapon/LMShotgun.h b/Source/LegumeMix/Public/Weapon/LMShotgun.h index b067ff1..7fca267 100644 --- a/Source/LegumeMix/Public/Weapon/LMShotgun.h +++ b/Source/LegumeMix/Public/Weapon/LMShotgun.h @@ -13,7 +13,6 @@ class LEGUMEMIX_API ALMShotgun : public ALMWeaponBase public: ALMShotgun(); - virtual void Tick(float DeltaTime) override; virtual void PrimaryFire() override; private: diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h index 6b4839c..4d1b0ca 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h @@ -39,12 +39,21 @@ public: */ UFUNCTION(BlueprintCallable) FName GetAttachmentSocketName() const { return WeaponSocket; } + + UFUNCTION(BlueprintCallable, BlueprintImplementableEvent) + void OnDefaultReload(); + +private: + void DefaultReload(); protected: /* Weapon Data */ /** The sound to play when firing. */ UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds") TObjectPtr FireSound; + UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds") + TObjectPtr ReloadSound; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Animations", meta=(AllowPrivateAccess=true)) TObjectPtr PrimaryFireAnimation; diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponManager.h b/Source/LegumeMix/Public/Weapon/LMWeaponManager.h index 411e287..57a0803 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponManager.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponManager.h @@ -33,6 +33,8 @@ public: UFUNCTION(BlueprintCallable, Category=Legumix) void AddAmmoType(EAmmoType AmmoType, int AmmoCount); + UFUNCTION(BlueprintCallable, Category=Legumix) + int GetAmmoCount(EAmmoType AmmoType); UFUNCTION(BlueprintCallable, Category=Legumix) void Fire(); @@ -45,6 +47,8 @@ public: UFUNCTION(BlueprintCallable, Category="Legumix|Ammo") void SetupAmmoData(); + UFUNCTION(BlueprintCallable, Category="Legumix|Ammo") + int RemoveAmmo(EAmmoType Ammo, int Count); protected: virtual void BeginPlay() override; From 4c6a3dd55897f1f71836ecba15c029e638aa17f9 Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 22:11:43 +0100 Subject: [PATCH 17/30] Added defaults values to bullet info --- Source/LegumeMix/Public/Player/LMBulletInfo.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/LegumeMix/Public/Player/LMBulletInfo.h b/Source/LegumeMix/Public/Player/LMBulletInfo.h index 0fe06af..740b9d8 100644 --- a/Source/LegumeMix/Public/Player/LMBulletInfo.h +++ b/Source/LegumeMix/Public/Player/LMBulletInfo.h @@ -9,33 +9,33 @@ struct FLMBulletInfo /** The number of bullets to fire. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - int BulletCount; + int BulletCount = 1; /** The bullets' origins. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - FVector Origin; + FVector Origin = FVector::ZeroVector; /** The main direction vector. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - FVector Direction; + FVector Direction = FVector::ForwardVector; /** The Random bullet spread angle deviation. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - float Spread; + float Spread = 0.0f; /** The maximum distance before the bullet reaches minimum damages. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - float MaxDistance; + float MaxDistance = 100000.f; /** A curve multiplicating the damage of a bullet depending on the distance of the target. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - FFloatCurve Falloff; + FFloatCurve Falloff = FFloatCurve(); /** The type of bullet that was fired. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - EAmmoType AmmoType; + EAmmoType AmmoType = EAmmoType::EAT_CornAmmo; /** The default amount of damage to apply per bullet. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - float Damage; + float Damage = 10.f; }; From c5d2d9da0dbd0214c8cfa57d70c0a1635d07877f Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 22:12:11 +0100 Subject: [PATCH 18/30] Updated editor default map --- Config/DefaultEngine.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index 666bf2f..ec234e9 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -1,8 +1,9 @@ [/Script/EngineSettings.GameMapsSettings] -GameDefaultMap=/Engine/Maps/Templates/OpenWorld.OpenWorld +GameDefaultMap=/Game/Legumix/Levels/LVL_GYM_00.LVL_GYM_00 GlobalDefaultGameMode=/Game/Legumix/BP_GameMode.BP_GameMode_C +EditorStartupMap=/Game/Legumix/Levels/LVL_GYM_00.LVL_GYM_00 [/Script/Engine.RendererSettings] r.AllowStaticLighting=False From 936a9bccd21e666df7c0b14625b087db744dae50 Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 22:17:10 +0100 Subject: [PATCH 19/30] Added audio feedback for firing and reloading --- Content/Legumix/Weapon/Revolver/BP_Revolver.uasset | 4 ++-- Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset | 4 ++-- Source/LegumeMix/Private/Weapon/LMRevolver.cpp | 2 +- Source/LegumeMix/Private/Weapon/LMShotgun.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset b/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset index a856f7d..a9d36cc 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:69747eb332341171ff918ae22f4ee76665b726d27b5bfb2526f8d85f4a5483dc -size 49460 +oid sha256:62824fbc3f01c94f8c4d9f211e9499dd567bb367783863d6e84cdbe6da9b44a6 +size 49926 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset index f1cfe7d..8f1267a 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:ba83cc1f0f293cb4f791e1beab4d509e65a0c141fd8fc799b3336202d1f35765 -size 55015 +oid sha256:842c4bb2d6150635ec1647ce09031f1c921049cf77863f0b1f32a4759f3179f8 +size 55475 diff --git a/Source/LegumeMix/Private/Weapon/LMRevolver.cpp b/Source/LegumeMix/Private/Weapon/LMRevolver.cpp index d5e9930..9e8027f 100644 --- a/Source/LegumeMix/Private/Weapon/LMRevolver.cpp +++ b/Source/LegumeMix/Private/Weapon/LMRevolver.cpp @@ -17,7 +17,7 @@ void ALMRevolver::PrimaryFire() if (!Player) return; - PlaySound(FireSound); + PlaySound(FireSound, true); PlayAnimation(PrimaryFireAnimation); const FVector Origin = Player->GetWeaponFiringOrigin(); diff --git a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp index d2023ab..85a9a6c 100644 --- a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp +++ b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp @@ -18,7 +18,7 @@ void ALMShotgun::PrimaryFire() if (!Player) return; - PlaySound(FireSound); + PlaySound(FireSound, true); PlayAnimation(PrimaryFireAnimation); FVector Origin = Player->GetWeaponFiringOrigin(); From 07c74862a7f660505969e2a9f0808b1d332e99a4 Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 22:36:46 +0100 Subject: [PATCH 20/30] Fixed a collision bug --- Content/Legumix/Player/BP_Play.uasset | 4 ++-- Content/Legumix/Weapon/Revolver/BP_Revolver.uasset | 4 ++-- Content/Legumix/Weapon/Revolver/Pistolet.uasset | 3 +++ .../Legumix/Weapon/Revolver/RevolverFirePlaceholder.uasset | 3 +++ .../Legumix/Weapon/Revolver/RevolverReloadPlaceholder.uasset | 3 +++ Content/Legumix/Weapon/Revolver/Revolvert.uasset | 3 +++ Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset | 4 ++-- Content/Legumix/Weapon/Shotgun/ShotgunFirePlaceholder.uasset | 3 +++ .../Legumix/Weapon/Shotgun/ShotgunReloadPlaceholder.uasset | 3 +++ 9 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 Content/Legumix/Weapon/Revolver/Pistolet.uasset create mode 100644 Content/Legumix/Weapon/Revolver/RevolverFirePlaceholder.uasset create mode 100644 Content/Legumix/Weapon/Revolver/RevolverReloadPlaceholder.uasset create mode 100644 Content/Legumix/Weapon/Revolver/Revolvert.uasset create mode 100644 Content/Legumix/Weapon/Shotgun/ShotgunFirePlaceholder.uasset create mode 100644 Content/Legumix/Weapon/Shotgun/ShotgunReloadPlaceholder.uasset diff --git a/Content/Legumix/Player/BP_Play.uasset b/Content/Legumix/Player/BP_Play.uasset index d907bc7..a198ef7 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:25d6d112aa65ffa05aee3109028ba543898d1a9acf24646f6d6171ce7ead5945 -size 50606 +oid sha256:1e990f41b910237aea5bde4dd90c55d7790be8cbcea811dd4a2a8411055b5122 +size 50822 diff --git a/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset b/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset index a9d36cc..da32f8b 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:62824fbc3f01c94f8c4d9f211e9499dd567bb367783863d6e84cdbe6da9b44a6 -size 49926 +oid sha256:b311039ec415fc1fed686dc4c322140bcb18698ee405d39a3b5fb704c56d8e29 +size 55276 diff --git a/Content/Legumix/Weapon/Revolver/Pistolet.uasset b/Content/Legumix/Weapon/Revolver/Pistolet.uasset new file mode 100644 index 0000000..5727954 --- /dev/null +++ b/Content/Legumix/Weapon/Revolver/Pistolet.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00e6e640c9e335790ce11331010db12e65d7c7e61b45f51791d935cea4a98b22 +size 54259 diff --git a/Content/Legumix/Weapon/Revolver/RevolverFirePlaceholder.uasset b/Content/Legumix/Weapon/Revolver/RevolverFirePlaceholder.uasset new file mode 100644 index 0000000..d329270 --- /dev/null +++ b/Content/Legumix/Weapon/Revolver/RevolverFirePlaceholder.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:036bca67064653a2b0513a2ee7dac5e62623db1515d6d9abc7ed4976e6c8db0d +size 101109 diff --git a/Content/Legumix/Weapon/Revolver/RevolverReloadPlaceholder.uasset b/Content/Legumix/Weapon/Revolver/RevolverReloadPlaceholder.uasset new file mode 100644 index 0000000..c31cfaa --- /dev/null +++ b/Content/Legumix/Weapon/Revolver/RevolverReloadPlaceholder.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57c7c63389c2e75f6c1a47c2a2bada37d1da349bb84537a83340554a95d3b587 +size 91266 diff --git a/Content/Legumix/Weapon/Revolver/Revolvert.uasset b/Content/Legumix/Weapon/Revolver/Revolvert.uasset new file mode 100644 index 0000000..f8e0b1d --- /dev/null +++ b/Content/Legumix/Weapon/Revolver/Revolvert.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4363b352eb4619c4e61ed3efa37855d0cd7a3b25b002bc3e564f27548d14afe +size 214063 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset index 8f1267a..7c15256 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:842c4bb2d6150635ec1647ce09031f1c921049cf77863f0b1f32a4759f3179f8 -size 55475 +oid sha256:80ddf98507ff92c02e8ddaecd3eb5a44005b52e1301b06bfb2c92c1c2cca28dd +size 57029 diff --git a/Content/Legumix/Weapon/Shotgun/ShotgunFirePlaceholder.uasset b/Content/Legumix/Weapon/Shotgun/ShotgunFirePlaceholder.uasset new file mode 100644 index 0000000..1a180f1 --- /dev/null +++ b/Content/Legumix/Weapon/Shotgun/ShotgunFirePlaceholder.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:006bd9a3cde010fb80632c6f7d2f376cbd0549a2e4d3cc5c47f07e5b53b84e61 +size 98953 diff --git a/Content/Legumix/Weapon/Shotgun/ShotgunReloadPlaceholder.uasset b/Content/Legumix/Weapon/Shotgun/ShotgunReloadPlaceholder.uasset new file mode 100644 index 0000000..6c6e9c4 --- /dev/null +++ b/Content/Legumix/Weapon/Shotgun/ShotgunReloadPlaceholder.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d970d50da167138ae50db286487da236f3f39591543997106ad35e203b955a12 +size 64615 From 452789d657a3fec8d5eb1e61f4036560b4613648 Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 23:41:11 +0100 Subject: [PATCH 21/30] Updated default munitions count --- Content/Legumix/Player/BP_Play.uasset | 4 ++-- Content/Legumix/Weapon/Ammo/DT_Munitions.uasset | 2 +- Content/Legumix/Weapon/BP_WeaponManager.uasset | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Content/Legumix/Player/BP_Play.uasset b/Content/Legumix/Player/BP_Play.uasset index a198ef7..7d17031 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:1e990f41b910237aea5bde4dd90c55d7790be8cbcea811dd4a2a8411055b5122 -size 50822 +oid sha256:117dcad18ae2b8db60ac853d81d9eb3b19cdb45994e1fa7691d9c3d26319a456 +size 51420 diff --git a/Content/Legumix/Weapon/Ammo/DT_Munitions.uasset b/Content/Legumix/Weapon/Ammo/DT_Munitions.uasset index e342489..4e1a0d1 100644 --- a/Content/Legumix/Weapon/Ammo/DT_Munitions.uasset +++ b/Content/Legumix/Weapon/Ammo/DT_Munitions.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f0458385ebf5c720d5e11d2a115c2dce6179e24c4250e87f2de95070c8159d8 +oid sha256:2b8a4e01b6a9b5e9ac6893103961ed7f3bfc48ffae60b90a24a5c98d21798a13 size 2597 diff --git a/Content/Legumix/Weapon/BP_WeaponManager.uasset b/Content/Legumix/Weapon/BP_WeaponManager.uasset index 04a7c7f..1766bc8 100644 --- a/Content/Legumix/Weapon/BP_WeaponManager.uasset +++ b/Content/Legumix/Weapon/BP_WeaponManager.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1bf2c3d9729731e0e3308fc288e2bf8ba8fd42ec700c615bf431e2a6639c30f2 +oid sha256:7d89abfa10726185ffc32e9647ed361ef386ffb4bee6fab3a5608f4333e6422d size 7487 From d12dbb7c821867750707a4178a2fede2c1d21a3d Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 23:41:37 +0100 Subject: [PATCH 22/30] Added weapon firing speed --- .../LegumeMix/Private/Weapon/LMRevolver.cpp | 14 +++++++++++ Source/LegumeMix/Private/Weapon/LMShotgun.cpp | 20 ++++++++++++--- .../LegumeMix/Private/Weapon/LMWeaponBase.cpp | 24 +++++++++++++----- .../Private/Weapon/LMWeaponManager.cpp | 8 ++++-- Source/LegumeMix/Public/Weapon/LMWeaponBase.h | 25 ++++++++++++++----- 5 files changed, 73 insertions(+), 18 deletions(-) diff --git a/Source/LegumeMix/Private/Weapon/LMRevolver.cpp b/Source/LegumeMix/Private/Weapon/LMRevolver.cpp index 9e8027f..f7d379a 100644 --- a/Source/LegumeMix/Private/Weapon/LMRevolver.cpp +++ b/Source/LegumeMix/Private/Weapon/LMRevolver.cpp @@ -16,7 +16,20 @@ void ALMRevolver::PrimaryFire() { if (!Player) return; + + State = EWeaponState::EWS_Firing; + if (ClipAmmo <= 0) + { + if (!Reload()) + { + PlaySound(DryFireSound, true); + GetWorldTimerManager().SetTimer(FireTimer, this, &ALMRevolver::AllowRefire, RefireDelay / 2); + } + return; + } + + PlaySound(FireSound, true); PlayAnimation(PrimaryFireAnimation); @@ -28,5 +41,6 @@ void ALMRevolver::PrimaryFire() FLMBulletInfo ShotInfo = FLMBulletInfo(1, Origin, Direction, WeaponSpread, MaxDistance, DamageFalloff, AmmoType, Damage); Player->FireBullets(ShotInfo); + GetWorldTimerManager().SetTimer(FireTimer, this, &ALMRevolver::AllowRefire, RefireDelay); } diff --git a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp index 85a9a6c..d6557ff 100644 --- a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp +++ b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp @@ -12,22 +12,34 @@ ALMShotgun::ALMShotgun() PrimaryActorTick.bCanEverTick = true; } - void ALMShotgun::PrimaryFire() { if (!Player) return; - + + State = EWeaponState::EWS_Firing; + + if (ClipAmmo <= 0) + { + if (!Reload()) + { + PlaySound(DryFireSound, true); + GetWorldTimerManager().SetTimer(FireTimer, this, &ALMShotgun::AllowRefire, RefireDelay / 2); + } + return; + } + PlaySound(FireSound, true); PlayAnimation(PrimaryFireAnimation); - FVector Origin = Player->GetWeaponFiringOrigin(); - FVector Direction = Player->GetAimVector(); + const FVector Origin = Player->GetWeaponFiringOrigin(); + const FVector Direction = Player->GetAimVector(); ClipAmmo--; FLMBulletInfo ShotInfo = FLMBulletInfo(PelletCount, Origin, Direction, WeaponSpread, MaxDistance, DamageFalloff, AmmoType, Damage); Player->FireBullets(ShotInfo); + GetWorldTimerManager().SetTimer(FireTimer, this, &ALMShotgun::AllowRefire, RefireDelay); } diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp index 7229ad0..f07d3ef 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp @@ -40,9 +40,9 @@ void ALMWeaponBase::Setup(USkeletalMeshComponent* Mesh, AActor* CharOwner) Player = Cast(CharOwner); } -void ALMWeaponBase::Reload() +bool ALMWeaponBase::Reload() { - DefaultReload(); + return DefaultReload(); } void ALMWeaponBase::PrimaryFire() @@ -69,17 +69,17 @@ void ALMWeaponBase::PlayAnimation(UAnimMontage* Animation) } } -void ALMWeaponBase::DefaultReload() +bool ALMWeaponBase::DefaultReload() { if (State != EWeaponState::EWS_Idle) - return; + return false; const int AmmoCount = Player->GetAmmoCount(AmmoType); if (AmmoCount <= 0) - return; + return false; if (ClipAmmo >= MaxClip) - return; + return false; PlaySound(ReloadSound, true); PlayAnimation(ReloadAnimation); @@ -88,4 +88,16 @@ void ALMWeaponBase::DefaultReload() // TODO: Use Animations OnDefaultReload(); + return true; +} + +void ALMWeaponBase::AllowRefire() +{ + GetWorldTimerManager().ClearTimer(FireTimer); + State = EWeaponState::EWS_Idle; + + if (ClipAmmo <= 0) + { + Reload(); + } } diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp index bc972f8..20e6b96 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp @@ -119,7 +119,9 @@ int ULMWeaponManager::GetAmmoCount(const EAmmoType AmmoType) void ULMWeaponManager::Fire() { ALMWeaponBase* Weapon = GetCurrentWeapon(); - Weapon->PrimaryFire(); + + if (Weapon->State == EWeaponState::EWS_Idle) + Weapon->PrimaryFire(); } void ULMWeaponManager::Reload() @@ -127,7 +129,9 @@ void ULMWeaponManager::Reload() GEngine->AddOnScreenDebugMessage(3, 1.f, FColor::Cyan, "Reloading"); ALMWeaponBase* Weapon = GetCurrentWeapon(); - Weapon->Reload(); + + if (Weapon->State == EWeaponState::EWS_Idle) + Weapon->Reload(); } void ULMWeaponManager::SwitchWeapon(const int Direction) diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h index 4d1b0ca..ca0da1e 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h @@ -23,7 +23,7 @@ public: public: UFUNCTION(BlueprintCallable) - virtual void Reload(); + virtual bool Reload(); UFUNCTION(BlueprintCallable) virtual void PrimaryFire(); @@ -43,16 +43,29 @@ public: UFUNCTION(BlueprintCallable, BlueprintImplementableEvent) void OnDefaultReload(); +protected: + void AllowRefire(); + private: - void DefaultReload(); + bool DefaultReload(); +public: + /** The current state of the weapon. */ + UPROPERTY(VisibleInstanceOnly, BlueprintReadWrite, Category="Legumix|Weapon") + EWeaponState State; + protected: /* Weapon Data */ + FTimerHandle FireTimer; + /** The sound to play when firing. */ UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds") TObjectPtr FireSound; UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds") TObjectPtr ReloadSound; + + UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds") + TObjectPtr DryFireSound; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Animations", meta=(AllowPrivateAccess=true)) TObjectPtr PrimaryFireAnimation; @@ -60,6 +73,10 @@ protected: /* Weapon Data */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Legumix|Animations", meta=(AllowPrivateAccess=true)) TObjectPtr ReloadAnimation; + /** The number of seconds before being able to fire again. */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) + float RefireDelay = 0.5f; + /** The flat damage number of one bullet. */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) float Damage = 10.f; @@ -90,10 +107,6 @@ protected: /* Weapon Data */ UPROPERTY(VisibleInstanceOnly, BlueprintReadWrite, Category=Legumix) TObjectPtr Player; - - /** The current state of the weapon. */ - UPROPERTY(VisibleInstanceOnly, BlueprintReadWrite, Category="Legumix|Weapon") - EWeaponState State; private: /** An optional socket to attach the weapon to. */ From 954ae7c36d5becd22f423889643d1eae42d2f034 Mon Sep 17 00:00:00 2001 From: TjgL Date: Thu, 23 Jan 2025 23:46:59 +0100 Subject: [PATCH 23/30] Implemented weapon switch feedback --- Content/Legumix/Weapon/Revolver/BP_Revolver.uasset | 4 ++-- Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset | 4 ++-- Content/Legumix/Weapon/WeaponSwitchPlaceholder.uasset | 3 +++ Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp | 5 +++++ Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp | 2 ++ Source/LegumeMix/Public/Weapon/LMWeaponBase.h | 9 ++++++++- 6 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 Content/Legumix/Weapon/WeaponSwitchPlaceholder.uasset diff --git a/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset b/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset index da32f8b..dbf1b72 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:b311039ec415fc1fed686dc4c322140bcb18698ee405d39a3b5fb704c56d8e29 -size 55276 +oid sha256:ac50c4513c07edf8b9f7490a085727d27d29c53d4323b87db88e256d5f8a5b07 +size 55477 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset index 7c15256..3c4b2bf 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:80ddf98507ff92c02e8ddaecd3eb5a44005b52e1301b06bfb2c92c1c2cca28dd -size 57029 +oid sha256:045c438a124e16846c0ae55f93855b2a95e60a7f571cb45ebcd92f266e951ba4 +size 57491 diff --git a/Content/Legumix/Weapon/WeaponSwitchPlaceholder.uasset b/Content/Legumix/Weapon/WeaponSwitchPlaceholder.uasset new file mode 100644 index 0000000..bf4e006 --- /dev/null +++ b/Content/Legumix/Weapon/WeaponSwitchPlaceholder.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2a914a72c13cdfbf14e2b9c847c35fcf8e066559637c2702d4d8c275556fe51 +size 87809 diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp index f07d3ef..cb68920 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp @@ -40,6 +40,11 @@ void ALMWeaponBase::Setup(USkeletalMeshComponent* Mesh, AActor* CharOwner) Player = Cast(CharOwner); } +void ALMWeaponBase::OnEquip_Implementation() +{ + PlaySound(EquipSound); +} + bool ALMWeaponBase::Reload() { return DefaultReload(); diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp index 20e6b96..cdb6c95 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp @@ -161,5 +161,7 @@ void ULMWeaponManager::SetWeapon(const int Index) GetCurrentWeapon()->SetActorHiddenInGame(true); CurrentWeaponIndex = Index; GetCurrentWeapon()->SetActorHiddenInGame(false); + + GetCurrentWeapon()->OnEquip(); } diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h index ca0da1e..c363662 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h @@ -20,8 +20,12 @@ public: ALMWeaponBase(); virtual void BeginPlay() override; void Setup(USkeletalMeshComponent* Mesh, AActor* CharOwner); - + public: + UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category=Legumix) + void OnEquip(); + virtual void OnEquip_Implementation(); + UFUNCTION(BlueprintCallable) virtual bool Reload(); @@ -66,6 +70,9 @@ protected: /* Weapon Data */ UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds") TObjectPtr DryFireSound; + + UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds") + TObjectPtr EquipSound; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Animations", meta=(AllowPrivateAccess=true)) TObjectPtr PrimaryFireAnimation; From 8a385a3f868df574948c6f2a0305f4bbe06b8d24 Mon Sep 17 00:00:00 2001 From: TjgL Date: Fri, 24 Jan 2025 11:39:23 +0100 Subject: [PATCH 24/30] Added timer for reload --- Content/Legumix/Weapon/Revolver/BP_Revolver.uasset | 4 ++-- Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset | 4 ++-- Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp | 9 ++++++++- Source/LegumeMix/Public/Weapon/LMWeaponBase.h | 7 ++++++- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset b/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset index dbf1b72..f5d620a 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:ac50c4513c07edf8b9f7490a085727d27d29c53d4323b87db88e256d5f8a5b07 -size 55477 +oid sha256:7a321d23370f221f76b28bcef172d19c5603474297e34f79f13623e4717b9fff +size 52111 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset index 3c4b2bf..7d43b52 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:045c438a124e16846c0ae55f93855b2a95e60a7f571cb45ebcd92f266e951ba4 -size 57491 +oid sha256:3536f68d8d3feb88b85e0ae67de885430d07f6d5ea1bdd7cafb0aa37a3194acd +size 53921 diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp index cb68920..9b83164 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponBase.cpp @@ -93,12 +93,19 @@ bool ALMWeaponBase::DefaultReload() // TODO: Use Animations OnDefaultReload(); + GetWorldTimerManager().SetTimer(ReloadTimer, this, &ALMWeaponBase::AllowRefire, ReloadDelay); + return true; } void ALMWeaponBase::AllowRefire() { - GetWorldTimerManager().ClearTimer(FireTimer); + // TODO : improve this + if (FireTimer.IsValid()) + GetWorldTimerManager().ClearTimer(FireTimer); + else if (ReloadTimer.IsValid()) + GetWorldTimerManager().ClearTimer(ReloadTimer); + State = EWeaponState::EWS_Idle; if (ClipAmmo <= 0) diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h index c363662..7cad860 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h @@ -48,6 +48,7 @@ public: void OnDefaultReload(); protected: + UFUNCTION(BlueprintCallable) void AllowRefire(); private: @@ -57,9 +58,10 @@ public: /** The current state of the weapon. */ UPROPERTY(VisibleInstanceOnly, BlueprintReadWrite, Category="Legumix|Weapon") EWeaponState State; - + protected: /* Weapon Data */ FTimerHandle FireTimer; + FTimerHandle ReloadTimer; /** The sound to play when firing. */ UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds") @@ -84,6 +86,9 @@ protected: /* Weapon Data */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) float RefireDelay = 0.5f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) + float ReloadDelay = 0.5f; + /** The flat damage number of one bullet. */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) float Damage = 10.f; From 6ae7c330e59dc00915e9f5cec9160eeff1b7c67f Mon Sep 17 00:00:00 2001 From: Antoine Caru Date: Fri, 24 Jan 2025 12:33:02 +0100 Subject: [PATCH 25/30] Resized Container zone, added some crates and added cover zone --- Content/Legumix/Levels/Assets/Carott_Container.uasset | 4 ++-- .../Legumix/Levels/Assets/Container/Carott_Container.uasset | 3 +++ .../Legumix/Levels/Assets/Container/Container_Green.uasset | 3 +++ .../Legumix/Levels/Assets/Container/Container_Green2.uasset | 3 +++ Content/Legumix/Levels/Assets/Container/Container_Grey.uasset | 3 +++ .../Legumix/Levels/Assets/Container/Container_Light.uasset | 3 +++ .../Legumix/Levels/Assets/Container/Container_Magenta.uasset | 3 +++ .../Legumix/Levels/Assets/Container/Container_Orange.uasset | 3 +++ .../Legumix/Levels/Assets/Container/Container_White.uasset | 3 +++ .../Legumix/Levels/Assets/Container/Container_Yellow.uasset | 3 +++ Content/Legumix/Levels/Assets/Container/Corn_Container.uasset | 3 +++ .../Legumix/Levels/Assets/Container/Radish_Container.uasset | 3 +++ .../Legumix/Levels/Assets/Container/Salad_Container.uasset | 3 +++ Content/Legumix/Levels/Assets/Container_Green.uasset | 3 --- Content/Legumix/Levels/Assets/Container_Green2.uasset | 3 --- Content/Legumix/Levels/Assets/Container_Grey.uasset | 3 --- Content/Legumix/Levels/Assets/Container_Light.uasset | 3 --- Content/Legumix/Levels/Assets/Container_Magenta.uasset | 3 --- Content/Legumix/Levels/Assets/Container_Orange.uasset | 3 --- Content/Legumix/Levels/Assets/Container_White.uasset | 3 --- Content/Legumix/Levels/Assets/Radish_Container.uasset | 4 ++-- Content/Legumix/Levels/LVL_GYM_00.umap | 4 ++-- .../_GENERATED/Antoine/CubeGridToolOutput_16725CDB.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_16A9CB10.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_1F8A3999.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_2FFAD046.uasset | 4 ++-- .../_GENERATED/Antoine/CubeGridToolOutput_372876E4.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_3808D550.uasset | 4 ++-- .../_GENERATED/Antoine/CubeGridToolOutput_3F40FE5B.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_5C8D6B0A.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_8028E7A7.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_8893C126.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_E3DAEC0B.uasset | 4 ++-- .../_GENERATED/Antoine/CubeGridToolOutput_EDBDD289.uasset | 3 +++ .../_GENERATED/Antoine/CubeGridToolOutput_F8C43B3B.uasset | 3 +++ 35 files changed, 78 insertions(+), 33 deletions(-) create mode 100644 Content/Legumix/Levels/Assets/Container/Carott_Container.uasset create mode 100644 Content/Legumix/Levels/Assets/Container/Container_Green.uasset create mode 100644 Content/Legumix/Levels/Assets/Container/Container_Green2.uasset create mode 100644 Content/Legumix/Levels/Assets/Container/Container_Grey.uasset create mode 100644 Content/Legumix/Levels/Assets/Container/Container_Light.uasset create mode 100644 Content/Legumix/Levels/Assets/Container/Container_Magenta.uasset create mode 100644 Content/Legumix/Levels/Assets/Container/Container_Orange.uasset create mode 100644 Content/Legumix/Levels/Assets/Container/Container_White.uasset create mode 100644 Content/Legumix/Levels/Assets/Container/Container_Yellow.uasset create mode 100644 Content/Legumix/Levels/Assets/Container/Corn_Container.uasset create mode 100644 Content/Legumix/Levels/Assets/Container/Radish_Container.uasset create mode 100644 Content/Legumix/Levels/Assets/Container/Salad_Container.uasset delete mode 100644 Content/Legumix/Levels/Assets/Container_Green.uasset delete mode 100644 Content/Legumix/Levels/Assets/Container_Green2.uasset delete mode 100644 Content/Legumix/Levels/Assets/Container_Grey.uasset delete mode 100644 Content/Legumix/Levels/Assets/Container_Light.uasset delete mode 100644 Content/Legumix/Levels/Assets/Container_Magenta.uasset delete mode 100644 Content/Legumix/Levels/Assets/Container_Orange.uasset delete mode 100644 Content/Legumix/Levels/Assets/Container_White.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_16725CDB.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_16A9CB10.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_1F8A3999.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_372876E4.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_3F40FE5B.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_5C8D6B0A.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_8028E7A7.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_8893C126.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_EDBDD289.uasset create mode 100644 Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_F8C43B3B.uasset diff --git a/Content/Legumix/Levels/Assets/Carott_Container.uasset b/Content/Legumix/Levels/Assets/Carott_Container.uasset index ccd080e..18b358b 100644 --- a/Content/Legumix/Levels/Assets/Carott_Container.uasset +++ b/Content/Legumix/Levels/Assets/Carott_Container.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:69e29b2095c81be7f0d55dc9dc852446565cf98c1c173ab705a5b7b854a9a137 -size 163896 +oid sha256:4e5586b63a35ff75b6342089b8af7197a21b3ecae4af87a32643901c6c1558cf +size 1579 diff --git a/Content/Legumix/Levels/Assets/Container/Carott_Container.uasset b/Content/Legumix/Levels/Assets/Container/Carott_Container.uasset new file mode 100644 index 0000000..836de6b --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container/Carott_Container.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8768c610b6f694643cd08c1f49a10bf1108083f5f3f0a073e72d2760a95f7a6a +size 164965 diff --git a/Content/Legumix/Levels/Assets/Container/Container_Green.uasset b/Content/Legumix/Levels/Assets/Container/Container_Green.uasset new file mode 100644 index 0000000..5fc3a89 --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container/Container_Green.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:189e93c0a5464662c970e52ba4af9f43bbff5a432ca0744a9b73b9335986b0fb +size 53114 diff --git a/Content/Legumix/Levels/Assets/Container/Container_Green2.uasset b/Content/Legumix/Levels/Assets/Container/Container_Green2.uasset new file mode 100644 index 0000000..8a41c53 --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container/Container_Green2.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f3bee80fb70403774274243de1ee555740950a0f9b81a429ed7e3d63b1dbc3d +size 55534 diff --git a/Content/Legumix/Levels/Assets/Container/Container_Grey.uasset b/Content/Legumix/Levels/Assets/Container/Container_Grey.uasset new file mode 100644 index 0000000..c07bb2c --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container/Container_Grey.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38369f6598870bd69d71f08f6f680306afd4e243e5fc009c88f596b8bcd00b67 +size 55519 diff --git a/Content/Legumix/Levels/Assets/Container/Container_Light.uasset b/Content/Legumix/Levels/Assets/Container/Container_Light.uasset new file mode 100644 index 0000000..f44a1f8 --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container/Container_Light.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:154fdd56c98f248d034ca85fe2d20e46c806c349cc7e60856852e910f3bb30d7 +size 53533 diff --git a/Content/Legumix/Levels/Assets/Container/Container_Magenta.uasset b/Content/Legumix/Levels/Assets/Container/Container_Magenta.uasset new file mode 100644 index 0000000..96ad7a3 --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container/Container_Magenta.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac4fdf02b952938a96900e646477001e768c990f6a3f6590c850565352358a25 +size 55425 diff --git a/Content/Legumix/Levels/Assets/Container/Container_Orange.uasset b/Content/Legumix/Levels/Assets/Container/Container_Orange.uasset new file mode 100644 index 0000000..2a95c87 --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container/Container_Orange.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:076d52e756b0296c75ce246a98d5003a4b53194bf8e9f0d953433cfc54df60e0 +size 53104 diff --git a/Content/Legumix/Levels/Assets/Container/Container_White.uasset b/Content/Legumix/Levels/Assets/Container/Container_White.uasset new file mode 100644 index 0000000..305126b --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container/Container_White.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3d50722cba165a526d23988194d679e30dbbc4b1bd2601570181fa10f0e0245 +size 53012 diff --git a/Content/Legumix/Levels/Assets/Container/Container_Yellow.uasset b/Content/Legumix/Levels/Assets/Container/Container_Yellow.uasset new file mode 100644 index 0000000..f501bf7 --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container/Container_Yellow.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d801b18d66e6f848560d4438a2e551aa73624a6106bf478dc7efe724c374fb63 +size 55760 diff --git a/Content/Legumix/Levels/Assets/Container/Corn_Container.uasset b/Content/Legumix/Levels/Assets/Container/Corn_Container.uasset new file mode 100644 index 0000000..fd0657d --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container/Corn_Container.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:470c5f8197437f3b77fa5322c51af8dc262b5beb3b1b3a922ef5575bce7f2e93 +size 164836 diff --git a/Content/Legumix/Levels/Assets/Container/Radish_Container.uasset b/Content/Legumix/Levels/Assets/Container/Radish_Container.uasset new file mode 100644 index 0000000..579191e --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container/Radish_Container.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:590a58639e66fc7e37c670a84e27cac49f225aefa908e012fe47bc0b8bd05f5f +size 164986 diff --git a/Content/Legumix/Levels/Assets/Container/Salad_Container.uasset b/Content/Legumix/Levels/Assets/Container/Salad_Container.uasset new file mode 100644 index 0000000..6b09753 --- /dev/null +++ b/Content/Legumix/Levels/Assets/Container/Salad_Container.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94ca7830c1e9759a7e78e43a93f549d27ed14478c3d063b412d7bfd9a3e3d491 +size 164808 diff --git a/Content/Legumix/Levels/Assets/Container_Green.uasset b/Content/Legumix/Levels/Assets/Container_Green.uasset deleted file mode 100644 index 1696a00..0000000 --- a/Content/Legumix/Levels/Assets/Container_Green.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0f9e9dc6e47539df3360077dcff2c8dd8f8d5a9136e454ccccdf6fe720044088 -size 53094 diff --git a/Content/Legumix/Levels/Assets/Container_Green2.uasset b/Content/Legumix/Levels/Assets/Container_Green2.uasset deleted file mode 100644 index c410eec..0000000 --- a/Content/Legumix/Levels/Assets/Container_Green2.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b0ca8df086c059b8fac25d7af4a56b7f102f9b42b38b010054e817a8113063e -size 55514 diff --git a/Content/Legumix/Levels/Assets/Container_Grey.uasset b/Content/Legumix/Levels/Assets/Container_Grey.uasset deleted file mode 100644 index 13879bd..0000000 --- a/Content/Legumix/Levels/Assets/Container_Grey.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:63671e34f689549c0c82d51165ff6c55efb5fc010a98990c5203a46a05ec25e1 -size 55499 diff --git a/Content/Legumix/Levels/Assets/Container_Light.uasset b/Content/Legumix/Levels/Assets/Container_Light.uasset deleted file mode 100644 index 61b27d7..0000000 --- a/Content/Legumix/Levels/Assets/Container_Light.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:539406f14540c070e70002505cef3dd07c1954287196e16f827933089fd07d15 -size 53513 diff --git a/Content/Legumix/Levels/Assets/Container_Magenta.uasset b/Content/Legumix/Levels/Assets/Container_Magenta.uasset deleted file mode 100644 index a173b0a..0000000 --- a/Content/Legumix/Levels/Assets/Container_Magenta.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2e6805930594c78479153fb6e4bcf17485c2bc6cd1ce1377ba56a8606e612713 -size 55405 diff --git a/Content/Legumix/Levels/Assets/Container_Orange.uasset b/Content/Legumix/Levels/Assets/Container_Orange.uasset deleted file mode 100644 index 78e4a47..0000000 --- a/Content/Legumix/Levels/Assets/Container_Orange.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ffa9092b5e7780e4cb7690de20f5b0e0f37251d71bc379424f775e14656b0cad -size 53084 diff --git a/Content/Legumix/Levels/Assets/Container_White.uasset b/Content/Legumix/Levels/Assets/Container_White.uasset deleted file mode 100644 index c67a70f..0000000 --- a/Content/Legumix/Levels/Assets/Container_White.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c12bbd4048779b5415c1f1534d6fb4d1ae4b6058cddfdd168fb68efd93bbf2ea -size 52992 diff --git a/Content/Legumix/Levels/Assets/Radish_Container.uasset b/Content/Legumix/Levels/Assets/Radish_Container.uasset index f1a222d..ac7e186 100644 --- a/Content/Legumix/Levels/Assets/Radish_Container.uasset +++ b/Content/Legumix/Levels/Assets/Radish_Container.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8554754f7d814355ab7a2495d5f0e5b80279f7062a5f4e27e04374eaa1722e8a -size 164916 +oid sha256:8dc0c91a01e026189b2e0e0e3001a503b13e9bd7bdaf73257ffb26954f234bca +size 1579 diff --git a/Content/Legumix/Levels/LVL_GYM_00.umap b/Content/Legumix/Levels/LVL_GYM_00.umap index 7621f41..e104dc7 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:8288a99dc21633f43618636963c724f8c6805d0fea1e2ede73366bb31308aa3f -size 337073 +oid sha256:58e1830d8daaecddb4f46fee63b40c87f48829325b93cad9cf28d1439c9905be +size 409777 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_16725CDB.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_16725CDB.uasset new file mode 100644 index 0000000..b65bad6 --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_16725CDB.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14506f34496fc568fd441938d03b92a79809cefca7f26008741c07b2980b09cc +size 19473 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_16A9CB10.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_16A9CB10.uasset new file mode 100644 index 0000000..468c498 --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_16A9CB10.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cfc69c601e0c0412a487463def5347751e2d28ba9ca1f7eca6eb296ce3f781b +size 16564 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_1F8A3999.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_1F8A3999.uasset new file mode 100644 index 0000000..108c4a1 --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_1F8A3999.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef826c3e06a95c0e58caa1b3f3a602a932961fa24fd127a0cf7ea64e960259ba +size 15685 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_2FFAD046.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_2FFAD046.uasset index 9915e74..3bac7ef 100644 --- a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_2FFAD046.uasset +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_2FFAD046.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8323ed2fbf1d24b5412e85e03208b170656be152e651195fe6f8fe250ce205e -size 165425 +oid sha256:7c0e8a633876ce8c43b74f3aa113cd1a442d54063af5cdf95a6f739d276876da +size 159995 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_372876E4.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_372876E4.uasset new file mode 100644 index 0000000..651d206 --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_372876E4.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec3bb230aa733590043fd22052fdaaf8af9a965b4f1443824514528e039df0cd +size 39747 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_3808D550.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_3808D550.uasset index 14c22b4..8a94478 100644 --- a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_3808D550.uasset +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_3808D550.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da32dab9bb6be40499838244103eb93abe01520e3583b5a38df1929da391c996 -size 34513 +oid sha256:f379844739a17589bdaa48ccbad9506f721fa24b743d3875480a8fd9a301869c +size 37553 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_3F40FE5B.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_3F40FE5B.uasset new file mode 100644 index 0000000..050010b --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_3F40FE5B.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61cf6240ca26ac9a11b5e456c419003943d2a6e2e36acda726bac2b092acb5e9 +size 19617 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_5C8D6B0A.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_5C8D6B0A.uasset new file mode 100644 index 0000000..f5d6aaa --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_5C8D6B0A.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21b04cd8948ebf436e29df61e60cdd593c6358febb965c33afd4e13fe0c8b85a +size 19867 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_8028E7A7.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_8028E7A7.uasset new file mode 100644 index 0000000..624c074 --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_8028E7A7.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a7c1512722314dea9a887ef08e46d9436af781b0355b2a1d908c6899c06e54d +size 15316 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_8893C126.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_8893C126.uasset new file mode 100644 index 0000000..7457a71 --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_8893C126.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37127da5d4340947da9429ac0fb423cfbb4036301c0c93a1f64b1e52bbdef5ce +size 30483 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_E3DAEC0B.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_E3DAEC0B.uasset index 954ecbd..ab177a5 100644 --- a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_E3DAEC0B.uasset +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_E3DAEC0B.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b9030332ae885ae776fa37c6cc5c0267ff6a26965c206c2d184e295a1859796a -size 16899 +oid sha256:21ae4cfbe535e745a449fc7d25c9175f176841a1f9ff593d2f19ef144bcca41a +size 17245 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_EDBDD289.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_EDBDD289.uasset new file mode 100644 index 0000000..9a3bb5a --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_EDBDD289.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00b5a607522419009a09c3685c63bcb70d00f8721d84171d22bc5fd3003199cf +size 15205 diff --git a/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_F8C43B3B.uasset b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_F8C43B3B.uasset new file mode 100644 index 0000000..cfb8c32 --- /dev/null +++ b/Content/Legumix/Levels/_GENERATED/Antoine/CubeGridToolOutput_F8C43B3B.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8891fe96c86766d3e877843de5167b91a4d216b70a42ba0b42a54525d684e6b +size 19166 From 879fb83f0eea2dd43ab126e31bcdc37854a8fd69 Mon Sep 17 00:00:00 2001 From: TjgL Date: Fri, 24 Jan 2025 13:55:58 +0100 Subject: [PATCH 26/30] Implemented hitboxes and health system for ennemies --- .../Private/Player/LMHealthComponent.cpp | 62 +++++++++++ Source/LegumeMix/Private/Player/LMHitBox.cpp | 38 +++++++ Source/LegumeMix/Private/Player/LMPlayer.cpp | 14 +++ .../Public/Player/LMHealthComponent.h | 103 ++++++++++++++++++ Source/LegumeMix/Public/Player/LMHitBox.h | 46 ++++++++ 5 files changed, 263 insertions(+) create mode 100644 Source/LegumeMix/Private/Player/LMHealthComponent.cpp create mode 100644 Source/LegumeMix/Private/Player/LMHitBox.cpp create mode 100644 Source/LegumeMix/Public/Player/LMHealthComponent.h create mode 100644 Source/LegumeMix/Public/Player/LMHitBox.h diff --git a/Source/LegumeMix/Private/Player/LMHealthComponent.cpp b/Source/LegumeMix/Private/Player/LMHealthComponent.cpp new file mode 100644 index 0000000..8be1033 --- /dev/null +++ b/Source/LegumeMix/Private/Player/LMHealthComponent.cpp @@ -0,0 +1,62 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "Player/LMHealthComponent.h" + +#include "Player/LMHitBox.h" + + +ULMHealthComponent::ULMHealthComponent() +{ + PrimaryComponentTick.bCanEverTick = true; +} + +void ULMHealthComponent::BeginPlay() +{ + Super::BeginPlay(); + + if (bMaxHealthOnStart) + Health = MaxHealth; + + RegisterHitBoxes(); +} + +void ULMHealthComponent::RegisterHitBoxes() +{ + GetOwner()->GetComponents(HitBoxes); + for (const auto HitBox : HitBoxes) + { + HitBox->OnHitBoxHit.AddUniqueDynamic(this, &ULMHealthComponent::HitBoxHit); + } +} + +void ULMHealthComponent::TakeDamage_Implementation(const float Damage) +{ + if (Damage <= 0.0f) + return; + + OnHit(Damage); + OnHealthChanged.Broadcast(Health, Damage); + + if (Health <= 0.0f) + Kill(); +} + +void ULMHealthComponent::OnHit_Implementation(const float Damage) +{ + Health = FMath::Clamp(Health - Damage, 0.0f, MaxHealth); +} + + +void ULMHealthComponent::Kill() +{ + OnKill(); + OnDeath.Broadcast(); +} + +void ULMHealthComponent::HitBoxHit(ULMHitBox* HitBox, float Damage) +{ + TakeDamage(Damage); +} + + diff --git a/Source/LegumeMix/Private/Player/LMHitBox.cpp b/Source/LegumeMix/Private/Player/LMHitBox.cpp new file mode 100644 index 0000000..ec2603a --- /dev/null +++ b/Source/LegumeMix/Private/Player/LMHitBox.cpp @@ -0,0 +1,38 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "Player/LMHitBox.h" + +#include "Player/LMBulletInfo.h" + + +ULMHitBox::ULMHitBox() +{ + PrimaryComponentTick.bCanEverTick = true; +} + +void ULMHitBox::OnHit(const FLMBulletInfo& BulletInfo) +{ + 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); +} + +float ULMHitBox::CalculateDamage_Implementation(const float Damage, const float Distance, UCurveFloat* Falloff, const float MaxDistance) +{ + const float Absorption = Damage - FlatDamageAbsorption; + const float FalloffModifier = Falloff->GetFloatValue(Distance / MaxDistance); + UE_LOG(LogTemp, Display, TEXT("Falloff : %f"), FalloffModifier); + + const float FalloffDamage = Absorption * FalloffModifier; + UE_LOG(LogTemp, Display, TEXT("Damage With Fallof: %f"), FalloffDamage) + + const float FinalDamage = FalloffDamage * DamageModifier; + 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 df6129a..84e12a7 100644 --- a/Source/LegumeMix/Private/Player/LMPlayer.cpp +++ b/Source/LegumeMix/Private/Player/LMPlayer.cpp @@ -7,6 +7,7 @@ #include "Camera/CameraComponent.h" #include "Ammo/LMAmmo.h" #include "Player/LMBulletInfo.h" +#include "Player/LMHitBox.h" #include "Weapon/LMWeaponManager.h" ALMPlayer::ALMPlayer() @@ -84,6 +85,19 @@ void ALMPlayer::FireBullets(const FLMBulletInfo Settings) const bool HasHit = GetWorld()->LineTraceSingleByChannel(OutHit, Settings.Origin, EndLocation, ECC_Camera); DrawDebugLineTraceSingle(GetWorld(), Settings.Origin, EndLocation, EDrawDebugTrace::ForDuration, HasHit, OutHit, FColor::Green, FColor::Red, 2.f); + + if (!HasHit) + continue; + + FString Hit = FString::Printf(TEXT("Hit %s"), *OutHit.Component->GetName()); + // GEngine->AddOnScreenDebugMessage(INDEX_NONE, 2.f, FColor::Red, Hit); + UE_LOG(LogTemp, Display, TEXT("%s"), *Hit); + + if (ULMHitBox* HitBox = Cast(OutHit.Component)) + { + UE_LOG(LogTemp, Warning, TEXT("Hit Hitbox")); + HitBox->OnHit(Settings); + } } } diff --git a/Source/LegumeMix/Public/Player/LMHealthComponent.h b/Source/LegumeMix/Public/Player/LMHealthComponent.h new file mode 100644 index 0000000..cb9a577 --- /dev/null +++ b/Source/LegumeMix/Public/Player/LMHealthComponent.h @@ -0,0 +1,103 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Components/ActorComponent.h" +#include "LMHealthComponent.generated.h" + + +class ULMHitBox; + +UCLASS(Blueprintable, ClassGroup=(Legumix), meta=(BlueprintSpawnableComponent)) +class LEGUMEMIX_API ULMHealthComponent : public UActorComponent +{ + GENERATED_BODY() + + DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnHealthChangedSignature, float, Health, float, Damage); + DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnDeathSignature); + +public: + ULMHealthComponent(); + virtual void BeginPlay() override; + void Kill(); + +public: + /** + * Applies an amount of damage to the component. + * @param Damage The damage to apply the Health to. + */ + UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category=Legumix) + void TakeDamage(float Damage); + + /** + * Called automatically when the component hits zero health. + */ + UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category=Legumix) + void OnKill(); + + /** + * Register all hitboxes associated with this component owner. + */ + UFUNCTION(BlueprintCallable, Category=Legumix, CallInEditor) + void RegisterHitBoxes(); + + /** + * Called automatically when a hitbox is hit. + * @param HitBox The hitbox that was hit. + * @param Damage The damage received by the hitbox. + */ + UFUNCTION() + void HitBoxHit(ULMHitBox* HitBox, float Damage); + + /** + * Applies the amount of damage received to the component. + * + * Called automatically when one of this component's LMHitBox is hit. + * @param Damage The damage received. + */ + UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category=Legumix) + void OnHit(float Damage); + + /** + * Adds an amount of health to the character. + * @param AddedHealth The amount of health to add. + * @param NoLimits If sets, ignore the component's MaxHealth value. + */ + UFUNCTION(BlueprintCallable, Category=Legumix, meta=(Keywords = "Refill, Health")) + void AddHealth(const float AddedHealth, const bool NoLimits = false) { Health = FMath::Clamp(Health + AddedHealth, 0.0f, NoLimits ? INT_MAX : MaxHealth); } + + /** + * Completely refill the health of the component. + */ + UFUNCTION(BlueprintCallable, Category=Legumix, meta=(Keywords = "Refill, Health")) + void FillHealth() { Health = MaxHealth; } + +public: + /** Delegate called when this component receives damages. */ + UPROPERTY(BlueprintAssignable, Category=Legumix) + FOnHealthChangedSignature OnHealthChanged; + + /** Delegate called when this component is killed, aka. Health reaches 0.*/ + UPROPERTY(BlueprintAssignable, Category=Legumix) + FOnDeathSignature OnDeath; + +private: + /** + * If set, the Health will be initialized to MaxHealth. + */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) + bool bMaxHealthOnStart = true; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true, ClampMin=0, UIMin=0)) + float Health = 100.f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true, ClampMin=0, UIMin=0, UIMax=1000)) + float MaxHealth = 100.f; + + /** + * A list of all associated LMHitboxes. + */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) + TArray> HitBoxes; +}; diff --git a/Source/LegumeMix/Public/Player/LMHitBox.h b/Source/LegumeMix/Public/Player/LMHitBox.h new file mode 100644 index 0000000..1990ebc --- /dev/null +++ b/Source/LegumeMix/Public/Player/LMHitBox.h @@ -0,0 +1,46 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "LMBulletInfo.h" +#include "Components/CapsuleComponent.h" +#include "LMHitBox.generated.h" + + +UCLASS(Blueprintable, ClassGroup=(Legumix), meta=(BlueprintSpawnableComponent)) +class LEGUMEMIX_API ULMHitBox : public UCapsuleComponent +{ + GENERATED_BODY() + + DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FHitBoxHitSignature, ULMHitBox*, HitBox, float, Damage); + +public: + ULMHitBox(); + void OnHit(const FLMBulletInfo& BulletInfo); + +public: + UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category=Legumix) + float CalculateDamage(float Damage, float Distance, UCurveFloat* Falloff, float MaxDistance); + +public: + /** Delegate called when the hitbox is hit. + * @param HitBox: The Hitbox that was hit. + * @param Damage: The amount of damage done to the hitbox. + */ + UPROPERTY(BlueprintAssignable, BlueprintCallable) + FHitBoxHitSignature OnHitBoxHit; + +private: + /** + * A value to multiply the damage received by. + */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true)) + float DamageModifier = 1.0f; + + /** + * The Amount of damage removed when hit. + */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta=(AllowPrivateAccess=true, ClampMin=0.0f, UIMin=0.0f)) + float FlatDamageAbsorption = 0.f; +}; From 20df022666b19ab61df1839308ab00c2903fcf1a Mon Sep 17 00:00:00 2001 From: TjgL Date: Fri, 24 Jan 2025 13:56:43 +0100 Subject: [PATCH 27/30] Updated collisions + fixed incorrect weapon variable --- Config/DefaultEditor.ini | 4 ++ Config/DefaultEngine.ini | 66 +++++++++++++++++++ Source/LegumeMix/Private/Player/LMPlayer.cpp | 3 +- .../Private/Weapon/LMWeaponManager.cpp | 3 - Source/LegumeMix/Public/LMUtils.h | 4 ++ Source/LegumeMix/Public/Player/LMBulletInfo.h | 2 +- Source/LegumeMix/Public/Weapon/LMWeaponBase.h | 2 +- 7 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 Source/LegumeMix/Public/LMUtils.h diff --git a/Config/DefaultEditor.ini b/Config/DefaultEditor.ini index e69de29..e1711df 100644 --- a/Config/DefaultEditor.ini +++ b/Config/DefaultEditor.ini @@ -0,0 +1,4 @@ +[/Script/AdvancedPreviewScene.SharedProfiles] ++Profiles=(ProfileName="Epic Headquarters",bSharedProfile=True,bIsEngineDefaultProfile=True,bUseSkyLighting=True,DirectionalLightIntensity=1.000000,DirectionalLightColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SkyLightIntensity=1.000000,bRotateLightingRig=False,bShowEnvironment=True,bShowFloor=True,bShowGrid=False,EnvironmentColor=(R=0.200000,G=0.200000,B=0.200000,A=1.000000),EnvironmentIntensity=1.000000,EnvironmentCubeMapPath="/Engine/EditorMaterials/AssetViewer/EpicQuadPanorama_CC+EV1.EpicQuadPanorama_CC+EV1",bPostProcessingEnabled=True,PostProcessingSettings=(bOverride_TemperatureType=False,bOverride_WhiteTemp=False,bOverride_WhiteTint=False,bOverride_ColorSaturation=False,bOverride_ColorContrast=False,bOverride_ColorGamma=False,bOverride_ColorGain=False,bOverride_ColorOffset=False,bOverride_ColorSaturationShadows=False,bOverride_ColorContrastShadows=False,bOverride_ColorGammaShadows=False,bOverride_ColorGainShadows=False,bOverride_ColorOffsetShadows=False,bOverride_ColorSaturationMidtones=False,bOverride_ColorContrastMidtones=False,bOverride_ColorGammaMidtones=False,bOverride_ColorGainMidtones=False,bOverride_ColorOffsetMidtones=False,bOverride_ColorSaturationHighlights=False,bOverride_ColorContrastHighlights=False,bOverride_ColorGammaHighlights=False,bOverride_ColorGainHighlights=False,bOverride_ColorOffsetHighlights=False,bOverride_ColorCorrectionShadowsMax=False,bOverride_ColorCorrectionHighlightsMin=False,bOverride_ColorCorrectionHighlightsMax=False,bOverride_BlueCorrection=False,bOverride_ExpandGamut=False,bOverride_ToneCurveAmount=False,bOverride_FilmSlope=False,bOverride_FilmToe=False,bOverride_FilmShoulder=False,bOverride_FilmBlackClip=False,bOverride_FilmWhiteClip=False,bOverride_SceneColorTint=False,bOverride_SceneFringeIntensity=False,bOverride_ChromaticAberrationStartOffset=False,bOverride_bMegaLights=False,bOverride_AmbientCubemapTint=False,bOverride_AmbientCubemapIntensity=False,bOverride_BloomMethod=False,bOverride_BloomIntensity=False,bOverride_BloomThreshold=False,bOverride_Bloom1Tint=False,bOverride_Bloom1Size=False,bOverride_Bloom2Size=False,bOverride_Bloom2Tint=False,bOverride_Bloom3Tint=False,bOverride_Bloom3Size=False,bOverride_Bloom4Tint=False,bOverride_Bloom4Size=False,bOverride_Bloom5Tint=False,bOverride_Bloom5Size=False,bOverride_Bloom6Tint=False,bOverride_Bloom6Size=False,bOverride_BloomSizeScale=False,bOverride_BloomConvolutionTexture=False,bOverride_BloomConvolutionScatterDispersion=False,bOverride_BloomConvolutionSize=False,bOverride_BloomConvolutionCenterUV=False,bOverride_BloomConvolutionPreFilterMin=False,bOverride_BloomConvolutionPreFilterMax=False,bOverride_BloomConvolutionPreFilterMult=False,bOverride_BloomConvolutionBufferScale=False,bOverride_BloomDirtMaskIntensity=False,bOverride_BloomDirtMaskTint=False,bOverride_BloomDirtMask=False,bOverride_CameraShutterSpeed=False,bOverride_CameraISO=False,bOverride_AutoExposureMethod=False,bOverride_AutoExposureLowPercent=False,bOverride_AutoExposureHighPercent=False,bOverride_AutoExposureMinBrightness=False,bOverride_AutoExposureMaxBrightness=False,bOverride_AutoExposureSpeedUp=False,bOverride_AutoExposureSpeedDown=False,bOverride_AutoExposureBias=False,bOverride_AutoExposureBiasCurve=False,bOverride_AutoExposureMeterMask=False,bOverride_AutoExposureApplyPhysicalCameraExposure=False,bOverride_HistogramLogMin=False,bOverride_HistogramLogMax=False,bOverride_LocalExposureMethod=False,bOverride_LocalExposureHighlightContrastScale=False,bOverride_LocalExposureShadowContrastScale=False,bOverride_LocalExposureHighlightContrastCurve=False,bOverride_LocalExposureShadowContrastCurve=False,bOverride_LocalExposureHighlightThreshold=False,bOverride_LocalExposureShadowThreshold=False,bOverride_LocalExposureDetailStrength=False,bOverride_LocalExposureBlurredLuminanceBlend=False,bOverride_LocalExposureBlurredLuminanceKernelSizePercent=False,bOverride_LocalExposureMiddleGreyBias=False,bOverride_LensFlareIntensity=False,bOverride_LensFlareTint=False,bOverride_LensFlareTints=False,bOverride_LensFlareBokehSize=False,bOverride_LensFlareBokehShape=False,bOverride_LensFlareThreshold=False,bOverride_VignetteIntensity=False,bOverride_Sharpen=False,bOverride_FilmGrainIntensity=False,bOverride_FilmGrainIntensityShadows=False,bOverride_FilmGrainIntensityMidtones=False,bOverride_FilmGrainIntensityHighlights=False,bOverride_FilmGrainShadowsMax=False,bOverride_FilmGrainHighlightsMin=False,bOverride_FilmGrainHighlightsMax=False,bOverride_FilmGrainTexelSize=False,bOverride_FilmGrainTexture=False,bOverride_AmbientOcclusionIntensity=False,bOverride_AmbientOcclusionStaticFraction=False,bOverride_AmbientOcclusionRadius=False,bOverride_AmbientOcclusionFadeDistance=False,bOverride_AmbientOcclusionFadeRadius=False,bOverride_AmbientOcclusionRadiusInWS=False,bOverride_AmbientOcclusionPower=False,bOverride_AmbientOcclusionBias=False,bOverride_AmbientOcclusionQuality=False,bOverride_AmbientOcclusionMipBlend=False,bOverride_AmbientOcclusionMipScale=False,bOverride_AmbientOcclusionMipThreshold=False,bOverride_AmbientOcclusionTemporalBlendWeight=False,bOverride_RayTracingAO=False,bOverride_RayTracingAOSamplesPerPixel=False,bOverride_RayTracingAOIntensity=False,bOverride_RayTracingAORadius=False,bOverride_IndirectLightingColor=False,bOverride_IndirectLightingIntensity=False,bOverride_ColorGradingIntensity=False,bOverride_ColorGradingLUT=False,bOverride_DepthOfFieldFocalDistance=False,bOverride_DepthOfFieldFstop=False,bOverride_DepthOfFieldMinFstop=False,bOverride_DepthOfFieldBladeCount=False,bOverride_DepthOfFieldSensorWidth=False,bOverride_DepthOfFieldSqueezeFactor=False,bOverride_DepthOfFieldDepthBlurRadius=False,bOverride_DepthOfFieldUseHairDepth=False,bOverride_DepthOfFieldDepthBlurAmount=False,bOverride_DepthOfFieldFocalRegion=False,bOverride_DepthOfFieldNearTransitionRegion=False,bOverride_DepthOfFieldFarTransitionRegion=False,bOverride_DepthOfFieldScale=False,bOverride_DepthOfFieldNearBlurSize=False,bOverride_DepthOfFieldFarBlurSize=False,bOverride_MobileHQGaussian=False,bOverride_DepthOfFieldOcclusion=False,bOverride_DepthOfFieldSkyFocusDistance=False,bOverride_DepthOfFieldVignetteSize=False,bOverride_MotionBlurAmount=False,bOverride_MotionBlurMax=False,bOverride_MotionBlurTargetFPS=False,bOverride_MotionBlurPerObjectSize=False,bOverride_ReflectionMethod=False,bOverride_LumenReflectionQuality=False,bOverride_ScreenSpaceReflectionIntensity=False,bOverride_ScreenSpaceReflectionQuality=False,bOverride_ScreenSpaceReflectionMaxRoughness=False,bOverride_ScreenSpaceReflectionRoughnessScale=False,bOverride_UserFlags=False,bOverride_RayTracingReflectionsMaxRoughness=False,bOverride_RayTracingReflectionsMaxBounces=False,bOverride_RayTracingReflectionsSamplesPerPixel=False,bOverride_RayTracingReflectionsShadows=False,bOverride_RayTracingReflectionsTranslucency=False,bOverride_TranslucencyType=False,bOverride_RayTracingTranslucencyMaxRoughness=False,bOverride_RayTracingTranslucencyRefractionRays=False,bOverride_RayTracingTranslucencySamplesPerPixel=False,bOverride_RayTracingTranslucencyShadows=False,bOverride_RayTracingTranslucencyRefraction=False,bOverride_DynamicGlobalIlluminationMethod=False,bOverride_LumenSceneLightingQuality=False,bOverride_LumenSceneDetail=False,bOverride_LumenSceneViewDistance=False,bOverride_LumenSceneLightingUpdateSpeed=False,bOverride_LumenFinalGatherQuality=False,bOverride_LumenFinalGatherLightingUpdateSpeed=False,bOverride_LumenFinalGatherScreenTraces=False,bOverride_LumenMaxTraceDistance=False,bOverride_LumenDiffuseColorBoost=False,bOverride_LumenSkylightLeaking=False,bOverride_LumenFullSkylightLeakingDistance=False,bOverride_LumenRayLightingMode=False,bOverride_LumenReflectionsScreenTraces=False,bOverride_LumenFrontLayerTranslucencyReflections=False,bOverride_LumenMaxRoughnessToTraceReflections=False,bOverride_LumenMaxReflectionBounces=False,bOverride_LumenMaxRefractionBounces=False,bOverride_LumenSurfaceCacheResolution=False,bOverride_RayTracingGI=False,bOverride_RayTracingGIMaxBounces=False,bOverride_RayTracingGISamplesPerPixel=False,bOverride_PathTracingMaxBounces=False,bOverride_PathTracingSamplesPerPixel=False,bOverride_PathTracingMaxPathIntensity=False,bOverride_PathTracingEnableEmissiveMaterials=False,bOverride_PathTracingEnableReferenceDOF=False,bOverride_PathTracingEnableReferenceAtmosphere=False,bOverride_PathTracingEnableDenoiser=False,bOverride_PathTracingIncludeEmissive=False,bOverride_PathTracingIncludeDiffuse=False,bOverride_PathTracingIncludeIndirectDiffuse=False,bOverride_PathTracingIncludeSpecular=False,bOverride_PathTracingIncludeIndirectSpecular=False,bOverride_PathTracingIncludeVolume=False,bOverride_PathTracingIncludeIndirectVolume=False,bMobileHQGaussian=False,BloomMethod=BM_SOG,AutoExposureMethod=AEM_Histogram,TemperatureType=TEMP_WhiteBalance,WhiteTemp=6500.000000,WhiteTint=0.000000,ColorSaturation=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrast=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGamma=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGain=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffset=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetShadows=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetMidtones=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetHighlights=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorCorrectionHighlightsMin=0.500000,ColorCorrectionHighlightsMax=1.000000,ColorCorrectionShadowsMax=0.090000,BlueCorrection=0.600000,ExpandGamut=1.000000,ToneCurveAmount=1.000000,FilmSlope=0.880000,FilmToe=0.550000,FilmShoulder=0.260000,FilmBlackClip=0.000000,FilmWhiteClip=0.040000,SceneColorTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SceneFringeIntensity=0.000000,ChromaticAberrationStartOffset=0.000000,BloomIntensity=0.675000,BloomThreshold=-1.000000,BloomSizeScale=4.000000,Bloom1Size=0.300000,Bloom2Size=1.000000,Bloom3Size=2.000000,Bloom4Size=10.000000,Bloom5Size=30.000000,Bloom6Size=64.000000,Bloom1Tint=(R=0.346500,G=0.346500,B=0.346500,A=1.000000),Bloom2Tint=(R=0.138000,G=0.138000,B=0.138000,A=1.000000),Bloom3Tint=(R=0.117600,G=0.117600,B=0.117600,A=1.000000),Bloom4Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom5Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom6Tint=(R=0.061000,G=0.061000,B=0.061000,A=1.000000),BloomConvolutionScatterDispersion=1.000000,BloomConvolutionSize=1.000000,BloomConvolutionTexture=None,BloomConvolutionCenterUV=(X=0.500000,Y=0.500000),BloomConvolutionPreFilterMin=7.000000,BloomConvolutionPreFilterMax=15000.000000,BloomConvolutionPreFilterMult=15.000000,BloomConvolutionBufferScale=0.133000,BloomDirtMask=None,BloomDirtMaskIntensity=0.000000,BloomDirtMaskTint=(R=0.500000,G=0.500000,B=0.500000,A=1.000000),DynamicGlobalIlluminationMethod=Lumen,IndirectLightingColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),IndirectLightingIntensity=1.000000,LumenRayLightingMode=Default,LumenSceneLightingQuality=1.000000,LumenSceneDetail=1.000000,LumenSceneViewDistance=20000.000000,LumenSceneLightingUpdateSpeed=1.000000,LumenFinalGatherQuality=1.000000,LumenFinalGatherLightingUpdateSpeed=1.000000,LumenFinalGatherScreenTraces=True,LumenMaxTraceDistance=20000.000000,LumenDiffuseColorBoost=1.000000,LumenSkylightLeaking=0.000000,LumenFullSkylightLeakingDistance=1000.000000,LumenSurfaceCacheResolution=1.000000,ReflectionMethod=Lumen,LumenReflectionQuality=1.000000,LumenReflectionsScreenTraces=True,LumenFrontLayerTranslucencyReflections=False,LumenMaxRoughnessToTraceReflections=0.400000,LumenMaxReflectionBounces=1,LumenMaxRefractionBounces=0,ScreenSpaceReflectionIntensity=100.000000,ScreenSpaceReflectionQuality=50.000000,ScreenSpaceReflectionMaxRoughness=0.600000,bMegaLights=True,AmbientCubemapTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),AmbientCubemapIntensity=1.000000,AmbientCubemap=None,CameraShutterSpeed=60.000000,CameraISO=100.000000,DepthOfFieldFstop=4.000000,DepthOfFieldMinFstop=1.200000,DepthOfFieldBladeCount=5,AutoExposureBias=1.000000,AutoExposureBiasBackup=0.000000,bOverride_AutoExposureBiasBackup=False,AutoExposureApplyPhysicalCameraExposure=True,AutoExposureBiasCurve=None,AutoExposureMeterMask=None,AutoExposureLowPercent=10.000000,AutoExposureHighPercent=90.000000,AutoExposureMinBrightness=-10.000000,AutoExposureMaxBrightness=20.000000,AutoExposureSpeedUp=3.000000,AutoExposureSpeedDown=1.000000,HistogramLogMin=-10.000000,HistogramLogMax=20.000000,LocalExposureMethod=Bilateral,LocalExposureHighlightContrastScale=1.000000,LocalExposureShadowContrastScale=1.000000,LocalExposureHighlightContrastCurve=None,LocalExposureShadowContrastCurve=None,LocalExposureHighlightThreshold=0.000000,LocalExposureShadowThreshold=0.000000,LocalExposureDetailStrength=1.000000,LocalExposureBlurredLuminanceBlend=0.600000,LocalExposureBlurredLuminanceKernelSizePercent=50.000000,LocalExposureMiddleGreyBias=0.000000,LensFlareIntensity=1.000000,LensFlareTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),LensFlareBokehSize=3.000000,LensFlareThreshold=8.000000,LensFlareBokehShape=None,LensFlareTints[0]=(R=1.000000,G=0.800000,B=0.400000,A=0.600000),LensFlareTints[1]=(R=1.000000,G=1.000000,B=0.600000,A=0.530000),LensFlareTints[2]=(R=0.800000,G=0.800000,B=1.000000,A=0.460000),LensFlareTints[3]=(R=0.500000,G=1.000000,B=0.400000,A=0.390000),LensFlareTints[4]=(R=0.500000,G=0.800000,B=1.000000,A=0.310000),LensFlareTints[5]=(R=0.900000,G=1.000000,B=0.800000,A=0.270000),LensFlareTints[6]=(R=1.000000,G=0.800000,B=0.400000,A=0.220000),LensFlareTints[7]=(R=0.900000,G=0.700000,B=0.700000,A=0.150000),VignetteIntensity=0.400000,Sharpen=0.000000,FilmGrainIntensity=0.000000,FilmGrainIntensityShadows=1.000000,FilmGrainIntensityMidtones=1.000000,FilmGrainIntensityHighlights=1.000000,FilmGrainShadowsMax=0.090000,FilmGrainHighlightsMin=0.500000,FilmGrainHighlightsMax=1.000000,FilmGrainTexelSize=1.000000,FilmGrainTexture=None,AmbientOcclusionIntensity=0.500000,AmbientOcclusionStaticFraction=1.000000,AmbientOcclusionRadius=200.000000,AmbientOcclusionRadiusInWS=False,AmbientOcclusionFadeDistance=8000.000000,AmbientOcclusionFadeRadius=5000.000000,AmbientOcclusionPower=2.000000,AmbientOcclusionBias=3.000000,AmbientOcclusionQuality=50.000000,AmbientOcclusionMipBlend=0.600000,AmbientOcclusionMipScale=1.700000,AmbientOcclusionMipThreshold=0.010000,AmbientOcclusionTemporalBlendWeight=0.100000,RayTracingAO=False,RayTracingAOSamplesPerPixel=1,RayTracingAOIntensity=1.000000,RayTracingAORadius=200.000000,ColorGradingIntensity=1.000000,ColorGradingLUT=None,DepthOfFieldSensorWidth=24.576000,DepthOfFieldSqueezeFactor=1.000000,DepthOfFieldFocalDistance=0.000000,DepthOfFieldDepthBlurAmount=1.000000,DepthOfFieldDepthBlurRadius=0.000000,DepthOfFieldUseHairDepth=False,DepthOfFieldFocalRegion=0.000000,DepthOfFieldNearTransitionRegion=300.000000,DepthOfFieldFarTransitionRegion=500.000000,DepthOfFieldScale=0.000000,DepthOfFieldNearBlurSize=15.000000,DepthOfFieldFarBlurSize=15.000000,DepthOfFieldOcclusion=0.400000,DepthOfFieldSkyFocusDistance=0.000000,DepthOfFieldVignetteSize=200.000000,MotionBlurAmount=0.500000,MotionBlurMax=5.000000,MotionBlurTargetFPS=30,MotionBlurPerObjectSize=0.000000,TranslucencyType=Raster,RayTracingTranslucencyMaxRoughness=0.600000,RayTracingTranslucencyRefractionRays=3,RayTracingTranslucencySamplesPerPixel=1,RayTracingTranslucencyShadows=Hard_shadows,RayTracingTranslucencyRefraction=True,PathTracingMaxBounces=32,PathTracingSamplesPerPixel=2048,PathTracingMaxPathIntensity=24.000000,PathTracingEnableEmissiveMaterials=True,PathTracingEnableReferenceDOF=False,PathTracingEnableReferenceAtmosphere=False,PathTracingEnableDenoiser=True,PathTracingIncludeEmissive=True,PathTracingIncludeDiffuse=True,PathTracingIncludeIndirectDiffuse=True,PathTracingIncludeSpecular=True,PathTracingIncludeIndirectSpecular=True,PathTracingIncludeVolume=True,PathTracingIncludeIndirectVolume=True,UserFlags=0,WeightedBlendables=(Array=)),LightingRigRotation=0.000000,RotationSpeed=2.000000,DirectionalLightRotation=(Pitch=-40.000000,Yaw=-67.500000,Roll=0.000000),bEnableToneMapping=True,bShowMeshEdges=False) ++Profiles=(ProfileName="Grey Wireframe",bSharedProfile=True,bIsEngineDefaultProfile=True,bUseSkyLighting=True,DirectionalLightIntensity=1.000000,DirectionalLightColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SkyLightIntensity=1.000000,bRotateLightingRig=False,bShowEnvironment=False,bShowFloor=False,bShowGrid=True,EnvironmentColor=(R=0.039216,G=0.039216,B=0.039216,A=1.000000),EnvironmentIntensity=1.000000,EnvironmentCubeMapPath="/Engine/EditorMaterials/AssetViewer/EpicQuadPanorama_CC+EV1.EpicQuadPanorama_CC+EV1",bPostProcessingEnabled=False,PostProcessingSettings=(bOverride_TemperatureType=False,bOverride_WhiteTemp=False,bOverride_WhiteTint=False,bOverride_ColorSaturation=False,bOverride_ColorContrast=False,bOverride_ColorGamma=False,bOverride_ColorGain=False,bOverride_ColorOffset=False,bOverride_ColorSaturationShadows=False,bOverride_ColorContrastShadows=False,bOverride_ColorGammaShadows=False,bOverride_ColorGainShadows=False,bOverride_ColorOffsetShadows=False,bOverride_ColorSaturationMidtones=False,bOverride_ColorContrastMidtones=False,bOverride_ColorGammaMidtones=False,bOverride_ColorGainMidtones=False,bOverride_ColorOffsetMidtones=False,bOverride_ColorSaturationHighlights=False,bOverride_ColorContrastHighlights=False,bOverride_ColorGammaHighlights=False,bOverride_ColorGainHighlights=False,bOverride_ColorOffsetHighlights=False,bOverride_ColorCorrectionShadowsMax=False,bOverride_ColorCorrectionHighlightsMin=False,bOverride_ColorCorrectionHighlightsMax=False,bOverride_BlueCorrection=False,bOverride_ExpandGamut=False,bOverride_ToneCurveAmount=False,bOverride_FilmSlope=False,bOverride_FilmToe=False,bOverride_FilmShoulder=False,bOverride_FilmBlackClip=False,bOverride_FilmWhiteClip=False,bOverride_SceneColorTint=False,bOverride_SceneFringeIntensity=False,bOverride_ChromaticAberrationStartOffset=False,bOverride_bMegaLights=False,bOverride_AmbientCubemapTint=False,bOverride_AmbientCubemapIntensity=False,bOverride_BloomMethod=False,bOverride_BloomIntensity=False,bOverride_BloomThreshold=False,bOverride_Bloom1Tint=False,bOverride_Bloom1Size=False,bOverride_Bloom2Size=False,bOverride_Bloom2Tint=False,bOverride_Bloom3Tint=False,bOverride_Bloom3Size=False,bOverride_Bloom4Tint=False,bOverride_Bloom4Size=False,bOverride_Bloom5Tint=False,bOverride_Bloom5Size=False,bOverride_Bloom6Tint=False,bOverride_Bloom6Size=False,bOverride_BloomSizeScale=False,bOverride_BloomConvolutionTexture=False,bOverride_BloomConvolutionScatterDispersion=False,bOverride_BloomConvolutionSize=False,bOverride_BloomConvolutionCenterUV=False,bOverride_BloomConvolutionPreFilterMin=False,bOverride_BloomConvolutionPreFilterMax=False,bOverride_BloomConvolutionPreFilterMult=False,bOverride_BloomConvolutionBufferScale=False,bOverride_BloomDirtMaskIntensity=False,bOverride_BloomDirtMaskTint=False,bOverride_BloomDirtMask=False,bOverride_CameraShutterSpeed=False,bOverride_CameraISO=False,bOverride_AutoExposureMethod=False,bOverride_AutoExposureLowPercent=False,bOverride_AutoExposureHighPercent=False,bOverride_AutoExposureMinBrightness=False,bOverride_AutoExposureMaxBrightness=False,bOverride_AutoExposureSpeedUp=False,bOverride_AutoExposureSpeedDown=False,bOverride_AutoExposureBias=False,bOverride_AutoExposureBiasCurve=False,bOverride_AutoExposureMeterMask=False,bOverride_AutoExposureApplyPhysicalCameraExposure=False,bOverride_HistogramLogMin=False,bOverride_HistogramLogMax=False,bOverride_LocalExposureMethod=False,bOverride_LocalExposureHighlightContrastScale=False,bOverride_LocalExposureShadowContrastScale=False,bOverride_LocalExposureHighlightContrastCurve=False,bOverride_LocalExposureShadowContrastCurve=False,bOverride_LocalExposureHighlightThreshold=False,bOverride_LocalExposureShadowThreshold=False,bOverride_LocalExposureDetailStrength=False,bOverride_LocalExposureBlurredLuminanceBlend=False,bOverride_LocalExposureBlurredLuminanceKernelSizePercent=False,bOverride_LocalExposureMiddleGreyBias=False,bOverride_LensFlareIntensity=False,bOverride_LensFlareTint=False,bOverride_LensFlareTints=False,bOverride_LensFlareBokehSize=False,bOverride_LensFlareBokehShape=False,bOverride_LensFlareThreshold=False,bOverride_VignetteIntensity=False,bOverride_Sharpen=False,bOverride_FilmGrainIntensity=False,bOverride_FilmGrainIntensityShadows=False,bOverride_FilmGrainIntensityMidtones=False,bOverride_FilmGrainIntensityHighlights=False,bOverride_FilmGrainShadowsMax=False,bOverride_FilmGrainHighlightsMin=False,bOverride_FilmGrainHighlightsMax=False,bOverride_FilmGrainTexelSize=False,bOverride_FilmGrainTexture=False,bOverride_AmbientOcclusionIntensity=False,bOverride_AmbientOcclusionStaticFraction=False,bOverride_AmbientOcclusionRadius=False,bOverride_AmbientOcclusionFadeDistance=False,bOverride_AmbientOcclusionFadeRadius=False,bOverride_AmbientOcclusionRadiusInWS=False,bOverride_AmbientOcclusionPower=False,bOverride_AmbientOcclusionBias=False,bOverride_AmbientOcclusionQuality=False,bOverride_AmbientOcclusionMipBlend=False,bOverride_AmbientOcclusionMipScale=False,bOverride_AmbientOcclusionMipThreshold=False,bOverride_AmbientOcclusionTemporalBlendWeight=False,bOverride_RayTracingAO=False,bOverride_RayTracingAOSamplesPerPixel=False,bOverride_RayTracingAOIntensity=False,bOverride_RayTracingAORadius=False,bOverride_IndirectLightingColor=False,bOverride_IndirectLightingIntensity=False,bOverride_ColorGradingIntensity=False,bOverride_ColorGradingLUT=False,bOverride_DepthOfFieldFocalDistance=False,bOverride_DepthOfFieldFstop=False,bOverride_DepthOfFieldMinFstop=False,bOverride_DepthOfFieldBladeCount=False,bOverride_DepthOfFieldSensorWidth=False,bOverride_DepthOfFieldSqueezeFactor=False,bOverride_DepthOfFieldDepthBlurRadius=False,bOverride_DepthOfFieldUseHairDepth=False,bOverride_DepthOfFieldDepthBlurAmount=False,bOverride_DepthOfFieldFocalRegion=False,bOverride_DepthOfFieldNearTransitionRegion=False,bOverride_DepthOfFieldFarTransitionRegion=False,bOverride_DepthOfFieldScale=False,bOverride_DepthOfFieldNearBlurSize=False,bOverride_DepthOfFieldFarBlurSize=False,bOverride_MobileHQGaussian=False,bOverride_DepthOfFieldOcclusion=False,bOverride_DepthOfFieldSkyFocusDistance=False,bOverride_DepthOfFieldVignetteSize=False,bOverride_MotionBlurAmount=False,bOverride_MotionBlurMax=False,bOverride_MotionBlurTargetFPS=False,bOverride_MotionBlurPerObjectSize=False,bOverride_ReflectionMethod=False,bOverride_LumenReflectionQuality=False,bOverride_ScreenSpaceReflectionIntensity=False,bOverride_ScreenSpaceReflectionQuality=False,bOverride_ScreenSpaceReflectionMaxRoughness=False,bOverride_ScreenSpaceReflectionRoughnessScale=False,bOverride_UserFlags=False,bOverride_RayTracingReflectionsMaxRoughness=False,bOverride_RayTracingReflectionsMaxBounces=False,bOverride_RayTracingReflectionsSamplesPerPixel=False,bOverride_RayTracingReflectionsShadows=False,bOverride_RayTracingReflectionsTranslucency=False,bOverride_TranslucencyType=False,bOverride_RayTracingTranslucencyMaxRoughness=False,bOverride_RayTracingTranslucencyRefractionRays=False,bOverride_RayTracingTranslucencySamplesPerPixel=False,bOverride_RayTracingTranslucencyShadows=False,bOverride_RayTracingTranslucencyRefraction=False,bOverride_DynamicGlobalIlluminationMethod=False,bOverride_LumenSceneLightingQuality=False,bOverride_LumenSceneDetail=False,bOverride_LumenSceneViewDistance=False,bOverride_LumenSceneLightingUpdateSpeed=False,bOverride_LumenFinalGatherQuality=False,bOverride_LumenFinalGatherLightingUpdateSpeed=False,bOverride_LumenFinalGatherScreenTraces=False,bOverride_LumenMaxTraceDistance=False,bOverride_LumenDiffuseColorBoost=False,bOverride_LumenSkylightLeaking=False,bOverride_LumenFullSkylightLeakingDistance=False,bOverride_LumenRayLightingMode=False,bOverride_LumenReflectionsScreenTraces=False,bOverride_LumenFrontLayerTranslucencyReflections=False,bOverride_LumenMaxRoughnessToTraceReflections=False,bOverride_LumenMaxReflectionBounces=False,bOverride_LumenMaxRefractionBounces=False,bOverride_LumenSurfaceCacheResolution=False,bOverride_RayTracingGI=False,bOverride_RayTracingGIMaxBounces=False,bOverride_RayTracingGISamplesPerPixel=False,bOverride_PathTracingMaxBounces=False,bOverride_PathTracingSamplesPerPixel=False,bOverride_PathTracingMaxPathIntensity=False,bOverride_PathTracingEnableEmissiveMaterials=False,bOverride_PathTracingEnableReferenceDOF=False,bOverride_PathTracingEnableReferenceAtmosphere=False,bOverride_PathTracingEnableDenoiser=False,bOverride_PathTracingIncludeEmissive=False,bOverride_PathTracingIncludeDiffuse=False,bOverride_PathTracingIncludeIndirectDiffuse=False,bOverride_PathTracingIncludeSpecular=False,bOverride_PathTracingIncludeIndirectSpecular=False,bOverride_PathTracingIncludeVolume=False,bOverride_PathTracingIncludeIndirectVolume=False,bMobileHQGaussian=False,BloomMethod=BM_SOG,AutoExposureMethod=AEM_Histogram,TemperatureType=TEMP_WhiteBalance,WhiteTemp=6500.000000,WhiteTint=0.000000,ColorSaturation=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrast=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGamma=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGain=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffset=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetShadows=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetMidtones=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetHighlights=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorCorrectionHighlightsMin=0.500000,ColorCorrectionHighlightsMax=1.000000,ColorCorrectionShadowsMax=0.090000,BlueCorrection=0.600000,ExpandGamut=1.000000,ToneCurveAmount=1.000000,FilmSlope=0.880000,FilmToe=0.550000,FilmShoulder=0.260000,FilmBlackClip=0.000000,FilmWhiteClip=0.040000,SceneColorTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SceneFringeIntensity=0.000000,ChromaticAberrationStartOffset=0.000000,BloomIntensity=0.675000,BloomThreshold=-1.000000,BloomSizeScale=4.000000,Bloom1Size=0.300000,Bloom2Size=1.000000,Bloom3Size=2.000000,Bloom4Size=10.000000,Bloom5Size=30.000000,Bloom6Size=64.000000,Bloom1Tint=(R=0.346500,G=0.346500,B=0.346500,A=1.000000),Bloom2Tint=(R=0.138000,G=0.138000,B=0.138000,A=1.000000),Bloom3Tint=(R=0.117600,G=0.117600,B=0.117600,A=1.000000),Bloom4Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom5Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom6Tint=(R=0.061000,G=0.061000,B=0.061000,A=1.000000),BloomConvolutionScatterDispersion=1.000000,BloomConvolutionSize=1.000000,BloomConvolutionTexture=None,BloomConvolutionCenterUV=(X=0.500000,Y=0.500000),BloomConvolutionPreFilterMin=7.000000,BloomConvolutionPreFilterMax=15000.000000,BloomConvolutionPreFilterMult=15.000000,BloomConvolutionBufferScale=0.133000,BloomDirtMask=None,BloomDirtMaskIntensity=0.000000,BloomDirtMaskTint=(R=0.500000,G=0.500000,B=0.500000,A=1.000000),DynamicGlobalIlluminationMethod=Lumen,IndirectLightingColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),IndirectLightingIntensity=1.000000,LumenRayLightingMode=Default,LumenSceneLightingQuality=1.000000,LumenSceneDetail=1.000000,LumenSceneViewDistance=20000.000000,LumenSceneLightingUpdateSpeed=1.000000,LumenFinalGatherQuality=1.000000,LumenFinalGatherLightingUpdateSpeed=1.000000,LumenFinalGatherScreenTraces=True,LumenMaxTraceDistance=20000.000000,LumenDiffuseColorBoost=1.000000,LumenSkylightLeaking=0.000000,LumenFullSkylightLeakingDistance=1000.000000,LumenSurfaceCacheResolution=1.000000,ReflectionMethod=Lumen,LumenReflectionQuality=1.000000,LumenReflectionsScreenTraces=True,LumenFrontLayerTranslucencyReflections=False,LumenMaxRoughnessToTraceReflections=0.400000,LumenMaxReflectionBounces=1,LumenMaxRefractionBounces=0,ScreenSpaceReflectionIntensity=100.000000,ScreenSpaceReflectionQuality=50.000000,ScreenSpaceReflectionMaxRoughness=0.600000,bMegaLights=True,AmbientCubemapTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),AmbientCubemapIntensity=1.000000,AmbientCubemap=None,CameraShutterSpeed=60.000000,CameraISO=100.000000,DepthOfFieldFstop=4.000000,DepthOfFieldMinFstop=1.200000,DepthOfFieldBladeCount=5,AutoExposureBias=1.000000,AutoExposureBiasBackup=0.000000,bOverride_AutoExposureBiasBackup=False,AutoExposureApplyPhysicalCameraExposure=True,AutoExposureBiasCurve=None,AutoExposureMeterMask=None,AutoExposureLowPercent=10.000000,AutoExposureHighPercent=90.000000,AutoExposureMinBrightness=-10.000000,AutoExposureMaxBrightness=20.000000,AutoExposureSpeedUp=3.000000,AutoExposureSpeedDown=1.000000,HistogramLogMin=-10.000000,HistogramLogMax=20.000000,LocalExposureMethod=Bilateral,LocalExposureHighlightContrastScale=1.000000,LocalExposureShadowContrastScale=1.000000,LocalExposureHighlightContrastCurve=None,LocalExposureShadowContrastCurve=None,LocalExposureHighlightThreshold=0.000000,LocalExposureShadowThreshold=0.000000,LocalExposureDetailStrength=1.000000,LocalExposureBlurredLuminanceBlend=0.600000,LocalExposureBlurredLuminanceKernelSizePercent=50.000000,LocalExposureMiddleGreyBias=0.000000,LensFlareIntensity=1.000000,LensFlareTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),LensFlareBokehSize=3.000000,LensFlareThreshold=8.000000,LensFlareBokehShape=None,LensFlareTints[0]=(R=1.000000,G=0.800000,B=0.400000,A=0.600000),LensFlareTints[1]=(R=1.000000,G=1.000000,B=0.600000,A=0.530000),LensFlareTints[2]=(R=0.800000,G=0.800000,B=1.000000,A=0.460000),LensFlareTints[3]=(R=0.500000,G=1.000000,B=0.400000,A=0.390000),LensFlareTints[4]=(R=0.500000,G=0.800000,B=1.000000,A=0.310000),LensFlareTints[5]=(R=0.900000,G=1.000000,B=0.800000,A=0.270000),LensFlareTints[6]=(R=1.000000,G=0.800000,B=0.400000,A=0.220000),LensFlareTints[7]=(R=0.900000,G=0.700000,B=0.700000,A=0.150000),VignetteIntensity=0.400000,Sharpen=0.000000,FilmGrainIntensity=0.000000,FilmGrainIntensityShadows=1.000000,FilmGrainIntensityMidtones=1.000000,FilmGrainIntensityHighlights=1.000000,FilmGrainShadowsMax=0.090000,FilmGrainHighlightsMin=0.500000,FilmGrainHighlightsMax=1.000000,FilmGrainTexelSize=1.000000,FilmGrainTexture=None,AmbientOcclusionIntensity=0.500000,AmbientOcclusionStaticFraction=1.000000,AmbientOcclusionRadius=200.000000,AmbientOcclusionRadiusInWS=False,AmbientOcclusionFadeDistance=8000.000000,AmbientOcclusionFadeRadius=5000.000000,AmbientOcclusionPower=2.000000,AmbientOcclusionBias=3.000000,AmbientOcclusionQuality=50.000000,AmbientOcclusionMipBlend=0.600000,AmbientOcclusionMipScale=1.700000,AmbientOcclusionMipThreshold=0.010000,AmbientOcclusionTemporalBlendWeight=0.100000,RayTracingAO=False,RayTracingAOSamplesPerPixel=1,RayTracingAOIntensity=1.000000,RayTracingAORadius=200.000000,ColorGradingIntensity=1.000000,ColorGradingLUT=None,DepthOfFieldSensorWidth=24.576000,DepthOfFieldSqueezeFactor=1.000000,DepthOfFieldFocalDistance=0.000000,DepthOfFieldDepthBlurAmount=1.000000,DepthOfFieldDepthBlurRadius=0.000000,DepthOfFieldUseHairDepth=False,DepthOfFieldFocalRegion=0.000000,DepthOfFieldNearTransitionRegion=300.000000,DepthOfFieldFarTransitionRegion=500.000000,DepthOfFieldScale=0.000000,DepthOfFieldNearBlurSize=15.000000,DepthOfFieldFarBlurSize=15.000000,DepthOfFieldOcclusion=0.400000,DepthOfFieldSkyFocusDistance=0.000000,DepthOfFieldVignetteSize=200.000000,MotionBlurAmount=0.500000,MotionBlurMax=5.000000,MotionBlurTargetFPS=30,MotionBlurPerObjectSize=0.000000,TranslucencyType=Raster,RayTracingTranslucencyMaxRoughness=0.600000,RayTracingTranslucencyRefractionRays=3,RayTracingTranslucencySamplesPerPixel=1,RayTracingTranslucencyShadows=Hard_shadows,RayTracingTranslucencyRefraction=True,PathTracingMaxBounces=32,PathTracingSamplesPerPixel=2048,PathTracingMaxPathIntensity=24.000000,PathTracingEnableEmissiveMaterials=True,PathTracingEnableReferenceDOF=False,PathTracingEnableReferenceAtmosphere=False,PathTracingEnableDenoiser=True,PathTracingIncludeEmissive=True,PathTracingIncludeDiffuse=True,PathTracingIncludeIndirectDiffuse=True,PathTracingIncludeSpecular=True,PathTracingIncludeIndirectSpecular=True,PathTracingIncludeVolume=True,PathTracingIncludeIndirectVolume=True,UserFlags=0,WeightedBlendables=(Array=)),LightingRigRotation=0.000000,RotationSpeed=2.000000,DirectionalLightRotation=(Pitch=-40.000000,Yaw=-67.500000,Roll=0.000000),bEnableToneMapping=False,bShowMeshEdges=True) + diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index ec234e9..0b7008a 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -92,3 +92,69 @@ ConnectionType=USBOnly bUseManualIPAddress=False ManualIPAddress= +[/Script/Engine.CollisionProfile] +-Profiles=(Name="NoCollision",CollisionEnabled=NoCollision,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="No collision",bCanModify=False) +-Profiles=(Name="BlockAll",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldStatic",CustomResponses=,HelpMessage="WorldStatic object that blocks all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="OverlapAll",CollisionEnabled=QueryOnly,ObjectTypeName="WorldStatic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="BlockAllDynamic",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldDynamic",CustomResponses=,HelpMessage="WorldDynamic object that blocks all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="OverlapAllDynamic",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that overlaps all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="IgnoreOnlyPawn",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that ignores Pawn and Vehicle. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="OverlapOnlyPawn",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that overlaps Pawn, Camera, and Vehicle. All other channels will be set to default. ",bCanModify=False) +-Profiles=(Name="Pawn",CollisionEnabled=QueryAndPhysics,ObjectTypeName="Pawn",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object. Can be used for capsule of any playerable character or AI. ",bCanModify=False) +-Profiles=(Name="Spectator",CollisionEnabled=QueryOnly,ObjectTypeName="Pawn",CustomResponses=((Channel="WorldStatic",Response=ECR_Block),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore)),HelpMessage="Pawn object that ignores all other actors except WorldStatic.",bCanModify=False) +-Profiles=(Name="CharacterMesh",CollisionEnabled=QueryOnly,ObjectTypeName="Pawn",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object that is used for Character Mesh. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="PhysicsActor",CollisionEnabled=QueryAndPhysics,ObjectTypeName="PhysicsBody",CustomResponses=,HelpMessage="Simulating actors",bCanModify=False) +-Profiles=(Name="Destructible",CollisionEnabled=QueryAndPhysics,ObjectTypeName="Destructible",CustomResponses=,HelpMessage="Destructible actors",bCanModify=False) +-Profiles=(Name="InvisibleWall",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldStatic object that is invisible.",bCanModify=False) +-Profiles=(Name="InvisibleWallDynamic",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that is invisible.",bCanModify=False) +-Profiles=(Name="Trigger",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that is used for trigger. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="Ragdoll",CollisionEnabled=QueryAndPhysics,ObjectTypeName="PhysicsBody",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Simulating Skeletal Mesh Component. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="Vehicle",CollisionEnabled=QueryAndPhysics,ObjectTypeName="Vehicle",CustomResponses=,HelpMessage="Vehicle object that blocks Vehicle, WorldStatic, and WorldDynamic. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="UI",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Block),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ",bCanModify=False) ++Profiles=(Name="NoCollision",CollisionEnabled=NoCollision,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="No collision") ++Profiles=(Name="BlockAll",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=,HelpMessage="WorldStatic object that blocks all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="OverlapAll",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="BlockAllDynamic",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=,HelpMessage="WorldDynamic object that blocks all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="OverlapAllDynamic",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that overlaps all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="IgnoreOnlyPawn",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that ignores Pawn and Vehicle. All other channels will be set to default.") ++Profiles=(Name="OverlapOnlyPawn",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that overlaps Pawn, Camera, and Vehicle. All other channels will be set to default. ") ++Profiles=(Name="Pawn",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Pawn",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object. Can be used for capsule of any playerable character or AI. ") ++Profiles=(Name="Spectator",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="Pawn",CustomResponses=((Channel="WorldStatic"),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore)),HelpMessage="Pawn object that ignores all other actors except WorldStatic.") ++Profiles=(Name="CharacterMesh",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="Pawn",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object that is used for Character Mesh. All other channels will be set to default.") ++Profiles=(Name="PhysicsActor",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="PhysicsBody",CustomResponses=,HelpMessage="Simulating actors") ++Profiles=(Name="Destructible",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Destructible",CustomResponses=,HelpMessage="Destructible actors") ++Profiles=(Name="InvisibleWall",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldStatic object that is invisible.") ++Profiles=(Name="InvisibleWallDynamic",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that is invisible.") ++Profiles=(Name="Trigger",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that is used for trigger. All other channels will be set to default.") ++Profiles=(Name="Ragdoll",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="PhysicsBody",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Simulating Skeletal Mesh Component. All other channels will be set to default.") ++Profiles=(Name="Vehicle",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Vehicle",CustomResponses=,HelpMessage="Vehicle object that blocks Vehicle, WorldStatic, and WorldDynamic. All other channels will be set to default.") ++Profiles=(Name="UI",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility"),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ") ++DefaultChannelResponses=(Channel=ECC_GameTraceChannel1,DefaultResponse=ECR_Block,bTraceType=True,bStaticObject=False,Name="Bullet") ++EditProfiles=(Name="NoCollision",CustomResponses=((Channel="Bullet",Response=ECR_Ignore))) ++EditProfiles=(Name="OverlapAll",CustomResponses=((Channel="Bullet",Response=ECR_Overlap))) ++EditProfiles=(Name="CharacterMesh",CustomResponses=((Channel="Bullet",Response=ECR_Ignore))) ++EditProfiles=(Name="OverlapAllDynamic",CustomResponses=((Channel="Bullet",Response=ECR_Overlap))) ++EditProfiles=(Name="OverlapOnlyPawn",CustomResponses=((Channel="Bullet",Response=ECR_Ignore))) ++EditProfiles=(Name="Pawn",CustomResponses=((Channel="Bullet",Response=ECR_Ignore))) ++EditProfiles=(Name="Trigger",CustomResponses=((Channel="Bullet",Response=ECR_Overlap))) ++EditProfiles=(Name="Ragdoll",CustomResponses=((Channel="Bullet",Response=ECR_Ignore))) ++EditProfiles=(Name="UI",CustomResponses=((Channel="Bullet",Response=ECR_Ignore))) +-ProfileRedirects=(OldName="BlockingVolume",NewName="InvisibleWall") +-ProfileRedirects=(OldName="InterpActor",NewName="IgnoreOnlyPawn") +-ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic") +-ProfileRedirects=(OldName="SkeletalMeshActor",NewName="PhysicsActor") +-ProfileRedirects=(OldName="InvisibleActor",NewName="InvisibleWallDynamic") ++ProfileRedirects=(OldName="BlockingVolume",NewName="InvisibleWall") ++ProfileRedirects=(OldName="InterpActor",NewName="IgnoreOnlyPawn") ++ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic") ++ProfileRedirects=(OldName="SkeletalMeshActor",NewName="PhysicsActor") ++ProfileRedirects=(OldName="InvisibleActor",NewName="InvisibleWallDynamic") +-CollisionChannelRedirects=(OldName="Static",NewName="WorldStatic") +-CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic") +-CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle") +-CollisionChannelRedirects=(OldName="PawnMovement",NewName="Pawn") ++CollisionChannelRedirects=(OldName="Static",NewName="WorldStatic") ++CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic") ++CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle") ++CollisionChannelRedirects=(OldName="PawnMovement",NewName="Pawn") + diff --git a/Source/LegumeMix/Private/Player/LMPlayer.cpp b/Source/LegumeMix/Private/Player/LMPlayer.cpp index 84e12a7..63d08d4 100644 --- a/Source/LegumeMix/Private/Player/LMPlayer.cpp +++ b/Source/LegumeMix/Private/Player/LMPlayer.cpp @@ -4,6 +4,7 @@ #include "Player/LMPlayer.h" #include "KismetTraceUtils.h" +#include "LMUtils.h" #include "Camera/CameraComponent.h" #include "Ammo/LMAmmo.h" #include "Player/LMBulletInfo.h" @@ -83,7 +84,7 @@ void ALMPlayer::FireBullets(const FLMBulletInfo Settings) ShotVector = UKismetMathLibrary::RandomUnitVectorInConeInDegreesFromStream(SpreadStream, Settings.Direction, Settings.Spread); EndLocation = Settings.Origin + (ShotVector * Settings.MaxDistance); - const bool HasHit = GetWorld()->LineTraceSingleByChannel(OutHit, Settings.Origin, EndLocation, ECC_Camera); + const bool HasHit = GetWorld()->LineTraceSingleByChannel(OutHit, Settings.Origin, EndLocation, TRACE_BULLET); DrawDebugLineTraceSingle(GetWorld(), Settings.Origin, EndLocation, EDrawDebugTrace::ForDuration, HasHit, OutHit, FColor::Green, FColor::Red, 2.f); if (!HasHit) diff --git a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp index cdb6c95..55a9c8f 100644 --- a/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp +++ b/Source/LegumeMix/Private/Weapon/LMWeaponManager.cpp @@ -76,7 +76,6 @@ void ULMWeaponManager::Initialize(USkeletalMeshComponent* Mesh) continue; ALMWeaponBase* Instance = GetWorld()->SpawnActor(WeaponTemplate); - GEngine->AddOnScreenDebugMessage(INDEX_NONE, 2.f, FColor::Blue, TEXT("Spawing")); Instance->Setup(ArmsMesh, GetOwner()); Weapons.Add(Instance); } @@ -126,8 +125,6 @@ void ULMWeaponManager::Fire() void ULMWeaponManager::Reload() { - GEngine->AddOnScreenDebugMessage(3, 1.f, FColor::Cyan, "Reloading"); - ALMWeaponBase* Weapon = GetCurrentWeapon(); if (Weapon->State == EWeaponState::EWS_Idle) diff --git a/Source/LegumeMix/Public/LMUtils.h b/Source/LegumeMix/Public/LMUtils.h new file mode 100644 index 0000000..ea4c804 --- /dev/null +++ b/Source/LegumeMix/Public/LMUtils.h @@ -0,0 +1,4 @@ +#pragma once + +/** The Trace Channel for Bullets. */ +#define TRACE_BULLET ECC_GameTraceChannel1 diff --git a/Source/LegumeMix/Public/Player/LMBulletInfo.h b/Source/LegumeMix/Public/Player/LMBulletInfo.h index 740b9d8..98d4d3c 100644 --- a/Source/LegumeMix/Public/Player/LMBulletInfo.h +++ b/Source/LegumeMix/Public/Player/LMBulletInfo.h @@ -29,7 +29,7 @@ struct FLMBulletInfo /** A curve multiplicating the damage of a bullet depending on the distance of the target. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) - FFloatCurve Falloff = FFloatCurve(); + UCurveFloat* Falloff = nullptr; /** The type of bullet that was fired. */ UPROPERTY(EditAnywhere, BlueprintReadWrite) diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h index 7cad860..5816319 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h @@ -103,7 +103,7 @@ protected: /* Weapon Data */ /** The damage falloff distance in a 0-1 scale. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) - FFloatCurve DamageFalloff; + TObjectPtr DamageFalloff; /** The type of ammo used by this weapon. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true)) From 375172b1723d6bff39b507c737b857f132fe9c64 Mon Sep 17 00:00:00 2001 From: TjgL Date: Fri, 24 Jan 2025 13:57:12 +0100 Subject: [PATCH 28/30] Updated blueprints with hitboxes and fallof curves --- Content/Legumix/Ennemy/BP_Dummy.uasset | 3 +++ Content/Legumix/Ennemy/BP_HealthComponent.uasset | 3 +++ Content/Legumix/Ennemy/BP_HitBox_Body.uasset | 3 +++ Content/Legumix/Ennemy/BP_HitBox_Head.uasset | 3 +++ Content/Legumix/Weapon/Revolver/BP_Revolver.uasset | 4 ++-- Content/Legumix/Weapon/Revolver/C_Falloff_Revolver.uasset | 3 +++ Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset | 4 ++-- Content/Legumix/Weapon/Shotgun/C_Falloff_Shotgun.uasset | 3 +++ 8 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 Content/Legumix/Ennemy/BP_Dummy.uasset create mode 100644 Content/Legumix/Ennemy/BP_HealthComponent.uasset create mode 100644 Content/Legumix/Ennemy/BP_HitBox_Body.uasset create mode 100644 Content/Legumix/Ennemy/BP_HitBox_Head.uasset create mode 100644 Content/Legumix/Weapon/Revolver/C_Falloff_Revolver.uasset create mode 100644 Content/Legumix/Weapon/Shotgun/C_Falloff_Shotgun.uasset diff --git a/Content/Legumix/Ennemy/BP_Dummy.uasset b/Content/Legumix/Ennemy/BP_Dummy.uasset new file mode 100644 index 0000000..bda3659 --- /dev/null +++ b/Content/Legumix/Ennemy/BP_Dummy.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1933dce93a57661446fefa27890945a25cf15f21e5307130b46876a95e844da +size 68088 diff --git a/Content/Legumix/Ennemy/BP_HealthComponent.uasset b/Content/Legumix/Ennemy/BP_HealthComponent.uasset new file mode 100644 index 0000000..a9562d5 --- /dev/null +++ b/Content/Legumix/Ennemy/BP_HealthComponent.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:915c0b02b161011d27d37d553bb135325dba261d6502638d155d7da5abef84d7 +size 40475 diff --git a/Content/Legumix/Ennemy/BP_HitBox_Body.uasset b/Content/Legumix/Ennemy/BP_HitBox_Body.uasset new file mode 100644 index 0000000..48a67b1 --- /dev/null +++ b/Content/Legumix/Ennemy/BP_HitBox_Body.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d294c368e9577ce8771ba1666ac8a798ae8ab41b91627619bca73778889534fa +size 17036 diff --git a/Content/Legumix/Ennemy/BP_HitBox_Head.uasset b/Content/Legumix/Ennemy/BP_HitBox_Head.uasset new file mode 100644 index 0000000..57b7562 --- /dev/null +++ b/Content/Legumix/Ennemy/BP_HitBox_Head.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f17cfcdf2d455e6314807c481c12c80d66f8b42ac4a4e4715322bef39dcf18a0 +size 17013 diff --git a/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset b/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset index f5d620a..d05f3ef 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:7a321d23370f221f76b28bcef172d19c5603474297e34f79f13623e4717b9fff -size 52111 +oid sha256:518819fa1779bbb1b3ec35f67b9ac0967ba613befeda1e45216d5f2593820d9f +size 52339 diff --git a/Content/Legumix/Weapon/Revolver/C_Falloff_Revolver.uasset b/Content/Legumix/Weapon/Revolver/C_Falloff_Revolver.uasset new file mode 100644 index 0000000..f5a1fce --- /dev/null +++ b/Content/Legumix/Weapon/Revolver/C_Falloff_Revolver.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0dc0fdb2874e210976edc815a88ea9ea882091fd5c6fb54fb6d5709c821f4ec3 +size 3581 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset index 7d43b52..04df7bd 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:3536f68d8d3feb88b85e0ae67de885430d07f6d5ea1bdd7cafb0aa37a3194acd -size 53921 +oid sha256:240093c914f6c2ae84ce6059ec649a32c3861d7879fe72223a10c0f2dc01a431 +size 54211 diff --git a/Content/Legumix/Weapon/Shotgun/C_Falloff_Shotgun.uasset b/Content/Legumix/Weapon/Shotgun/C_Falloff_Shotgun.uasset new file mode 100644 index 0000000..849e20f --- /dev/null +++ b/Content/Legumix/Weapon/Shotgun/C_Falloff_Shotgun.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a75d0924c1827034d2fd569cfaab7eab8c3f441ef9a5570618f03e343a722ab7 +size 3574 From d84b49640d20e9b9ce6af74da1c0420cfcd4285b Mon Sep 17 00:00:00 2001 From: TjgL Date: Fri, 24 Jan 2025 14:07:23 +0100 Subject: [PATCH 29/30] Added mesh for the shotgun --- Content/Legumix/Weapon/Revolver/Revolvert.uasset | 4 ++-- Content/Legumix/Weapon/Shotgun/02_-_Default.uasset | 3 +++ Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset | 4 ++-- Content/Legumix/Weapon/Shotgun/Pistolet.uasset | 3 +++ Content/Legumix/Weapon/Shotgun/Plane002.uasset | 3 +++ 5 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 Content/Legumix/Weapon/Shotgun/02_-_Default.uasset create mode 100644 Content/Legumix/Weapon/Shotgun/Pistolet.uasset create mode 100644 Content/Legumix/Weapon/Shotgun/Plane002.uasset diff --git a/Content/Legumix/Weapon/Revolver/Revolvert.uasset b/Content/Legumix/Weapon/Revolver/Revolvert.uasset index f8e0b1d..4ce189d 100644 --- a/Content/Legumix/Weapon/Revolver/Revolvert.uasset +++ b/Content/Legumix/Weapon/Revolver/Revolvert.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4363b352eb4619c4e61ed3efa37855d0cd7a3b25b002bc3e564f27548d14afe -size 214063 +oid sha256:6af3be98d4611ba85bf8ea0a156be856f8e3ef586a6572e22fff30b1c4f850d7 +size 217331 diff --git a/Content/Legumix/Weapon/Shotgun/02_-_Default.uasset b/Content/Legumix/Weapon/Shotgun/02_-_Default.uasset new file mode 100644 index 0000000..01ecea8 --- /dev/null +++ b/Content/Legumix/Weapon/Shotgun/02_-_Default.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73b4932692b8e0aa07dcf77cc33fb2197ebaefdf476773ed4806790379df8e7b +size 54826 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset index 04df7bd..e33519d 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:240093c914f6c2ae84ce6059ec649a32c3861d7879fe72223a10c0f2dc01a431 -size 54211 +oid sha256:9dd0a8e5040d5424636e6702e52106f5b214a756aa6be25262a44713f92200ac +size 56008 diff --git a/Content/Legumix/Weapon/Shotgun/Pistolet.uasset b/Content/Legumix/Weapon/Shotgun/Pistolet.uasset new file mode 100644 index 0000000..46848a0 --- /dev/null +++ b/Content/Legumix/Weapon/Shotgun/Pistolet.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39af226052b05a1dd0f1622a7f7a2976b4a4df2d4d70826927371fb57153aded +size 54256 diff --git a/Content/Legumix/Weapon/Shotgun/Plane002.uasset b/Content/Legumix/Weapon/Shotgun/Plane002.uasset new file mode 100644 index 0000000..e231db4 --- /dev/null +++ b/Content/Legumix/Weapon/Shotgun/Plane002.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f050d1901629deea421bd2b998ee660793cd69b7e32b553d0474b86b49828bde +size 113624 From bc4bc5f6e4add7d4f01f97d126e2c9a50428d140 Mon Sep 17 00:00:00 2001 From: TjgL Date: Fri, 24 Jan 2025 14:19:14 +0100 Subject: [PATCH 30/30] Removed Old weapons blueprints --- Content/Legumix/Weapon/BP_Bazoucorn.uasset | 3 --- Content/Legumix/Weapon/BP_Radivolver.uasset | 3 --- 2 files changed, 6 deletions(-) delete mode 100644 Content/Legumix/Weapon/BP_Bazoucorn.uasset delete mode 100644 Content/Legumix/Weapon/BP_Radivolver.uasset diff --git a/Content/Legumix/Weapon/BP_Bazoucorn.uasset b/Content/Legumix/Weapon/BP_Bazoucorn.uasset deleted file mode 100644 index c6b7034..0000000 --- a/Content/Legumix/Weapon/BP_Bazoucorn.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:444084ec12a0a30ee30f4edb07c0277d94408ac55ae151ec9d0899e90935cdac -size 6095 diff --git a/Content/Legumix/Weapon/BP_Radivolver.uasset b/Content/Legumix/Weapon/BP_Radivolver.uasset deleted file mode 100644 index b7332c1..0000000 --- a/Content/Legumix/Weapon/BP_Radivolver.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f69c9db90342e0aebf72a4fb844725eb3f0c3d4586902cacfed87339b2c90182 -size 11857