diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset index ccadb20d..6b39a895 100644 --- a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ffeaf82a7decde92c259f80ff3253372f5659e0c4008a59b40b774fdc67fba50 -size 133260 +oid sha256:f359d7134293a9a70d4e307b1376b8db280adcc9b05732bac0df0312eac3907b +size 372831 diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset index d5d8a380..a67cfd74 100644 --- a/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0e23dc0f3a3090c3b7bcca01e9123e96b564867646215f48b4871eeb8fc157b5 -size 127141 +oid sha256:ddfeb9078755b405062e9752c733edef8a3ffbb8b12189ef5aee0e306dbf83ac +size 127463 diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Pistols/BP_BasePistolWeapon.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Pistols/BP_BasePistolWeapon.uasset index f516b5b6..b601e4d1 100644 --- a/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Pistols/BP_BasePistolWeapon.uasset +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Pistols/BP_BasePistolWeapon.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9b033aff080a0e32f37aed5b6a02c7e31aa216dc029b70518a5754cd12feb70 -size 127890 +oid sha256:5cf8e448165a2383133d02027abec6c7eb114a93420066f346004ecb9eba0a06 +size 128604 diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Shotguns/BP_BaseShotgun.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Shotguns/BP_BaseShotgun.uasset index bcb197a6..b82510b8 100644 --- a/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Shotguns/BP_BaseShotgun.uasset +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Shotguns/BP_BaseShotgun.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:678f82f6a80f2cf13d5d74b24d768045b58bb9b030f70510a095a90f40fb0d29 -size 126463 +oid sha256:77fc87f2895edafaa9d2192aae11f1d401bd041ac27c83283bcacee09e495bf1 +size 127352 diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Snipers/BaseSniper.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Snipers/BaseSniper.uasset index deebf3b8..160e1ccd 100644 --- a/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Snipers/BaseSniper.uasset +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Snipers/BaseSniper.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:02029898c211501ff276d6996d6fddb8fdbb470aebc1f7f4bb26bfcfbd1928a0 -size 126654 +oid sha256:dca631cf0e3babb62af456d05321d4ae0718d803bfdd136fd6e571b873b4293f +size 127334 diff --git a/EndlessVendetta/Content/__ExternalActors__/Levels/DoorTestLevel/0/24/JBARER4CBJ0QZT5CZY8ID6.uasset b/EndlessVendetta/Content/__ExternalActors__/Levels/DoorTestLevel/0/24/JBARER4CBJ0QZT5CZY8ID6.uasset index 60e887d3..994f751d 100644 --- a/EndlessVendetta/Content/__ExternalActors__/Levels/DoorTestLevel/0/24/JBARER4CBJ0QZT5CZY8ID6.uasset +++ b/EndlessVendetta/Content/__ExternalActors__/Levels/DoorTestLevel/0/24/JBARER4CBJ0QZT5CZY8ID6.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:461d223dbbabb2824e1ad8bac0d5732bb55d731e0b74285715f207e458b609f4 -size 6878 +oid sha256:38a124733a66571be53cf1da2c13425bd30c042d6b609cca325fc630bf0de323 +size 6992 diff --git a/EndlessVendetta/Content/__ExternalActors__/Levels/DoorTestLevel/0/GQ/QPISORMXEPSB0MNOUMBIZ4.uasset b/EndlessVendetta/Content/__ExternalActors__/Levels/DoorTestLevel/0/GQ/QPISORMXEPSB0MNOUMBIZ4.uasset new file mode 100644 index 00000000..eae0f773 --- /dev/null +++ b/EndlessVendetta/Content/__ExternalActors__/Levels/DoorTestLevel/0/GQ/QPISORMXEPSB0MNOUMBIZ4.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e1d15b8a2648519fcec0059b248d90fc57e5a576bad5418d6c81220017272b7 +size 7082 diff --git a/EndlessVendetta/Content/__ExternalActors__/Levels/DoorTestLevel/2/ZU/URNIY7YZNRDH4QY14A8BN4.uasset b/EndlessVendetta/Content/__ExternalActors__/Levels/DoorTestLevel/2/ZU/URNIY7YZNRDH4QY14A8BN4.uasset new file mode 100644 index 00000000..667b9993 --- /dev/null +++ b/EndlessVendetta/Content/__ExternalActors__/Levels/DoorTestLevel/2/ZU/URNIY7YZNRDH4QY14A8BN4.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9b1da883f91278772e9215096e70c10d298b9416f1b392476303d0f8235dbe1 +size 6952 diff --git a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp index c2c87400..8d5021e9 100644 --- a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp @@ -491,29 +491,17 @@ void AEndlessVendettaCharacter::GunRightClick() { if (IsValid(PrimaryWeapon) && !bIsScoped) { - for (UActorComponent* actorComp : this->GetComponentsByTag(UArrowComponent::StaticClass(), FName("ScopedLocationArrow"))) - { - ScopedLocationArrow = Cast(actorComp); - break; - } - if (!IsValid(ScopedLocationArrow)) return; - PrimaryWeapon->SetActorLocation(ScopedLocationArrow->GetComponentLocation()); bIsScoped = true; PrimaryWeapon->WeaponScopedFire(); - this->GetFirstPersonCameraComponent()->SetFieldOfView(50); //change this number to a number you can change in editor eventually + StartPrimaryWeaponADS(); + //this->GetFirstPersonCameraComponent()->SetFieldOfView(50); //change this number to a number you can change in editor eventually } if (IsValid(SecondaryWeapon) && !bIsScoped) { - for (UActorComponent* actorComp : this->GetComponentsByTag(UArrowComponent::StaticClass(), FName("ScopedLocationArrow"))) - { - ScopedLocationArrow = Cast(actorComp); - break; - } - if (!IsValid(ScopedLocationArrow)) return; bIsScoped = true; SecondaryWeapon->WeaponScopedFire(); - SecondaryWeapon->SetActorLocation(ScopedLocationArrow->GetComponentLocation()); - this->GetFirstPersonCameraComponent()->SetFieldOfView(50); //change this number to a number you can change in editor eventually + StartSecondaryWeaponADS(); + //this->GetFirstPersonCameraComponent()->SetFieldOfView(50); //change this number to a number you can change in editor eventually } } @@ -523,15 +511,15 @@ void AEndlessVendettaCharacter::StopGunRightClick() { bIsScoped = false; PrimaryWeapon->WeaponScopedFire(); - PrimaryWeapon->SetActorRelativeLocation(FVector(0, 0, 0)); - this->GetFirstPersonCameraComponent()->SetFieldOfView(90); + StopPrimaryWeaponADS(); + //this->GetFirstPersonCameraComponent()->SetFieldOfView(90); } if (IsValid(SecondaryWeapon)) { bIsScoped = false; SecondaryWeapon->WeaponScopedFire(); - SecondaryWeapon->SetActorRelativeLocation(FVector(0, 0, 0)); - this->GetFirstPersonCameraComponent()->SetFieldOfView(90); + StopSecondaryWeaponADS(); + //this->GetFirstPersonCameraComponent()->SetFieldOfView(90); } } diff --git a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h index ca279fa5..29d4767a 100644 --- a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h +++ b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h @@ -118,6 +118,15 @@ public: bool bIsSecondaryWeaponCreated = false; bool bIsWeaponPickedUp = false; + UFUNCTION(BlueprintImplementableEvent) + void StartPrimaryWeaponADS(); + UFUNCTION(BlueprintImplementableEvent) + void StopPrimaryWeaponADS(); + UFUNCTION(BlueprintImplementableEvent) + void StartSecondaryWeaponADS(); + UFUNCTION(BlueprintImplementableEvent) + void StopSecondaryWeaponADS(); + protected: virtual void BeginPlay() override; virtual void Tick(float DeltaTime) override;