From b10ee61808f27161b58f96b209dfd2fe5cfcec3e Mon Sep 17 00:00:00 2001 From: Axel Date: Tue, 3 Mar 2020 12:39:48 +0100 Subject: [PATCH] Review fixes. --- .../Source/Carla/Game/CarlaGameModeBase.cpp | 34 ------------------- .../Source/Carla/Game/CarlaGameModeBase.h | 4 +-- .../Source/Carla/Traffic/SignComponent.cpp | 2 +- .../Carla/Traffic/TrafficLightManager.cpp | 2 +- 4 files changed, 3 insertions(+), 39 deletions(-) diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.cpp index a5cad8436..c5f254e8e 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.cpp @@ -97,9 +97,6 @@ void ACarlaGameModeBase::InitGame( Episode->SetRecorder(Recorder); ParseOpenDrive(MapName); - - SpawnSignals(); - } void ACarlaGameModeBase::RestartPlayer(AController *NewPlayer) @@ -196,37 +193,6 @@ void ACarlaGameModeBase::ParseOpenDrive(const FString &MapName) } } -void ACarlaGameModeBase::SpawnSignals() -{ - - //const std::unordered_map> - const auto& Signals = Map->GetSignals(); - const auto& Controllers = Map->GetControllers(); - - UE_LOG(LogCarla, Warning, TEXT("Num of signals = %d"), Signals.size()); - UE_LOG(LogCarla, Warning, TEXT("Num of controllers = %d"), Controllers.size()); - - for(const auto& controller : Controllers) { - const auto& signals = controller.second->GetSignals(); - const auto& junctions = controller.second->GetJunctions(); - - UE_LOG(LogCarla, Warning, TEXT("ContID = %s - Num of signals %d - Num of junctions %d"), - *FString(controller.first.c_str()), - signals.size(), - junctions.size()); - - for(const auto& signal : signals) { - UE_LOG(LogCarla, Warning, TEXT("Signal = %s"), *FString(signal.c_str())); - } - - for(const auto& junction : junctions) { - UE_LOG(LogCarla, Warning, TEXT("Junction = %d"), junction); - } - - } - -} - void ACarlaGameModeBase::DebugShowSignals(bool enable) { auto World = GetWorld(); diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.h b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.h index 330b3c2e3..1ce006388 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.h +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.h @@ -44,7 +44,7 @@ public: return Map; } - UFUNCTION(Exec, CallInEditor) + UFUNCTION(Exec, CallInEditor, DevelopmentOnly) void DebugShowSignals(bool enable); protected: @@ -65,8 +65,6 @@ private: void ParseOpenDrive(const FString &MapName); - void SpawnSignals(); - UPROPERTY() UCarlaGameInstance *GameInstance = nullptr; diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Traffic/SignComponent.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Traffic/SignComponent.cpp index c57d5e3eb..22672d726 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Traffic/SignComponent.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Traffic/SignComponent.cpp @@ -34,4 +34,4 @@ const FString& USignComponent::GetSignId() const void USignComponent::SetSignId(const FString &Id) { SignId = Id; -} \ No newline at end of file +} diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Traffic/TrafficLightManager.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Traffic/TrafficLightManager.cpp index ac41f274f..f39d51e60 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Traffic/TrafficLightManager.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Traffic/TrafficLightManager.cpp @@ -170,4 +170,4 @@ UTrafficLightComponent* ATrafficLightManager::GetTrafficLight(FString SignId) return nullptr; } return TrafficLights[SignId]; -} \ No newline at end of file +}