diff --git a/Content/Blueprints/Character/Animation/BlasterAnimBP.uasset b/Content/Blueprints/Character/Animation/BlasterAnimBP.uasset index 4f7fc00..6f20b2c 100644 Binary files a/Content/Blueprints/Character/Animation/BlasterAnimBP.uasset and b/Content/Blueprints/Character/Animation/BlasterAnimBP.uasset differ diff --git a/Content/Blueprints/Character/BP_BlasterCharacter.uasset b/Content/Blueprints/Character/BP_BlasterCharacter.uasset index d6fe353..42c4dda 100644 Binary files a/Content/Blueprints/Character/BP_BlasterCharacter.uasset and b/Content/Blueprints/Character/BP_BlasterCharacter.uasset differ diff --git a/Source/Blaster/Character/BlasterCharacter.cpp b/Source/Blaster/Character/BlasterCharacter.cpp index d622267..932891f 100644 --- a/Source/Blaster/Character/BlasterCharacter.cpp +++ b/Source/Blaster/Character/BlasterCharacter.cpp @@ -39,7 +39,7 @@ ABlasterCharacter::ABlasterCharacter() GetCharacterMovement()->NavAgentProps.bCanCrouch = true; GetCapsuleComponent()->SetCollisionResponseToChannel(ECollisionChannel::ECC_Camera, ECollisionResponse::ECR_Ignore); GetMesh()->SetCollisionResponseToChannel(ECollisionChannel::ECC_Camera, ECollisionResponse::ECR_Ignore); - + GetCharacterMovement()->RotationRate = FRotator(0.f, 850.f, 0.f); TurningInPlace = ETurningInPlace::ETIP_NotTurning; NetUpdateFrequency = 66.f; MinNetUpdateFrequency = 33.f; @@ -78,7 +78,7 @@ void ABlasterCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputCo { Super::SetupPlayerInputComponent(PlayerInputComponent); - PlayerInputComponent->BindAction("Jump", IE_Pressed, this, &ACharacter::Jump); + PlayerInputComponent->BindAction("Jump", IE_Pressed, this, &ABlasterCharacter::Jump); PlayerInputComponent->BindAction("Equip", IE_Pressed, this, &ABlasterCharacter::EquipButtonPressed); PlayerInputComponent->BindAction("Crouch", IE_Pressed, this, &ABlasterCharacter::CrouchButtonPressed); PlayerInputComponent->BindAction("Aim", IE_Pressed, this, &ABlasterCharacter::AimButtonPressed); @@ -206,6 +206,18 @@ void ABlasterCharacter::AimOffset(float DeltaTime) } } +void ABlasterCharacter::Jump() +{ + if (bIsCrouched) + { + UnCrouch(); + } + else + { + Super::Jump(); + } +} + void ABlasterCharacter::ServerEquipButtonPressed_Implementation() { EquipButtonPressed(); diff --git a/Source/Blaster/Character/BlasterCharacter.h b/Source/Blaster/Character/BlasterCharacter.h index 4b720a7..2a1ee1b 100644 --- a/Source/Blaster/Character/BlasterCharacter.h +++ b/Source/Blaster/Character/BlasterCharacter.h @@ -31,6 +31,7 @@ protected: void AimButtonPressed(); void AimButtonReleased(); void AimOffset(float DeltaTime); + virtual void Jump() override; private: UPROPERTY(VisibleAnywhere, Category="Camera") diff --git a/Source/Blaster/Components/CombatComponent.cpp b/Source/Blaster/Components/CombatComponent.cpp index 2b6ae79..6ee8fbd 100644 --- a/Source/Blaster/Components/CombatComponent.cpp +++ b/Source/Blaster/Components/CombatComponent.cpp @@ -14,7 +14,7 @@ UCombatComponent::UCombatComponent() PrimaryComponentTick.bCanEverTick = false; BaseWalkSpeed = 600.f; - AimWalkSpeed = 450.f; + AimWalkSpeed = 350.f; } void UCombatComponent::BeginPlay()