diff --git a/SwordNGun/Content/Characters/Protagonist/Animations/NewProtag_AnimBP.uasset b/SwordNGun/Content/Characters/Protagonist/Animations/NewProtag_AnimBP.uasset new file mode 100644 index 0000000..245c0b8 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/Animations/NewProtag_AnimBP.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2afc51cc43713c9c0b199224b19b02a8cb70745ec2bc4318383a0d4681912d58 +size 798845 diff --git a/SwordNGun/Content/Characters/Protagonist/BP_NewProtag.uasset b/SwordNGun/Content/Characters/Protagonist/BP_NewProtag.uasset new file mode 100644 index 0000000..495786a --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/BP_NewProtag.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9243affa8259717c04da6bdd8ff7270bf0104e828d739fa31016e903a45fe8b4 +size 118953 diff --git a/SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset b/SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset index 1542da7..a1c581c 100644 --- a/SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset +++ b/SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0bd518d9e5ac0d902498ac86db052d5dbe04cc86a511297d51649b621efa9498 -size 211647 +oid sha256:2717da35d9ce4517ee1e4ca8d66335c3546a53be67ea20382123c744e7885e63 +size 209596 diff --git a/SwordNGun/Content/Core/GameModes/BP_TestGameMode.uasset b/SwordNGun/Content/Core/GameModes/BP_TestGameMode.uasset index 4f91467..7652b31 100644 --- a/SwordNGun/Content/Core/GameModes/BP_TestGameMode.uasset +++ b/SwordNGun/Content/Core/GameModes/BP_TestGameMode.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7df2e2c7ef841e470ac63273c83a37235caee2d89d1cd1c35cb82f21dbe5c577 -size 18685 +oid sha256:f8271a597c08b1f383e260f699ac637e759a2edfb0802a06874c5ab1140fe154 +size 18459 diff --git a/SwordNGun/Content/Maps/MovementTest.umap b/SwordNGun/Content/Maps/MovementTest.umap index 6cd4f17..a7a39be 100644 --- a/SwordNGun/Content/Maps/MovementTest.umap +++ b/SwordNGun/Content/Maps/MovementTest.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ec67582a7d62404f5176696a932bab2ce08d14c18fbf1aea9fd0db4249dec2f +oid sha256:956fdf8e2e0fa6920cc4b70fb88a4166cab3d7bcb0e513dcedac5ba13497cd9b size 949560 diff --git a/SwordNGun/Source/SwordNGun/Private/Characters/SNGCharacterBase.cpp b/SwordNGun/Source/SwordNGun/Private/Characters/SNGCharacterBase.cpp index 384ab61..a35452f 100644 Binary files a/SwordNGun/Source/SwordNGun/Private/Characters/SNGCharacterBase.cpp and b/SwordNGun/Source/SwordNGun/Private/Characters/SNGCharacterBase.cpp differ diff --git a/SwordNGun/Source/SwordNGun/Private/Characters/SNGCharacterBase_DEPRECATED.cpp b/SwordNGun/Source/SwordNGun/Private/Characters/SNGCharacterBase_DEPRECATED.cpp new file mode 100644 index 0000000..a785209 --- /dev/null +++ b/SwordNGun/Source/SwordNGun/Private/Characters/SNGCharacterBase_DEPRECATED.cpp @@ -0,0 +1,265 @@ +// Project Sword & Gun Copyright © 2021 Kevin Poretti + + +#include "Characters/SNGCharacterBase_DEPRECATED.h" + +#include "Components/CapsuleComponent.h" +#include "GameFramework/PawnMovementComponent.h" +#include "Kismet/KismetMathLibrary.h" +#include "SwordNGun/SwordNGun.h" + +// Sets default values +ASNGCharacterBase_DEPRECATED::ASNGCharacterBase_DEPRECATED(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer.SetDefaultSubobjectClass(ACharacter::CharacterMovementComponentName)) +{ + // By default calls Tick() every frame. + PrimaryActorTick.bCanEverTick = true; + + StateMachineComponent = CreateDefaultSubobject(TEXT("StateMachineComponent")); + HealthComponent = CreateDefaultSubobject(TEXT("HealthComponent")); + + GetCapsuleComponent()->SetCollisionResponseToChannel(COLLISION_RANGED_WEAPON, ECR_Ignore); + GetCapsuleComponent()->SetCollisionResponseToChannel(COLLISION_MELEE_WEAPON, ECR_Ignore); + + EnableAllActions(); + + AController* MyController = GetController(); + if(MyController) + { + GetController()->SetIgnoreMoveInput(false); + } +} + +void ASNGCharacterBase_DEPRECATED::SetupRotateTowardsTarget(FRotator TargetRotation, float DegreesPerSecond, float MaxRotation) +{ + RotateTimeElapsed = 0.0f; + InitialRot = GetActorRotation(); + this->TargetRot = TargetRotation; + DegPerSecond = DegreesPerSecond; + this->MaxRot = MaxRotation; + + RotateTime = FMath::Min(FMath::Abs(TargetRotation.Yaw - InitialRot.Yaw), MaxRotation) / DegreesPerSecond; +} + +void ASNGCharacterBase_DEPRECATED::RotateTowardsTarget(float DeltaTime) +{ + if(RotateTimeElapsed < RotateTime) + { + SetActorRotation(UKismetMathLibrary::RInterpTo_Constant(GetActorRotation(), TargetRot, + DeltaTime, DegPerSecond)); + + RotateTimeElapsed += DeltaTime; + } +} + +void ASNGCharacterBase_DEPRECATED::SetIgnoreMovementInput(bool IsIgnored) +{ + AController* MyController = GetController(); + if(MyController) + { + GetController()->SetIgnoreMoveInput(IsIgnored); + } +} + +void ASNGCharacterBase_DEPRECATED::DisableAllActions() +{ + bCanMove = false; + bCanJump = false; + bCanDodge = false; + bCanAttack = false; +} + +void ASNGCharacterBase_DEPRECATED::EnableAllActions() +{ + bCanMove = true; + bCanJump = true; + bCanDodge = true; + bCanAttack = true; +} + +void ASNGCharacterBase_DEPRECATED::SetCanMove(bool CanMove) +{ + bCanMove = CanMove; +} + +bool ASNGCharacterBase_DEPRECATED::CanMove() +{ + return bCanMove; +} + +void ASNGCharacterBase_DEPRECATED::SetCanCharacterJump(bool CanJump) +{ + bCanJump = CanJump; +} + +bool ASNGCharacterBase_DEPRECATED::CanCharacterJump() +{ + return bCanJump; +} + +void ASNGCharacterBase_DEPRECATED::SetCanAttack(bool CanAttack) +{ + bCanAttack = CanAttack; +} + +bool ASNGCharacterBase_DEPRECATED::CanAttack() +{ + return bCanAttack; +} + +void ASNGCharacterBase_DEPRECATED::SetCanDodge(bool CanDodge) +{ + bCanDodge = CanDodge; +} + +bool ASNGCharacterBase_DEPRECATED::CanDodge() +{ + return bCanDodge; +} + +void ASNGCharacterBase_DEPRECATED::ApplyHitStop(float HitStopTime, float HitSlowTime) +{ + CurrHitStopTime = HitStopTime; + CurrHitSlowTime = HitSlowTime; + bIsInHitStop = true; +} + +void ASNGCharacterBase_DEPRECATED::PushEvent_Implementation(FSNGEvent Event) +{ + if(StateMachineComponent) + { + StateMachineComponent->PushEvent(Event); + } +} + +ASNGWeaponBase* ASNGCharacterBase_DEPRECATED::GetCurrentWeapon_Implementation() +{ + return nullptr; +} + +void ASNGCharacterBase_DEPRECATED::ReceiveHit(FSNGHitData const& HitData, AController* EventInstigator, AActor* DamageCauser) +{ + AActor* Causer = EventInstigator->GetPawn(); + + if(HitData.HitstopApplicationType == ESNGHitstopApplicationType::Both || + HitData.HitstopApplicationType == ESNGHitstopApplicationType::ReceiverOnly) + { + ApplyHitStop(HitData.StopTime, HitData.SlowTime); + } + + FVector AdjustedLaunchDir; + switch (HitData.LaunchDirectionType) + { + case ESNGLaunchDirectionType::UseCauserRotation: + { + FRotator CauserRotationYaw(0.0f, Causer->GetActorRotation().Yaw, 0.0f); + AdjustedLaunchDir = CauserRotationYaw.RotateVector(HitData.LaunchDirection); + } + break; + case ESNGLaunchDirectionType::UseLookAtRotation: + { + FRotator LookAtRotation = UKismetMathLibrary::FindLookAtRotation(Causer->GetActorLocation(), GetActorLocation()); + FRotator LookAtRotationYaw(0.0f, LookAtRotation.Yaw, 0.0f); + AdjustedLaunchDir = LookAtRotationYaw.RotateVector(HitData.LaunchDirection); + } + break; + default: + { + AdjustedLaunchDir = HitData.LaunchDirection; + } + break; + } + + switch (HitData.LaunchType) + { + case ESNGLaunchType::OnlyInAir: + { + bool IsInAir = GetMovementComponent()->IsFalling(); + if(IsInAir) + { + AdjustedLaunchDir *= HitData.LaunchForce; + LaunchCharacter(AdjustedLaunchDir, true, true); + } + else + { + AdjustedLaunchDir = FVector(AdjustedLaunchDir.X, AdjustedLaunchDir.Y, 0.0f); + LaunchCharacter(AdjustedLaunchDir, true, true); + } + } + break; + case ESNGLaunchType::Always: + { + AdjustedLaunchDir *= HitData.LaunchForce; + LaunchCharacter(AdjustedLaunchDir, true, true); + } + break; + default: + { + + } + break; + } +} + +float ASNGCharacterBase_DEPRECATED::TakeDamage(float Damage, FDamageEvent const& DamageEvent, AController* EventInstigator, + AActor* DamageCauser) +{ + Super::TakeDamage(Damage, DamageEvent, EventInstigator, DamageCauser); + + if(HealthComponent) + { + HealthComponent->SubtractHealth(Damage); + } + + if (DamageEvent.IsOfType(FSNGDamageEvent::ClassID)) + { + // point damage event, pass off to helper function + FSNGDamageEvent* const MyDamageEvent = (FSNGDamageEvent*) &DamageEvent; + ReceiveHit(MyDamageEvent->HitData, EventInstigator, DamageCauser); + + FSNGEvent Event; + Event.EventType = ESNGEventType::Damage; + Event.DamageData.HitData = MyDamageEvent->HitData; + Event.DamageData.EventInstigator = EventInstigator; + Event.DamageData.DamageCauser = DamageCauser; + Event.DamageData.SurfaceType = MyDamageEvent->SurfaceType; + Event.DamageData.ImpactPoint = MyDamageEvent->ImpactPoint; + PushEvent(Event); + } + + return Damage; +} + +void ASNGCharacterBase_DEPRECATED::Tick(float DeltaSeconds) +{ + Super::Tick(DeltaSeconds); + + RotateTowardsTarget(DeltaSeconds); + + if(bIsInHitStop) + { + CurrHitStopTime = FMath::Clamp(CurrHitStopTime - GetWorld()->GetDeltaSeconds(), 0.0f, CurrHitStopTime); + if(CurrHitStopTime > 0.0f) + { + CustomTimeDilation = 0.0f; + } + else + { + CustomTimeDilation = 0.01; + CurrHitSlowTime = FMath::Clamp(CurrHitSlowTime - GetWorld()->GetDeltaSeconds(), 0.0f, CurrHitSlowTime); + if(CurrHitSlowTime == 0.0f) + { + CustomTimeDilation = 1.0f; + bIsInHitStop = false; + } + } + } +} + +void ASNGCharacterBase_DEPRECATED::PostInitializeComponents() +{ + Super::PostInitializeComponents(); + + SNGCharacterMovementComponent = Cast(Super::GetMovementComponent()); +} + diff --git a/SwordNGun/Source/SwordNGun/Private/Components/SNGCharacterMovementComponent.cpp b/SwordNGun/Source/SwordNGun/Private/Components/SNGCharacterMovementComponent.cpp index 5ab7d50..b45f919 100644 --- a/SwordNGun/Source/SwordNGun/Private/Components/SNGCharacterMovementComponent.cpp +++ b/SwordNGun/Source/SwordNGun/Private/Components/SNGCharacterMovementComponent.cpp @@ -5,7 +5,7 @@ USNGCharacterMovementComponent::USNGCharacterMovementComponent() { - // Set defaults dealign with grounded movement + // Set defaults dealing with grounded movement DefaultGravityScale = 1.0f; DefaultMaxWalkSpeed = 475.0f; FiringMaxWalkSpeed = 300.0f; @@ -13,7 +13,7 @@ USNGCharacterMovementComponent::USNGCharacterMovementComponent() SprintingMaxWalkSpeed = 600.0f; // Set defaults dealing with jumping and being airborne - JumpForce = 1000.0f; + DefaultJumpForce = 1000.0f; DefaultAirFriction = 150.0f; DefaultAirControl = 0.35; @@ -36,23 +36,28 @@ void USNGCharacterMovementComponent::RestoreMovementDefaults() MaxWalkSpeed = DefaultMaxWalkSpeed; BrakingDecelerationFalling = DefaultAirFriction; AirControl = DefaultAirControl; + JumpZVelocity = DefaultJumpForce; } void USNGCharacterMovementComponent::StartJump() { + /* JumpTimer = MaxJumpTime; Velocity = FVector(Velocity.X * LateralVelocityDampening, Velocity.Y * LateralVelocityDampening, 0.0f); + */ } void USNGCharacterMovementComponent::AddJumpForce() { + /* if(JumpTimer > 0.0f) { Velocity = FVector(Velocity.X, Velocity.Y, Velocity.Z + (JumpForce * GetWorld()->DeltaTimeSeconds)); JumpTimer = FMath::Max(JumpTimer - GetWorld()->DeltaTimeSeconds, 0.0f); } + */ } void USNGCharacterMovementComponent::BeginPlay() @@ -61,9 +66,6 @@ void USNGCharacterMovementComponent::BeginPlay() // set character movement parameters to defaults RestoreMovementDefaults(); - - // Reset timers - JumpTimer = 0.0f; } void USNGCharacterMovementComponent::TickComponent(float DeltaTime, ELevelTick Tick, diff --git a/SwordNGun/Source/SwordNGun/Private/Weapons/SNGInstantRangedWeapon.cpp b/SwordNGun/Source/SwordNGun/Private/Weapons/SNGInstantRangedWeapon.cpp index 10b593f..fc56116 100644 --- a/SwordNGun/Source/SwordNGun/Private/Weapons/SNGInstantRangedWeapon.cpp +++ b/SwordNGun/Source/SwordNGun/Private/Weapons/SNGInstantRangedWeapon.cpp @@ -4,7 +4,7 @@ #include "Weapons/SNGInstantRangedWeapon.h" #include "DrawDebugHelpers.h" -#include "Characters/SNGCharacterBase.h" +#include "Characters/SNGCharacterBase_DEPRECATED.h" #include "Kismet/GameplayStatics.h" #include "Particles/ParticleSystemComponent.h" #include "PhysicalMaterials/PhysicalMaterial.h" @@ -107,7 +107,7 @@ void ASNGInstantRangedWeapon::DoLineTrace(FRotator SpreadOffset) if(HitData.HitstopApplicationType == ESNGHitstopApplicationType::Both || HitData.HitstopApplicationType == ESNGHitstopApplicationType::CauserOnly) { - ASNGCharacterBase* OwnerAsChar = Cast(GetOwner()); + ASNGCharacterBase_DEPRECATED* OwnerAsChar = Cast(GetOwner()); OwnerAsChar->ApplyHitStop(HitData.StopTime, HitData.SlowTime); } diff --git a/SwordNGun/Source/SwordNGun/Private/Weapons/SNGMeleeWeaponBase.cpp b/SwordNGun/Source/SwordNGun/Private/Weapons/SNGMeleeWeaponBase.cpp index 2d577fd..6a91ca6 100644 --- a/SwordNGun/Source/SwordNGun/Private/Weapons/SNGMeleeWeaponBase.cpp +++ b/SwordNGun/Source/SwordNGun/Private/Weapons/SNGMeleeWeaponBase.cpp @@ -4,7 +4,7 @@ #include "Weapons/SNGMeleeWeaponBase.h" -#include "Characters/SNGCharacterBase.h" +#include "Characters/SNGCharacterBase_DEPRECATED.h" #include "Kismet/KismetSystemLibrary.h" #include "SwordNGun/SwordNGun.h" @@ -61,7 +61,7 @@ void ASNGMeleeWeaponBase::DoSphereCast(FSNGHitData const& HitData, bool Override if(HitData.HitstopApplicationType == ESNGHitstopApplicationType::Both || HitData.HitstopApplicationType == ESNGHitstopApplicationType::CauserOnly) { - ASNGCharacterBase* OwnerAsChar = Cast(GetOwner()); + ASNGCharacterBase_DEPRECATED* OwnerAsChar = Cast(GetOwner()); OwnerAsChar->ApplyHitStop(HitData.StopTime, HitData.SlowTime); } diff --git a/SwordNGun/Source/SwordNGun/Public/Characters/SNGCharacterBase.h b/SwordNGun/Source/SwordNGun/Public/Characters/SNGCharacterBase.h index b50db15..7f30421 100644 Binary files a/SwordNGun/Source/SwordNGun/Public/Characters/SNGCharacterBase.h and b/SwordNGun/Source/SwordNGun/Public/Characters/SNGCharacterBase.h differ diff --git a/SwordNGun/Source/SwordNGun/Public/Characters/SNGCharacterBase_DEPRECATED.h b/SwordNGun/Source/SwordNGun/Public/Characters/SNGCharacterBase_DEPRECATED.h new file mode 100644 index 0000000..0adcaf6 --- /dev/null +++ b/SwordNGun/Source/SwordNGun/Public/Characters/SNGCharacterBase_DEPRECATED.h @@ -0,0 +1,174 @@ +// Project Sword & Gun Copyright © 2021 Kevin Poretti + +#pragma once + +#include "CoreMinimal.h" +#include "Components/SNGCharacterMovementComponent.h" + +#include "Components/SNGHealthComponent.h" +#include "Components/SNGStateMachineComponent.h" +#include "GameFramework/Character.h" +#include "Interfaces/SNGEventProcessorInterface.h" +#include "Interfaces/SNGWeaponUserInterface.h" + +#include "SNGCharacterBase_DEPRECATED.generated.h" + +UCLASS() +class SWORDNGUN_API ASNGCharacterBase_DEPRECATED : public ACharacter, public ISNGEventProcessorInterface, public ISNGWeaponUserInterface +{ + GENERATED_BODY() + +public: + // Sets default values for this character's properties + ASNGCharacterBase_DEPRECATED(const FObjectInitializer& ObjectInitializer); + + /********************************************************************* + * Flags + ********************************************************************/ + + UFUNCTION(BlueprintCallable) + void DisableAllActions(); + + UFUNCTION(BlueprintCallable) + void EnableAllActions(); + + // NOTE(kevin): should be a blueprint setter but I could not get that working for the life of me + UFUNCTION(BlueprintCallable) + void SetCanMove(bool CanMove); + + UFUNCTION(BlueprintGetter) + bool CanMove(); + + // NOTE(kevin): should be a blueprint setter but I could not get that working for the life of me + // should also probably be a protagonist/player character specific thing + UFUNCTION(BlueprintCallable) + void SetCanCharacterJump(bool CanJump); + + UFUNCTION(BlueprintGetter) + bool CanCharacterJump(); + + // NOTE(kevin): should be a blueprint setter but I could not get that working for the life of me + UFUNCTION(BlueprintCallable) + void SetCanAttack(bool CanAttack); + + UFUNCTION(BlueprintGetter) + bool CanAttack(); + + // NOTE(kevin): should be a blueprint setter but I could not get that working for the life of me + // should also probably be a protagonist/player character specific thing + UFUNCTION(BlueprintCallable) + void SetCanDodge(bool CanDodge); + + UFUNCTION(BlueprintGetter) + bool CanDodge(); + +protected: + UPROPERTY(BlueprintReadOnly) + bool bCanMove; + + UPROPERTY(BlueprintReadOnly) + bool bCanJump; + + UPROPERTY(BlueprintReadOnly) + bool bCanAttack; + + UPROPERTY(BlueprintReadOnly) + bool bCanDodge; + + /********************************************************************* + * Movement + ********************************************************************/ + +public: + + UFUNCTION(BlueprintCallable, Category="Movement") + void SetIgnoreMovementInput(bool IsIgnored); + + UFUNCTION(BlueprintCallable, Category="Movement") + FORCEINLINE class USNGCharacterMovementComponent* GetSNGCharacterMovementComponent() const + { + return SNGCharacterMovementComponent; + } + +protected: + USNGCharacterMovementComponent* SNGCharacterMovementComponent; + +public: + /********************************************************************* + * Event processing interface + ********************************************************************/ + // event processing + UFUNCTION(BlueprintCallable, BlueprintNativeEvent) + void PushEvent(FSNGEvent Event); + + /** + * The state machine will be handling most if not all of the states + * we simply wrap the state machine's push event implementation since most + * characters that will want to push events to another character will have a reference + * to the character itself rather than the state machine component + */ + virtual void PushEvent_Implementation(FSNGEvent Event); + + + /********************************************************************* + * Weapons + ********************************************************************/ + UFUNCTION(BlueprintCallable, BlueprintNativeEvent) + ASNGWeaponBase* GetCurrentWeapon(); + + virtual ASNGWeaponBase* GetCurrentWeapon_Implementation(); + + /********************************************************************* + * Damage and hits + ********************************************************************/ + // damage and related + UFUNCTION(BlueprintCallable) + void ApplyHitStop(float HitStopTime, float HitSlowTime); + + virtual void ReceiveHit(FSNGHitData const& HitData, AController* EventInstigator, AActor* DamageCauser); + + virtual float TakeDamage(float Damage, struct FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser) override; + +protected: + bool bIsInHitStop; + + float CurrHitStopTime; + + float CurrHitSlowTime; + + /********************************************************************* + * Rotate towards target + ********************************************************************/ +public: + UFUNCTION(BlueprintCallable) + void SetupRotateTowardsTarget(FRotator TargetRotation, float DegreesPerSecond, float MaxRotation); + + UFUNCTION(BlueprintCallable) + void RotateTowardsTarget(float DeltaTime); + +protected: + FRotator InitialRot; + + FRotator TargetRot; + + float DegPerSecond; + + float MaxRot; + + float RotateTime; + + float RotateTimeElapsed; + + /********************************************************************* + * Components + ********************************************************************/ + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Components") + USNGStateMachineComponent* StateMachineComponent; + + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Components") + USNGHealthComponent* HealthComponent; + + virtual void Tick(float DeltaSeconds) override; + + virtual void PostInitializeComponents() override; +}; diff --git a/SwordNGun/Source/SwordNGun/Public/Characters/SNGEnemyBase.h b/SwordNGun/Source/SwordNGun/Public/Characters/SNGEnemyBase.h index c0c456a..0e2a6b9 100644 --- a/SwordNGun/Source/SwordNGun/Public/Characters/SNGEnemyBase.h +++ b/SwordNGun/Source/SwordNGun/Public/Characters/SNGEnemyBase.h @@ -3,14 +3,14 @@ #pragma once #include "CoreMinimal.h" -#include "Characters/SNGCharacterBase.h" +#include "Characters/SNGCharacterBase_DEPRECATED.h" #include "SNGEnemyBase.generated.h" /** * */ UCLASS() -class SWORDNGUN_API ASNGEnemyBase : public ASNGCharacterBase +class SWORDNGUN_API ASNGEnemyBase : public ASNGCharacterBase_DEPRECATED { GENERATED_BODY() diff --git a/SwordNGun/Source/SwordNGun/Public/Characters/SNGProtagonist.h b/SwordNGun/Source/SwordNGun/Public/Characters/SNGProtagonist.h index c7f5229..f849661 100644 --- a/SwordNGun/Source/SwordNGun/Public/Characters/SNGProtagonist.h +++ b/SwordNGun/Source/SwordNGun/Public/Characters/SNGProtagonist.h @@ -5,7 +5,7 @@ #include "CoreMinimal.h" #include "Camera/CameraComponent.h" -#include "Characters/SNGCharacterBase.h" +#include "Characters/SNGCharacterBase_DEPRECATED.h" #include "Components/SNGWeaponInventoryComponent.h" #include "GameFramework/SpringArmComponent.h" @@ -27,7 +27,7 @@ struct FMeleeAttackData * */ UCLASS() -class SWORDNGUN_API ASNGProtagonist : public ASNGCharacterBase +class SWORDNGUN_API ASNGProtagonist : public ASNGCharacterBase_DEPRECATED { GENERATED_BODY() diff --git a/SwordNGun/Source/SwordNGun/Public/Components/SNGCharacterMovementComponent.h b/SwordNGun/Source/SwordNGun/Public/Components/SNGCharacterMovementComponent.h index 223c747..8fa5cce 100644 --- a/SwordNGun/Source/SwordNGun/Public/Components/SNGCharacterMovementComponent.h +++ b/SwordNGun/Source/SwordNGun/Public/Components/SNGCharacterMovementComponent.h @@ -54,11 +54,7 @@ protected: /** Force to continuously apply to character when they are holding the jump button */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="Character Movement: SNG Air Defaults", meta=(ClampMin="0", UIMin="0")) - float JumpForce; - - /** Timer that counts down */ - UPROPERTY(BlueprintReadWrite); - float JumpTimer; + float DefaultJumpForce; /** Minimum height a character must reach before jump force is no longer applied even if the jump input is not being held */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="Character Movement: SNG Air Defaults", meta=(ClampMin="0", UIMin="0"))