From cee5c8d08c223d3e8a873d5968b5998302993182 Mon Sep 17 00:00:00 2001 From: Louis Hobbs Date: Sun, 30 Jul 2023 15:23:30 +0100 Subject: [PATCH] Add ADS Spread Multiplier to RandomWeaponParameter generation --- Source/Nakatomi/RandomWeaponParameters.cpp | 1 + Source/Nakatomi/RandomWeaponParameters.h | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Source/Nakatomi/RandomWeaponParameters.cpp b/Source/Nakatomi/RandomWeaponParameters.cpp index b86de76..8e8e00a 100644 --- a/Source/Nakatomi/RandomWeaponParameters.cpp +++ b/Source/Nakatomi/RandomWeaponParameters.cpp @@ -17,6 +17,7 @@ FWeaponProperties URandomWeaponParameters::GenerateRandomWeaponProperties() weaponProperties.ProjectilesPerShot = FMath::RandRange(ProjectilePerShotMin, ProjectilePerShotMax); weaponProperties.ProjectileRange = FMath::FRandRange(ProjectileRangeMin, ProjectileRangeMax); weaponProperties.WeaponSpread = FMath::FRandRange(WeaponSpreadMin, WeaponSpreadMax); + weaponProperties.ADSWeaponSpreadMultiplier = FMath::FRandRange(ADSWeaponSpreadMulMin, ADSWeaponSpreadMulMax); if (IsAutomaticOverride) { diff --git a/Source/Nakatomi/RandomWeaponParameters.h b/Source/Nakatomi/RandomWeaponParameters.h index f7db289..c3221dd 100644 --- a/Source/Nakatomi/RandomWeaponParameters.h +++ b/Source/Nakatomi/RandomWeaponParameters.h @@ -81,6 +81,14 @@ public: DisplayName = "Max", meta = ( ClampMin = "0", ClampMax = "360" )) float WeaponSpreadMax = 15.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Random Weapon Parameters|ADS Weapon Spread Multiplier", + DisplayName = "Min", meta = (ClampMin = "0", ClampMax = "360")) + float ADSWeaponSpreadMulMin = 0.f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Random Weapon Parameters|ADS Weapon Spread Multiplier", + DisplayName = "Max", meta = (ClampMin = "0", ClampMax = "360")) + float ADSWeaponSpreadMulMax = 1.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Random Weapon Parameters|Is Automatic") bool IsAutomaticOverride = false;