Added FOV Changes back for proper zooming

This commit is contained in:
MH261677 2024-01-22 17:46:04 +00:00
parent 31e492e026
commit fb003af73f

View File

@ -430,7 +430,7 @@ void AEndlessVendettaCharacter::EquipSecondary()
//UE_LOG(LogTemp, Warning, TEXT("Secondary Weapon Is Hidden: %hhd"), SecondaryWeapon->IsHidden()); //UE_LOG(LogTemp, Warning, TEXT("Secondary Weapon Is Hidden: %hhd"), SecondaryWeapon->IsHidden());
GLog->Log("Secondary Weapon Equipped"); GLog->Log("Secondary Weapon Equipped");
} }
SecondaryWeaponActor->AttachToComponent(Mesh1P, AttachmentRules, FName("GripPoint")); SecondaryWeaponActor->AttachToComponent(Mesh1P, AttachmentRules, FName("PistolGripPoint"));
SecondaryWeapon = Cast<ABaseWeaponClass>(SecondaryWeaponActor); SecondaryWeapon = Cast<ABaseWeaponClass>(SecondaryWeaponActor);
SecondaryWeapon->SetActorHiddenInGame(false); SecondaryWeapon->SetActorHiddenInGame(false);
GetWorldTimerManager().ClearTimer(SecondaryWeapon->reloadTimerHandle); GetWorldTimerManager().ClearTimer(SecondaryWeapon->reloadTimerHandle);
@ -494,14 +494,14 @@ void AEndlessVendettaCharacter::GunRightClick()
bIsScoped = true; bIsScoped = true;
PrimaryWeapon->WeaponScopedFire(); PrimaryWeapon->WeaponScopedFire();
StartPrimaryWeaponADS(); StartPrimaryWeaponADS();
//this->GetFirstPersonCameraComponent()->SetFieldOfView(50); //change this number to a number you can change in editor eventually this->GetFirstPersonCameraComponent()->SetFieldOfView(50); //change this number to a number you can change in editor eventually
} }
if (IsValid(SecondaryWeapon) && !bIsScoped) if (IsValid(SecondaryWeapon) && !bIsScoped)
{ {
bIsScoped = true; bIsScoped = true;
SecondaryWeapon->WeaponScopedFire(); SecondaryWeapon->WeaponScopedFire();
StartSecondaryWeaponADS(); StartSecondaryWeaponADS();
//this->GetFirstPersonCameraComponent()->SetFieldOfView(50); //change this number to a number you can change in editor eventually this->GetFirstPersonCameraComponent()->SetFieldOfView(50); //change this number to a number you can change in editor eventually
} }
} }
@ -512,14 +512,14 @@ void AEndlessVendettaCharacter::StopGunRightClick()
bIsScoped = false; bIsScoped = false;
PrimaryWeapon->WeaponScopedFire(); PrimaryWeapon->WeaponScopedFire();
StopPrimaryWeaponADS(); StopPrimaryWeaponADS();
//this->GetFirstPersonCameraComponent()->SetFieldOfView(90); this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
} }
if (IsValid(SecondaryWeapon)) if (IsValid(SecondaryWeapon))
{ {
bIsScoped = false; bIsScoped = false;
SecondaryWeapon->WeaponScopedFire(); SecondaryWeapon->WeaponScopedFire();
StopSecondaryWeaponADS(); StopSecondaryWeaponADS();
//this->GetFirstPersonCameraComponent()->SetFieldOfView(90); this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
} }
} }