diff --git a/Content/Assets/MilitaryWeapSilver/Weapons/Sniper_Rifle_A.uasset b/Content/Assets/MilitaryWeapSilver/Weapons/Sniper_Rifle_A.uasset index 8581150..629e34a 100644 Binary files a/Content/Assets/MilitaryWeapSilver/Weapons/Sniper_Rifle_A.uasset and b/Content/Assets/MilitaryWeapSilver/Weapons/Sniper_Rifle_A.uasset differ diff --git a/Content/Assets/MilitaryWeapSilver/Weapons/Sniper_Rifle_A_Skeleton.uasset b/Content/Assets/MilitaryWeapSilver/Weapons/Sniper_Rifle_A_Skeleton.uasset index b10c472..45eec91 100644 Binary files a/Content/Assets/MilitaryWeapSilver/Weapons/Sniper_Rifle_A_Skeleton.uasset and b/Content/Assets/MilitaryWeapSilver/Weapons/Sniper_Rifle_A_Skeleton.uasset differ diff --git a/Content/Blueprints/Weapon/BP_SniperRifle.uasset b/Content/Blueprints/Weapon/BP_SniperRifle.uasset new file mode 100644 index 0000000..fb25901 Binary files /dev/null and b/Content/Blueprints/Weapon/BP_SniperRifle.uasset differ diff --git a/Content/Maps/BlasterMap.umap b/Content/Maps/BlasterMap.umap index bc43931..ce3c185 100644 Binary files a/Content/Maps/BlasterMap.umap and b/Content/Maps/BlasterMap.umap differ diff --git a/Source/Blaster/Character/BlasterCharacter.cpp b/Source/Blaster/Character/BlasterCharacter.cpp index a21229f..9cb83c1 100644 --- a/Source/Blaster/Character/BlasterCharacter.cpp +++ b/Source/Blaster/Character/BlasterCharacter.cpp @@ -279,8 +279,11 @@ void ABlasterCharacter::PlayReloadMontage() case EWeaponType::EWT_Shotgun: SectionName = FName("Rifle"); // Todo: create Shotgun reload montage section break; + case EWeaponType::EWT_SniperRifle: + SectionName = FName("Rifle"); // Todo: create Sniper reload montage section + break; default: - SectionName = FName("Rifle"); + SectionName = FName("Rifle"); break; } diff --git a/Source/Blaster/Components/CombatComponent.cpp b/Source/Blaster/Components/CombatComponent.cpp index 9161d68..b8e545b 100644 --- a/Source/Blaster/Components/CombatComponent.cpp +++ b/Source/Blaster/Components/CombatComponent.cpp @@ -459,4 +459,5 @@ void UCombatComponent::InitializeCarriedAmmo() CarriedAmmoMap.Emplace(EWeaponType::EWT_Pistol, StartingPistolAmmo); CarriedAmmoMap.Emplace(EWeaponType::EWT_SubmachineGun, StartingSMGAmmo); CarriedAmmoMap.Emplace(EWeaponType::EWT_Shotgun, StartingShotgunAmmo); + CarriedAmmoMap.Emplace(EWeaponType::EWT_SniperRifle, StartingSniperAmmo); } diff --git a/Source/Blaster/Components/CombatComponent.h b/Source/Blaster/Components/CombatComponent.h index 0bc841f..822844a 100644 --- a/Source/Blaster/Components/CombatComponent.h +++ b/Source/Blaster/Components/CombatComponent.h @@ -133,6 +133,9 @@ private: UPROPERTY(EditAnywhere) int32 StartingShotgunAmmo = 15; + UPROPERTY(EditAnywhere) + int32 StartingSniperAmmo = 15; + void InitializeCarriedAmmo(); UPROPERTY(ReplicatedUsing=OnRep_CombatState) diff --git a/Source/Blaster/Weapon/WeaponTypes.h b/Source/Blaster/Weapon/WeaponTypes.h index eae6d80..90f512e 100644 --- a/Source/Blaster/Weapon/WeaponTypes.h +++ b/Source/Blaster/Weapon/WeaponTypes.h @@ -10,6 +10,7 @@ enum class EWeaponType: uint8 EWT_Pistol UMETA(DisplayName="Pistol"), EWT_SubmachineGun UMETA(DisplayName="Submachine Gun"), EWT_Shotgun UMETA(DisplayName="Shotgun"), + EWT_SniperRifle UMETA(DisplayName="Sniper Rifle"), EWT_MAX UMETA(DisplayName="DefaultMAX") }; \ No newline at end of file