Merge branch 'head-bobbing' into dev

# Conflicts:
#	EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
#	EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset
#	EndlessVendetta/Content/Levels/TrainingFacility.umap
This commit is contained in:
Rafal Swierczek 2024-01-19 15:55:14 +00:00
commit d5f98d5d39
7 changed files with 16 additions and 8 deletions

View File

@ -98,7 +98,6 @@ void AEndlessVendettaCharacter::Tick(float DeltaTime)
} }
else if (MoveGroundSpeed <= 0) else if (MoveGroundSpeed <= 0)
{ {
this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
bIsPlayerMoving = false; bIsPlayerMoving = false;
} }
if (bPressedJump) if (bPressedJump)
@ -117,7 +116,6 @@ void AEndlessVendettaCharacter::Tick(float DeltaTime)
if (CurrentStamina <= 0.0f) if (CurrentStamina <= 0.0f)
{ {
bIsPlayerSprinting = false; bIsPlayerSprinting = false;
this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
CurrentStamina = 0.0f; CurrentStamina = 0.0f;
CharacterMovement->MaxWalkSpeed = OriginalWalkSpeed; CharacterMovement->MaxWalkSpeed = OriginalWalkSpeed;
} }
@ -584,7 +582,6 @@ void AEndlessVendettaCharacter::Sprint()
if (MoveGroundSpeed > 0) if (MoveGroundSpeed > 0)
{ {
CharacterMovement->MaxWalkSpeed = SprintSpeed; CharacterMovement->MaxWalkSpeed = SprintSpeed;
this->GetFirstPersonCameraComponent()->SetFieldOfView(100);
} }
} }
} }
@ -596,7 +593,6 @@ void AEndlessVendettaCharacter::StopSprint()
{ {
UE_LOG(LogTemp, Display, TEXT("Player stopped sprinting")); UE_LOG(LogTemp, Display, TEXT("Player stopped sprinting"));
CharacterMovement->MaxWalkSpeed = OriginalWalkSpeed; CharacterMovement->MaxWalkSpeed = OriginalWalkSpeed;
this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
} }
} }
@ -620,7 +616,6 @@ void AEndlessVendettaCharacter::Jumping()
void AEndlessVendettaCharacter::StopJump() void AEndlessVendettaCharacter::StopJump()
{ {
Super::StopJumping(); Super::StopJumping();
UE_LOG(LogTemp, Display, TEXT("Player has stopped jumping"));
bHasPlayerJumped = false; bHasPlayerJumped = false;
} }

View File

@ -136,7 +136,7 @@ public:
bool bIsPlayerMoving = false; bool bIsPlayerMoving = false;
UPROPERTY(VisibleAnywhere) UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
bool bIsPlayerSprinting = false; bool bIsPlayerSprinting = false;
double MoveGroundSpeed; double MoveGroundSpeed;
@ -188,6 +188,7 @@ public:
void Jumping(); void Jumping();
void StopJump(); void StopJump();
UPROPERTY(BlueprintReadWrite)
bool bHasPlayerJumped = false; bool bHasPlayerJumped = false;
UArrowComponent* ScopedLocationArrow; UArrowComponent* ScopedLocationArrow;