Add WeaponSpreadModifier to EnemyCharacters
This commit is contained in:
parent
3229a2cf7b
commit
35a8247bf6
|
@ -108,6 +108,7 @@ void AEnemyCharacter::CalculateHits(TArray<FHitResult>* hits, FVector* dir)
|
|||
const int32 RandomSeed = FMath::Rand();
|
||||
FRandomStream WeaponRandomStream(RandomSeed);
|
||||
const float Spread = CurrentWeapon->GetWeaponProperties()->WeaponSpread;
|
||||
const float Spread = CurrentWeapon->GetWeaponProperties()->WeaponSpread * WeaponSpreadModifier;
|
||||
const float Range = CurrentWeapon->GetWeaponProperties()->ProjectileRange;
|
||||
|
||||
// Calculate starting position and direction
|
||||
|
|
|
@ -32,6 +32,9 @@ public:
|
|||
UPROPERTY(EditAnywhere)
|
||||
UWidgetComponent* HealthbarWidgetComponent;
|
||||
|
||||
UPROPERTY(EditAnywhere)
|
||||
float WeaponSpreadModifier = 1.0f;
|
||||
|
||||
private:
|
||||
UPROPERTY(EditDefaultsOnly, Meta = (AllowPrivateAccess = "true"))
|
||||
UBehaviorTree* BehaviourTree;
|
||||
|
|
Loading…
Reference in New Issue