Implemented Unequipping Gadgets when Equipping Gun
This commit is contained in:
parent
fa8c6f681c
commit
6cf1fc1869
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:83a5888b61a03cd032e12e5ed42b2aa5f13ca709b06b50ed9726e7404419cfea
|
oid sha256:1c4186b567ed68cae389b7f52baee361aec478d019d5b727ecc6132b12c8d02b
|
||||||
size 29907
|
size 29907
|
||||||
|
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/Props/MaterialSphere.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Props/MaterialSphere.uasset
(Stored with Git LFS)
Binary file not shown.
@ -131,6 +131,12 @@ void AEndlessVendettaCharacter::ToggleCombat()
|
|||||||
//When 1 is pressed it calls EquipPrimary
|
//When 1 is pressed it calls EquipPrimary
|
||||||
void AEndlessVendettaCharacter::EquipPrimary()
|
void AEndlessVendettaCharacter::EquipPrimary()
|
||||||
{
|
{
|
||||||
|
// Marcel I respect you, like you and what not, please for the love of god don't touch these two guard clauses
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
if (GadgetManager->IsReconEquipped() && !GadgetManager->TryToUnequipRecon()) return;/////////////////////////
|
||||||
|
if (GadgetManager->IsCombatEquipped() && !GadgetManager->TryToUnequipCombat()) return;///////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
//If primary weapon is not there but secondary weapon is it will call equipSecondary.
|
//If primary weapon is not there but secondary weapon is it will call equipSecondary.
|
||||||
//EquipSecondary checks and sees that secondary is there so it will call to destroy itself
|
//EquipSecondary checks and sees that secondary is there so it will call to destroy itself
|
||||||
//Code goes back and sees primary weapon is not there anymore and spawns it in.
|
//Code goes back and sees primary weapon is not there anymore and spawns it in.
|
||||||
@ -162,6 +168,12 @@ void AEndlessVendettaCharacter::EquipPrimary()
|
|||||||
|
|
||||||
void AEndlessVendettaCharacter::EquipSecondary()
|
void AEndlessVendettaCharacter::EquipSecondary()
|
||||||
{
|
{
|
||||||
|
// Marcel I respect you, like you and what not, please for the love of god don't touch these two guard clauses
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
if (GadgetManager->IsReconEquipped() && !GadgetManager->TryToUnequipRecon()) return;/////////////////////////
|
||||||
|
if (GadgetManager->IsCombatEquipped() && !GadgetManager->TryToUnequipCombat()) return;///////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
if (!IsValid(SecondaryWeapon))
|
if (!IsValid(SecondaryWeapon))
|
||||||
{
|
{
|
||||||
if (IsValid(PrimaryWeapon)) EquipPrimary();
|
if (IsValid(PrimaryWeapon)) EquipPrimary();
|
||||||
|
Loading…
Reference in New Issue
Block a user