Implemented jump in slide
Signed-off-by: TjgL <lithmoneo@gmail.com>
This commit is contained in:
parent
4cb72bb499
commit
715dcf5a91
@ -265,3 +265,9 @@ void ULMMovementComponent::CrouchToggle(bool Toggle)
|
||||
|
||||
#pragma endregion
|
||||
|
||||
bool ULMMovementComponent::CanAttemptJump() const
|
||||
{
|
||||
return IsJumpAllowed() &&
|
||||
(IsMovingOnGround() || IsFalling()); // Falling included for double-jump and non-zero jump hold time, but validated by character.
|
||||
}
|
||||
|
||||
|
@ -105,6 +105,11 @@ int ALMPlayer::RemoveAmmo(const EAmmoType AmmoType, const int Count) const
|
||||
return WeaponManager->RemoveAmmo(AmmoType, Count);
|
||||
}
|
||||
|
||||
bool ALMPlayer::CanJumpInternal_Implementation() const
|
||||
{
|
||||
return JumpIsAllowedInternal();
|
||||
}
|
||||
|
||||
void ALMPlayer::SetWeaponManager(ULMWeaponManager* Manager)
|
||||
{
|
||||
UE_LOG(LogTemp, Warning, TEXT("Set weapon manager"))
|
||||
|
@ -92,5 +92,6 @@ private:
|
||||
void EnterSlide();
|
||||
void ExitSlide();
|
||||
void PhysSlide(float DeltaTime, int32 Iterations);
|
||||
bool GetSlideSurface(FHitResult& Hit) const;
|
||||
bool GetSlideSurface(FHitResult& Hit) const;
|
||||
virtual bool CanAttemptJump() const override;
|
||||
};
|
||||
|
@ -53,6 +53,8 @@ public:
|
||||
UFUNCTION(BlueprintCallable)
|
||||
int RemoveAmmo(EAmmoType AmmoType, int Count) const;
|
||||
|
||||
virtual bool CanJumpInternal_Implementation() const override;
|
||||
|
||||
protected:
|
||||
// Called when the game starts or when spawned
|
||||
virtual void BeginPlay() override;
|
||||
|
Reference in New Issue
Block a user