Fixed speed limit component wrong check.

This commit is contained in:
Axel 2021-06-22 10:31:06 +02:00 committed by bernat
parent 46fad26755
commit 669c058211
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ void USpeedLimitComponent::OnOverlapBeginSpeedLimitBox(UPrimitiveComponent *Over
const FHitResult &SweepResult)
{
ACarlaWheeledVehicle* Vehicle = Cast<ACarlaWheeledVehicle>(OtherActor);
if (OtherActor)
if (Vehicle)
{
auto Controller = Cast<AWheeledVehicleAIController>(Vehicle->GetController());
if (Controller)