Changed to a better name

This commit is contained in:
doterop 2020-11-02 11:48:00 +01:00
parent a0a2c83f13
commit 4f1e1b225f
3 changed files with 7 additions and 7 deletions

View File

@ -234,7 +234,7 @@ ATrafficLightManager* ACarlaGameModeBase::GetTrafficLightManager()
if(TrafficLightManagerActor == nullptr)
{
FActorSpawnParameters SpawnParams;
SpawnParams.OverrideLevel = GetLevelToSpanInto("TrafficLights");
SpawnParams.OverrideLevel = GetULevelFromName("TrafficLights");
TrafficLightManager = World->SpawnActor<ATrafficLightManager>(SpawnParams);
}
else
@ -490,7 +490,7 @@ void ACarlaGameModeBase::ConvertMapLayerMaskToMapNames(int32 MapLayer, TArray<FN
}
ULevel* ACarlaGameModeBase::GetLevelToSpanInto(FString LevelName)
ULevel* ACarlaGameModeBase::GetULevelFromName(FString LevelName)
{
ULevel* OutLevel = nullptr;
UWorld* World = GetWorld();

View File

@ -71,7 +71,7 @@ public:
void UnLoadMapLayer(int32 MapLayers);
UFUNCTION(Category = "Carla Game Mode")
ULevel* GetLevelToSpanInto(FString LevelName);
ULevel* GetULevelFromName(FString LevelName);
protected:

View File

@ -82,7 +82,7 @@ void ATrafficLightManager::RegisterLightComponentFromOpenDRIVE(UTrafficLightComp
if(!TrafficGroups.Contains(JunctionId))
{
FActorSpawnParameters SpawnParams;
SpawnParams.OverrideLevel = GM->GetLevelToSpanInto("TrafficLights");
SpawnParams.OverrideLevel = GM->GetULevelFromName("TrafficLights");
auto * NewTrafficLightGroup =
GetWorld()->SpawnActor<ATrafficLightGroup>(SpawnParams);
NewTrafficLightGroup->JunctionId = JunctionId;
@ -103,7 +103,7 @@ void ATrafficLightManager::RegisterLightComponentFromOpenDRIVE(UTrafficLightComp
else
{
FActorSpawnParameters SpawnParams;
SpawnParams.OverrideLevel = GM->GetLevelToSpanInto("TrafficLights");
SpawnParams.OverrideLevel = GM->GetULevelFromName("TrafficLights");
auto * NewTrafficLightGroup =
GetWorld()->SpawnActor<ATrafficLightGroup>(SpawnParams);
NewTrafficLightGroup->JunctionId = TrafficLightGroupMissingId;
@ -478,7 +478,7 @@ void ATrafficLightManager::SpawnTrafficLights()
SpawnParams.Owner = this;
SpawnParams.SpawnCollisionHandlingOverride =
ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
SpawnParams.OverrideLevel = GM->GetLevelToSpanInto("TrafficLights");
SpawnParams.OverrideLevel = GM->GetULevelFromName("TrafficLights");
ATrafficLightBase * TrafficLight = GetWorld()->SpawnActor<ATrafficLightBase>(
TrafficLightModel,
SpawnLocation,
@ -573,7 +573,7 @@ void ATrafficLightManager::SpawnSignals()
SpawnParams.Owner = this;
SpawnParams.SpawnCollisionHandlingOverride =
ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
SpawnParams.OverrideLevel = GM->GetLevelToSpanInto("TrafficSigns");
SpawnParams.OverrideLevel = GM->GetULevelFromName("TrafficSigns");
ATrafficSignBase * TrafficSign = GetWorld()->SpawnActor<ATrafficSignBase>(
TrafficSignsModels[SignalType],
SpawnLocation,