Aaron/disableweather (#8330)
* Return sm names * Remove rename and add output of spawned actors * Add tags to the components properly * Remove debug code * Disabled weather systems and make night day event weather agnostic
This commit is contained in:
parent
664b2113f2
commit
2a98392f12
|
@ -259,6 +259,7 @@ TArray<AInstancedStaticMeshActor*> UMapGenFunctionLibrary::ChangeStaticMeshesInT
|
|||
|
||||
for(auto CurrentPair : ActorsToCheckIfReplacedMap)
|
||||
{
|
||||
|
||||
if(CurrentPair.Value.Num() > MinNumOfInstancesToBeChanged)
|
||||
{
|
||||
TArray<FTransform> TransformsToBeInstanced;
|
||||
|
|
|
@ -33,7 +33,6 @@ void UCarlaLight::RegisterLight()
|
|||
UCarlaLightSubsystem* CarlaLightSubsystem = World->GetSubsystem<UCarlaLightSubsystem>();
|
||||
CarlaLightSubsystem->RegisterLight(this);
|
||||
}
|
||||
RegisterLightWithWeather();
|
||||
flags |= ECarlaLightFlags::Registered;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ public:
|
|||
void UpdateLights();
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Carla Light")
|
||||
void RegisterLightWithWeather();
|
||||
void DayTimeChanged(bool bIsDay);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Carla Light")
|
||||
void SetLightIntensity(float Intensity);
|
||||
|
|
|
@ -31,6 +31,7 @@ void UCarlaLightSubsystem::RegisterLight(UCarlaLight* CarlaLight)
|
|||
return;
|
||||
}
|
||||
Lights.Add(LightId, CarlaLight);
|
||||
DayTimeChangeEvent.AddDynamic(CarlaLight, &UCarlaLight::DayTimeChanged);
|
||||
}
|
||||
SetClientStatesdirty("");
|
||||
}
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDayTimeChanged, bool, bIsDay);
|
||||
|
||||
UCLASS(Blueprintable, BlueprintType)
|
||||
class CARLA_API UCarlaLightSubsystem : public UWorldSubsystem
|
||||
{
|
||||
|
@ -64,6 +67,9 @@ public:
|
|||
|
||||
void SetDayNightCycle(const bool active);
|
||||
|
||||
UPROPERTY(BlueprintCallable, BlueprintAssignable, Category = "DayTimeChangeEvent")
|
||||
FDayTimeChanged DayTimeChangeEvent;
|
||||
|
||||
private:
|
||||
|
||||
void SetClientStatesdirty(FString ClientThatUpdate);
|
||||
|
|
|
@ -691,7 +691,7 @@ void FCarlaServer::FPimpl::BindActions()
|
|||
auto *Weather = Episode->GetWeather();
|
||||
if (Weather == nullptr)
|
||||
{
|
||||
RESPOND_ERROR("internal error: unable to find weather");
|
||||
RESPOND_ERROR("internal error: unable to find weather:: weather is disabled");
|
||||
}
|
||||
return Weather->GetCurrentWeather();
|
||||
};
|
||||
|
@ -703,7 +703,7 @@ void FCarlaServer::FPimpl::BindActions()
|
|||
auto *Weather = Episode->GetWeather();
|
||||
if (Weather == nullptr)
|
||||
{
|
||||
RESPOND_ERROR("internal error: unable to find weather");
|
||||
RESPOND_ERROR("internal error: unable to find weather:: weather is disabled");
|
||||
}
|
||||
Weather->ApplyWeather(weather);
|
||||
return R<void>::Success();
|
||||
|
|
Loading…
Reference in New Issue