OnActorSpawned condition fixed

This commit is contained in:
Juan Belón 2018-05-08 12:57:08 +02:00
parent 3a8c7a8097
commit 744d928142
1 changed files with 3 additions and 3 deletions

View File

@ -35,9 +35,9 @@ void UCarlaSettingsDelegate::RegisterSpawnHandler(UWorld *InWorld)
void UCarlaSettingsDelegate::OnActorSpawned(AActor* InActor)
{
check(CarlaSettings!=nullptr);
if (InActor != nullptr && IsValid(InActor) && !InActor->IsPendingKill() &&
InActor->IsA<AInstancedFoliageActor>() || //foliage culling is controlled per instance
InActor->IsA<ALandscape>() || //dont touch landscapes nor roads
if (InActor != nullptr && IsValid(InActor) && !InActor->IsPendingKill() &&
!InActor->IsA<AInstancedFoliageActor>() && //foliage culling is controlled per instance
!InActor->IsA<ALandscape>() && //dont touch landscapes nor roads
!InActor->ActorHasTag(UCarlaSettings::CARLA_ROAD_TAG) &&
!InActor->ActorHasTag(UCarlaSettings::CARLA_SKY_TAG)
){