diff --git a/Content/Physicals/PM_Character.uasset b/Content/Physicals/PM_Character.uasset index 16a310610..47024d69a 100644 Binary files a/Content/Physicals/PM_Character.uasset and b/Content/Physicals/PM_Character.uasset differ diff --git a/Content/Physicals/PM_Concrete.uasset b/Content/Physicals/PM_Concrete.uasset index 5650068b0..33f84d5d8 100644 Binary files a/Content/Physicals/PM_Concrete.uasset and b/Content/Physicals/PM_Concrete.uasset differ diff --git a/Content/Physicals/PM_Glass.uasset b/Content/Physicals/PM_Glass.uasset index 0ae21859c..1dcb6434c 100644 Binary files a/Content/Physicals/PM_Glass.uasset and b/Content/Physicals/PM_Glass.uasset differ diff --git a/Content/Physicals/PM_Metal.uasset b/Content/Physicals/PM_Metal.uasset index 0c9423eb9..8046e3e6e 100644 Binary files a/Content/Physicals/PM_Metal.uasset and b/Content/Physicals/PM_Metal.uasset differ diff --git a/Content/Physicals/PM_Mud.uasset b/Content/Physicals/PM_Mud.uasset index cf312e7d1..b2af40255 100644 Binary files a/Content/Physicals/PM_Mud.uasset and b/Content/Physicals/PM_Mud.uasset differ diff --git a/Content/Physicals/PM_Paper.uasset b/Content/Physicals/PM_Paper.uasset index ec376088f..bda342739 100644 Binary files a/Content/Physicals/PM_Paper.uasset and b/Content/Physicals/PM_Paper.uasset differ diff --git a/Content/Physicals/PM_Rock.uasset b/Content/Physicals/PM_Rock.uasset index 15dc0f313..1cdb0dc3d 100644 Binary files a/Content/Physicals/PM_Rock.uasset and b/Content/Physicals/PM_Rock.uasset differ diff --git a/Content/Physicals/PM_Wood.uasset b/Content/Physicals/PM_Wood.uasset index 9f3e26a0b..0b2cfcf75 100644 Binary files a/Content/Physicals/PM_Wood.uasset and b/Content/Physicals/PM_Wood.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Concrete/concrete_impact_bullet1.uasset b/Content/Vefects/Audio/Firearms/Concrete/concrete_impact_bullet1.uasset new file mode 100644 index 000000000..9db30aabd Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Concrete/concrete_impact_bullet1.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Concrete/concrete_impact_bullet2.uasset b/Content/Vefects/Audio/Firearms/Concrete/concrete_impact_bullet2.uasset new file mode 100644 index 000000000..4f34799fc Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Concrete/concrete_impact_bullet2.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Concrete/concrete_impact_bullet3.uasset b/Content/Vefects/Audio/Firearms/Concrete/concrete_impact_bullet3.uasset new file mode 100644 index 000000000..6e0dc21e7 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Concrete/concrete_impact_bullet3.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Concrete/concrete_impact_bullet4.uasset b/Content/Vefects/Audio/Firearms/Concrete/concrete_impact_bullet4.uasset new file mode 100644 index 000000000..78152f781 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Concrete/concrete_impact_bullet4.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet1.uasset b/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet1.uasset new file mode 100644 index 000000000..c8b8792d3 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet1.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet2.uasset b/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet2.uasset new file mode 100644 index 000000000..ab5af357b Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet2.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet3.uasset b/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet3.uasset new file mode 100644 index 000000000..2a4fecf8b Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet3.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet4.uasset b/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet4.uasset new file mode 100644 index 000000000..5aedce7f8 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet4.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet5.uasset b/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet5.uasset new file mode 100644 index 000000000..3beaa1e7b Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Flesh/flesh_impact_bullet5.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Glass/glass_impact_bullet1.uasset b/Content/Vefects/Audio/Firearms/Glass/glass_impact_bullet1.uasset new file mode 100644 index 000000000..6f6279e85 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Glass/glass_impact_bullet1.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Glass/glass_impact_bullet2.uasset b/Content/Vefects/Audio/Firearms/Glass/glass_impact_bullet2.uasset new file mode 100644 index 000000000..d46971508 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Glass/glass_impact_bullet2.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Glass/glass_impact_bullet3.uasset b/Content/Vefects/Audio/Firearms/Glass/glass_impact_bullet3.uasset new file mode 100644 index 000000000..d5f659931 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Glass/glass_impact_bullet3.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Glass/glass_impact_bullet4.uasset b/Content/Vefects/Audio/Firearms/Glass/glass_impact_bullet4.uasset new file mode 100644 index 000000000..e66701eec Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Glass/glass_impact_bullet4.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_01.uasset b/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_01.uasset new file mode 100644 index 000000000..b63a30a08 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_01.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_02.uasset b/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_02.uasset new file mode 100644 index 000000000..60102eaf7 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_02.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_03.uasset b/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_03.uasset new file mode 100644 index 000000000..447c7ccc0 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_03.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_04.uasset b/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_04.uasset new file mode 100644 index 000000000..5b2cd8dd3 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_04.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_05.uasset b/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_05.uasset new file mode 100644 index 000000000..818b28e5a Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_05.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_06.uasset b/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_06.uasset new file mode 100644 index 000000000..fae2b8cc7 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Metal/bullet_metal_solid_06.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Mud/sand_impact_bullet1.uasset b/Content/Vefects/Audio/Firearms/Mud/sand_impact_bullet1.uasset new file mode 100644 index 000000000..8c886c0f4 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Mud/sand_impact_bullet1.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Mud/sand_impact_bullet2.uasset b/Content/Vefects/Audio/Firearms/Mud/sand_impact_bullet2.uasset new file mode 100644 index 000000000..ad84666f8 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Mud/sand_impact_bullet2.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Mud/sand_impact_bullet3.uasset b/Content/Vefects/Audio/Firearms/Mud/sand_impact_bullet3.uasset new file mode 100644 index 000000000..e285c5895 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Mud/sand_impact_bullet3.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Mud/sand_impact_bullet4.uasset b/Content/Vefects/Audio/Firearms/Mud/sand_impact_bullet4.uasset new file mode 100644 index 000000000..537eb456c Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Mud/sand_impact_bullet4.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet1.uasset b/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet1.uasset new file mode 100644 index 000000000..18c5d3aaf Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet1.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet2.uasset b/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet2.uasset new file mode 100644 index 000000000..5688daaa4 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet2.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet3.uasset b/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet3.uasset new file mode 100644 index 000000000..8783dea18 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet3.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet4.uasset b/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet4.uasset new file mode 100644 index 000000000..50a55b641 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet4.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet5.uasset b/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet5.uasset new file mode 100644 index 000000000..5800962d1 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Paper/cardboard_box_impact_bullet5.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Rock/ceiling_tile_impact_bullet1.uasset b/Content/Vefects/Audio/Firearms/Rock/ceiling_tile_impact_bullet1.uasset new file mode 100644 index 000000000..15396b6ae Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Rock/ceiling_tile_impact_bullet1.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Rock/ceiling_tile_impact_bullet2.uasset b/Content/Vefects/Audio/Firearms/Rock/ceiling_tile_impact_bullet2.uasset new file mode 100644 index 000000000..6a558f515 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Rock/ceiling_tile_impact_bullet2.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Rock/ceiling_tile_impact_bullet3.uasset b/Content/Vefects/Audio/Firearms/Rock/ceiling_tile_impact_bullet3.uasset new file mode 100644 index 000000000..e4cb87b94 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Rock/ceiling_tile_impact_bullet3.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Rock/default_impact_bullet1.uasset b/Content/Vefects/Audio/Firearms/Rock/default_impact_bullet1.uasset new file mode 100644 index 000000000..d4e08a959 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Rock/default_impact_bullet1.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Rock/default_impact_bullet2.uasset b/Content/Vefects/Audio/Firearms/Rock/default_impact_bullet2.uasset new file mode 100644 index 000000000..2e5158f49 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Rock/default_impact_bullet2.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Rock/default_impact_bullet3.uasset b/Content/Vefects/Audio/Firearms/Rock/default_impact_bullet3.uasset new file mode 100644 index 000000000..d84955f4a Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Rock/default_impact_bullet3.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Rock/default_impact_bullet4.uasset b/Content/Vefects/Audio/Firearms/Rock/default_impact_bullet4.uasset new file mode 100644 index 000000000..da50d5a1c Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Rock/default_impact_bullet4.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Wood/wood_box_impact_bullet1.uasset b/Content/Vefects/Audio/Firearms/Wood/wood_box_impact_bullet1.uasset new file mode 100644 index 000000000..ef24274f7 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Wood/wood_box_impact_bullet1.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Wood/wood_box_impact_bullet2.uasset b/Content/Vefects/Audio/Firearms/Wood/wood_box_impact_bullet2.uasset new file mode 100644 index 000000000..ab4581dbd Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Wood/wood_box_impact_bullet2.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Wood/wood_box_impact_bullet3.uasset b/Content/Vefects/Audio/Firearms/Wood/wood_box_impact_bullet3.uasset new file mode 100644 index 000000000..3e375c627 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Wood/wood_box_impact_bullet3.uasset differ diff --git a/Content/Vefects/Audio/Firearms/Wood/wood_box_impact_bullet4.uasset b/Content/Vefects/Audio/Firearms/Wood/wood_box_impact_bullet4.uasset new file mode 100644 index 000000000..ec8628cc4 Binary files /dev/null and b/Content/Vefects/Audio/Firearms/Wood/wood_box_impact_bullet4.uasset differ diff --git a/Content/Vefects/Audio/hpain1.uasset b/Content/Vefects/Audio/hpain1.uasset new file mode 100644 index 000000000..052c38c94 Binary files /dev/null and b/Content/Vefects/Audio/hpain1.uasset differ diff --git a/Source/Cloud9/Physicals/Cloud9PhysicalMaterial.cpp b/Source/Cloud9/Physicals/Cloud9PhysicalMaterial.cpp index a3abff35d..22a0c2d49 100644 --- a/Source/Cloud9/Physicals/Cloud9PhysicalMaterial.cpp +++ b/Source/Cloud9/Physicals/Cloud9PhysicalMaterial.cpp @@ -18,6 +18,7 @@ UCloud9PhysicalMaterial::UCloud9PhysicalMaterial() FirearmBackgroundDecalRotationMax = 180.0f; FirearmBackgroundDecalProbability = 0.5f; FirearmBackgroundDecalMaxDistance = 200.0f; + FirearmHitSoundVolume = 1.0f; GrenadeDecalSize = {8.0f, 8.0f, 8.0f}; MeleeDecalSize = {8.0f, 8.0f, 8.0f}; @@ -52,6 +53,10 @@ FRotator UCloud9PhysicalMaterial::GetFirearmDecalRotation(FVector Normal) const return GetNormalSurfaceRotation(Normal, RandomRotation); } +USoundBase* UCloud9PhysicalMaterial::GetRandomFirearmHitSound() const { return GetRandomItem(FirearmHitSounds); } + +float UCloud9PhysicalMaterial::GetFirearmHitSoundVolume() const { return FirearmHitSoundVolume; } + UMaterialInterface* UCloud9PhysicalMaterial::GetRandomBackgroundDecal() const { return GetRandomItem(FirearmBackgroundDecals); diff --git a/Source/Cloud9/Physicals/Cloud9PhysicalMaterial.h b/Source/Cloud9/Physicals/Cloud9PhysicalMaterial.h index 860e31df5..2ad29419f 100644 --- a/Source/Cloud9/Physicals/Cloud9PhysicalMaterial.h +++ b/Source/Cloud9/Physicals/Cloud9PhysicalMaterial.h @@ -29,6 +29,8 @@ class CLOUD9_API UCloud9PhysicalMaterial : public UPhysicalMaterial FVector GetFirearmDecalSize() const; FRotator GetFirearmDecalRotation(FVector Normal) const; + USoundBase* GetRandomFirearmHitSound() const; + float GetFirearmHitSoundVolume() const; protected: UPROPERTY(EditDefaultsOnly, Category="Firearm Hit Decal") @@ -81,6 +83,13 @@ class CLOUD9_API UCloud9PhysicalMaterial : public UPhysicalMaterial meta=(UIMin="0", UIMax="1000", ClampMin="0", ClampMax="1000")) float FirearmBackgroundDecalMaxDistance; + UPROPERTY(EditDefaultsOnly, Category="Firearm Hit Sound") + TSet FirearmHitSounds; + + UPROPERTY(EditDefaultsOnly, Category="Firearm Hit Sound", + meta=(UIMin="0", UIMax="10.0", ClampMin="0", ClampMax="10.0")) + float FirearmHitSoundVolume; + UPROPERTY(EditDefaultsOnly, Category="Grenade Hit Decal") TSet GrenadeDecals; diff --git a/Source/Cloud9/Weapon/Classes/Cloud9WeaponFirearm.cpp b/Source/Cloud9/Weapon/Classes/Cloud9WeaponFirearm.cpp index 7a8e12c4d..91f7b65a6 100644 --- a/Source/Cloud9/Weapon/Classes/Cloud9WeaponFirearm.cpp +++ b/Source/Cloud9/Weapon/Classes/Cloud9WeaponFirearm.cpp @@ -40,6 +40,7 @@ #include "Cloud9/Character/Damages/FirearmDamageType.h" #include "Cloud9/Game/Cloud9DeveloperSettings.h" #include "Cloud9/Physicals/Cloud9PhysicalMaterial.h" +#include "Cloud9/Tools/Extensions/USoundBase.h" #include "Cloud9/Weapon/Sounds/Cloud9SoundPlayer.h" #include "Cloud9/Weapon/Structures/WeaponConfig.h" #include "Cloud9/Weapon/Tables/WeaponTableFirearm.h" @@ -509,6 +510,14 @@ EFirearmFireStatus ACloud9WeaponFirearm::Fire( }; } + if (let HitSound = PhysicalMaterial->GetRandomFirearmHitSound(); IsValid(HitSound)) + { + HitSound | EUSoundBase::PlaySoundAtLocation{ + .Location = LineHit.Location, + .VolumeMultiplier = Settings->Volume * PhysicalMaterial->GetFirearmHitSoundVolume() + }; + } + if (let BackgroundDecal = PhysicalMaterial->GetRandomBackgroundDecal(); IsValid(BackgroundDecal)) { if (PhysicalMaterial->TestBackgroundDecalProbability())