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:
Blyron 2024-10-31 14:22:43 +01:00 committed by GitHub
parent 664b2113f2
commit 2a98392f12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 11 additions and 4 deletions

View File

@ -259,6 +259,7 @@ TArray<AInstancedStaticMeshActor*> UMapGenFunctionLibrary::ChangeStaticMeshesInT
for(auto CurrentPair : ActorsToCheckIfReplacedMap)
{
if(CurrentPair.Value.Num() > MinNumOfInstancesToBeChanged)
{
TArray<FTransform> TransformsToBeInstanced;

View File

@ -33,7 +33,6 @@ void UCarlaLight::RegisterLight()
UCarlaLightSubsystem* CarlaLightSubsystem = World->GetSubsystem<UCarlaLightSubsystem>();
CarlaLightSubsystem->RegisterLight(this);
}
RegisterLightWithWeather();
flags |= ECarlaLightFlags::Registered;
}

View File

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

View File

@ -31,6 +31,7 @@ void UCarlaLightSubsystem::RegisterLight(UCarlaLight* CarlaLight)
return;
}
Lights.Add(LightId, CarlaLight);
DayTimeChangeEvent.AddDynamic(CarlaLight, &UCarlaLight::DayTimeChanged);
}
SetClientStatesdirty("");
}

View File

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

View File

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