Compare commits

..

No commits in common. "594ef5f1587b3f15ab7b337b5666e720615f1dcf" and "275f86b03fa2712e758c5580f32f357da37e060d" have entirely different histories.

9 changed files with 0 additions and 143 deletions

Binary file not shown.

View File

@ -1,14 +0,0 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "../Decorators/BTDHasPatrolRoute.h"
#include "Nakatomi/EnemyAIController.h"
bool UBTDHasPatrolRoute::CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const
{
AEnemyAIController* enemyController = Cast<AEnemyAIController>(OwnerComp.GetAIOwner());
AEnemyCharacter* enemyPawn = Cast<AEnemyCharacter>(enemyController->GetPawn());
return enemyPawn->CurrentPatrolRoute ? true : false;
}

View File

@ -1,19 +0,0 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "BehaviorTree/BTDecorator.h"
#include "BTDHasPatrolRoute.generated.h"
/**
*
*/
UCLASS(Blueprintable)
class NAKATOMI_API UBTDHasPatrolRoute : public UBTDecorator
{
GENERATED_BODY()
public:
virtual bool CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const override;
};

View File

@ -1,4 +0,0 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "EPatrolMovementEnum.h"

View File

@ -1,15 +0,0 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
/**
*
*/
UENUM(BlueprintType)
enum class EPatrolMovementEnum : uint8
{
SLOWWALK UMETA(DisplayName = "Slow Walk"),
WALK UMETA(DisplayName = "Walk"),
};

View File

@ -19,12 +19,6 @@ void UNakatomiCMC::InitializeComponent()
NakatomiCharacterOwner = Cast<ANakatomiCharacter>(GetOwner()); NakatomiCharacterOwner = Cast<ANakatomiCharacter>(GetOwner());
} }
void UNakatomiCMC::BeginPlay()
{
Super::BeginPlay();
DefaultMaxWalkSpeed = Walk_MaxWalkSpeed;
}
// Checks if we can combine the NewMove with the current move to save on data. // Checks if we can combine the NewMove with the current move to save on data.
// If all the data in a saved move is identical, if true, we cam tell the server to run the existing move instead. // If all the data in a saved move is identical, if true, we cam tell the server to run the existing move instead.
bool UNakatomiCMC::FSavedMove_Nakatomi::CanCombineWith(const FSavedMovePtr& NewMove, ACharacter* InCharacter, bool UNakatomiCMC::FSavedMove_Nakatomi::CanCombineWith(const FSavedMovePtr& NewMove, ACharacter* InCharacter,
@ -277,16 +271,6 @@ bool UNakatomiCMC::IsCustomMovementMode(ECustomMovementMove InCustomMovementMode
return MovementMode == MOVE_Custom && CustomMovementMode == InCustomMovementMode; return MovementMode == MOVE_Custom && CustomMovementMode == InCustomMovementMode;
} }
void UNakatomiCMC::SetMaxWalkSpeed(float newMaxSpeed)
{
Walk_MaxWalkSpeed = newMaxSpeed;
}
void UNakatomiCMC::SetMaxWalkSpeedToDefault()
{
Walk_MaxWalkSpeed = DefaultMaxWalkSpeed;
}
void UNakatomiCMC::EnterSlide() void UNakatomiCMC::EnterSlide()
{ {
Safe_bWantsToSlide = true; Safe_bWantsToSlide = true;

View File

@ -108,8 +108,6 @@ class NAKATOMI_API UNakatomiCMC : public UCharacterMovementComponent
UPROPERTY(Transient) UPROPERTY(Transient)
ANakatomiCharacter* NakatomiCharacterOwner; ANakatomiCharacter* NakatomiCharacterOwner;
float DefaultMaxWalkSpeed;
public: public:
UPROPERTY(BlueprintAssignable) UPROPERTY(BlueprintAssignable)
FDashStartDelegate DashStartDelegate; FDashStartDelegate DashStartDelegate;
@ -120,8 +118,6 @@ public:
protected: protected:
virtual void InitializeComponent() override; virtual void InitializeComponent() override;
virtual void BeginPlay() override;
virtual FNetworkPredictionData_Client* GetPredictionData_Client() const override; virtual FNetworkPredictionData_Client* GetPredictionData_Client() const override;
protected: protected:
@ -171,12 +167,6 @@ public:
UFUNCTION() UFUNCTION()
bool IsCustomMovementMode(ECustomMovementMove InCustomMovementMode) const; bool IsCustomMovementMode(ECustomMovementMove InCustomMovementMode) const;
UFUNCTION()
void SetMaxWalkSpeed(float newMaxSpeed);
UFUNCTION()
void SetMaxWalkSpeedToDefault();
private: private:
void EnterSlide(); void EnterSlide();
void ExitSlide(); void ExitSlide();

View File

@ -1,30 +0,0 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "../Tasks/BTTSetMovementSpeed.h"
#include "Nakatomi/EnemyAIController.h"
#include "Nakatomi/NakatomiCMC.h"
enum class EPatrolMovementEnum : uint8;
EBTNodeResult::Type UBTTSetMovementSpeed::ExecuteTask(UBehaviorTreeComponent& owner, uint8* memory)
{
AEnemyAIController* enemyController = Cast<AEnemyAIController>(owner.GetAIOwner());
AEnemyCharacter* enemyPawn = Cast<AEnemyCharacter>(enemyController->GetPawn());
switch (MaxWalkSpeedKey)
{
case EPatrolMovementEnum::SLOWWALK:
enemyPawn->GetCharacterMovementComponent()->SetMaxWalkSpeed(slowWalkSpeed);
break;
case EPatrolMovementEnum::WALK:
enemyPawn->GetCharacterMovementComponent()->SetMaxWalkSpeed(walkSpeed);
break;
default:
enemyPawn->GetCharacterMovementComponent()->SetMaxWalkSpeedToDefault();
break;
}
return EBTNodeResult::Succeeded;
}

View File

@ -1,32 +0,0 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "BehaviorTree/BTTaskNode.h"
#include "Nakatomi/EPatrolMovementEnum.h"
#include "BTTSetMovementSpeed.generated.h"
/**
*
*/
UCLASS()
class NAKATOMI_API UBTTSetMovementSpeed : public UBTTaskNode
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, Category = "Options",
Meta = (AllowPrivateAccess = "true", DisplayName = "Max Walk Speed Key"))
EPatrolMovementEnum MaxWalkSpeedKey;
private:
float slowWalkSpeed = 250.0f;
float walkSpeed = 500.0f;
public:
virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& owner, uint8* memory) override;
};