diff --git a/Source/CogSample/CogSamplePlayerController.cpp b/Source/CogSample/CogSamplePlayerController.cpp index e905271..a7fb805 100644 --- a/Source/CogSample/CogSamplePlayerController.cpp +++ b/Source/CogSample/CogSamplePlayerController.cpp @@ -7,7 +7,6 @@ #include "CogSampleProjectileComponent.h" #include "CogSampleTargetAcquisition.h" #include "GameFramework/PlayerState.h" -#include "Net/UnrealNetwork.h" #if ENABLE_COG #include "CogAbilityReplicator.h" @@ -164,9 +163,9 @@ void ACogSamplePlayerController::TickTargeting(float DeltaSeconds) return; } - TArray TagretToIgnore; + TArray TargetToIgnore; 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); } @@ -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); return PlayerController; } //-------------------------------------------------------------------------------------------------------------------------- -ACogSamplePlayerController* ACogSamplePlayerController::GetFirstLocalPlayerController(UObject* WorldContextObject) +ACogSamplePlayerController* ACogSamplePlayerController::GetFirstLocalPlayerController(const UObject* WorldContextObject) { UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::ReturnNull); if (World == nullptr) diff --git a/Source/CogSample/CogSamplePlayerController.h b/Source/CogSample/CogSamplePlayerController.h index b6f54a4..e4ebd35 100644 --- a/Source/CogSample/CogSamplePlayerController.h +++ b/Source/CogSample/CogSamplePlayerController.h @@ -25,9 +25,9 @@ class ACogSamplePlayerController 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();