Review fixes.

This commit is contained in:
Axel 2020-03-03 12:39:48 +01:00 committed by Axel1092
parent ad2f05673c
commit b10ee61808
4 changed files with 3 additions and 39 deletions

View File

@ -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<carla::road::SignId, std::unique_ptr<carla::road::Signal>>
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();

View File

@ -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;

View File

@ -34,4 +34,4 @@ const FString& USignComponent::GetSignId() const
void USignComponent::SetSignId(const FString &Id) {
SignId = Id;
}
}

View File

@ -170,4 +170,4 @@ UTrafficLightComponent* ATrafficLightManager::GetTrafficLight(FString SignId)
return nullptr;
}
return TrafficLights[SignId];
}
}