From 3eba180743883459deb2eb7b2b991c0e66d612dc Mon Sep 17 00:00:00 2001 From: Aleksey Date: Tue, 14 Nov 2023 14:58:16 +0300 Subject: [PATCH] Migrate to 5.3 version --- Source/TPS/TPS.Build.cs | 2 +- Source/TPS/Weapons/WeaponDefault.cpp | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Source/TPS/TPS.Build.cs b/Source/TPS/TPS.Build.cs index f1a5ef5..4be290b 100644 --- a/Source/TPS/TPS.Build.cs +++ b/Source/TPS/TPS.Build.cs @@ -8,6 +8,6 @@ public class TPS : ModuleRules { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; - PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "NavigationSystem", "AIModule", "PhysicsCore", "SlateCore", "Slate"}); + PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "XRBase", "NavigationSystem", "AIModule", "PhysicsCore", "SlateCore", "Slate"}); } } diff --git a/Source/TPS/Weapons/WeaponDefault.cpp b/Source/TPS/Weapons/WeaponDefault.cpp index cde0b1b..d8dfc8c 100644 --- a/Source/TPS/Weapons/WeaponDefault.cpp +++ b/Source/TPS/Weapons/WeaponDefault.cpp @@ -524,19 +524,18 @@ bool AWeaponDefault::CheckCanWeaponReload() int8 AWeaponDefault::GetAviableAmmoForReload() { - int8 AviableAmmoForWeapon = WeaponSetting.MaxRound; - if (GetOwner()) - { - UTPSInventoryComponent* MyInv = Cast(GetOwner()->GetComponentByClass(UTPSInventoryComponent::StaticClass())); - if (MyInv) - { - if (MyInv->CheckAmmoForWeapon(WeaponSetting.WeaponType, AviableAmmoForWeapon)) - { - AviableAmmoForWeapon = AviableAmmoForWeapon; - } - } - } - return AviableAmmoForWeapon; + int8 AviableAmmoForWeapon = WeaponSetting.MaxRound; + + if (GetOwner()) + { + UTPSInventoryComponent* MyInv = Cast(GetOwner()->GetComponentByClass(UTPSInventoryComponent::StaticClass())); + if (MyInv) + { + MyInv->CheckAmmoForWeapon(WeaponSetting.WeaponType, AviableAmmoForWeapon); + } + } + + return AviableAmmoForWeapon; } void AWeaponDefault::DestroyLazer_Multicast_Implementation(ATPS_Lazer* myLazer) -- GitLab