mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-06 23:58:48 +00:00
CogSample: const and typo fix
This commit is contained in:
@@ -7,7 +7,6 @@
|
|||||||
#include "CogSampleProjectileComponent.h"
|
#include "CogSampleProjectileComponent.h"
|
||||||
#include "CogSampleTargetAcquisition.h"
|
#include "CogSampleTargetAcquisition.h"
|
||||||
#include "GameFramework/PlayerState.h"
|
#include "GameFramework/PlayerState.h"
|
||||||
#include "Net/UnrealNetwork.h"
|
|
||||||
|
|
||||||
#if ENABLE_COG
|
#if ENABLE_COG
|
||||||
#include "CogAbilityReplicator.h"
|
#include "CogAbilityReplicator.h"
|
||||||
@@ -164,9 +163,9 @@ void ACogSamplePlayerController::TickTargeting(float DeltaSeconds)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<AActor*> TagretToIgnore;
|
TArray<AActor*> TargetToIgnore;
|
||||||
FCogSampleTargetAcquisitionResult Result;
|
FCogSampleTargetAcquisitionResult Result;
|
||||||
TargetAcquisition->FindBestTarget(this, TagretToIgnore, nullptr, true, FVector2D::ZeroVector, false, Result);
|
TargetAcquisition->FindBestTarget(this, TargetToIgnore, nullptr, true, FVector2D::ZeroVector, false, Result);
|
||||||
SetTarget(Result.Target);
|
SetTarget(Result.Target);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,14 +204,14 @@ void ACogSamplePlayerController::Server_SetTarget_Implementation(AActor* Value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
const ACogSamplePlayerController* ACogSamplePlayerController::GetFirstLocalPlayerControllerConst(UObject* WorldContextObject)
|
const ACogSamplePlayerController* ACogSamplePlayerController::GetFirstLocalPlayerControllerConst(const UObject* WorldContextObject)
|
||||||
{
|
{
|
||||||
const ACogSamplePlayerController* PlayerController = GetFirstLocalPlayerController(WorldContextObject);
|
const ACogSamplePlayerController* PlayerController = GetFirstLocalPlayerController(WorldContextObject);
|
||||||
return PlayerController;
|
return PlayerController;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
ACogSamplePlayerController* ACogSamplePlayerController::GetFirstLocalPlayerController(UObject* WorldContextObject)
|
ACogSamplePlayerController* ACogSamplePlayerController::GetFirstLocalPlayerController(const UObject* WorldContextObject)
|
||||||
{
|
{
|
||||||
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::ReturnNull);
|
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::ReturnNull);
|
||||||
if (World == nullptr)
|
if (World == nullptr)
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ class ACogSamplePlayerController
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static const ACogSamplePlayerController* GetFirstLocalPlayerControllerConst(UObject* WorldContextObject);
|
static const ACogSamplePlayerController* GetFirstLocalPlayerControllerConst(const UObject* WorldContextObject);
|
||||||
|
|
||||||
static ACogSamplePlayerController* GetFirstLocalPlayerController(UObject* WorldContextObject);
|
static ACogSamplePlayerController* GetFirstLocalPlayerController(const UObject* WorldContextObject);
|
||||||
|
|
||||||
ACogSamplePlayerController();
|
ACogSamplePlayerController();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user