Make vehicle controller inherit AController instead of APlayerController
This commit is contained in:
parent
9e93fca6cc
commit
86e5e36f4d
|
@ -94,7 +94,7 @@ AWheeledVehicleAIController::AWheeledVehicleAIController(const FObjectInitialize
|
|||
AWheeledVehicleAIController::~AWheeledVehicleAIController() {}
|
||||
|
||||
// =============================================================================
|
||||
// -- APlayerController --------------------------------------------------------
|
||||
// -- AController --------------------------------------------------------------
|
||||
// =============================================================================
|
||||
|
||||
void AWheeledVehicleAIController::OnPossess(APawn *aPawn)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <queue>
|
||||
|
||||
#include "GameFramework/PlayerController.h"
|
||||
#include "GameFramework/Controller.h"
|
||||
|
||||
#include "Traffic/TrafficLightState.h"
|
||||
#include "Vehicle/VehicleControl.h"
|
||||
|
@ -21,7 +21,7 @@ class URoadMap;
|
|||
|
||||
/// Wheeled vehicle controller with optional AI.
|
||||
UCLASS()
|
||||
class CARLA_API AWheeledVehicleAIController : public APlayerController
|
||||
class CARLA_API AWheeledVehicleAIController final : public AController
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
|||
|
||||
/// @}
|
||||
// ===========================================================================
|
||||
/// @name APlayerController overrides
|
||||
/// @name Controller overrides
|
||||
// ===========================================================================
|
||||
/// @{
|
||||
|
||||
|
@ -75,12 +75,6 @@ public:
|
|||
return Vehicle;
|
||||
}
|
||||
|
||||
UFUNCTION(Category = "Wheeled Vehicle Controller", BlueprintCallable)
|
||||
virtual bool IsPossessingThePlayer() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/// @}
|
||||
// ===========================================================================
|
||||
/// @name Control options
|
||||
|
|
Loading…
Reference in New Issue