CarlaWheeledVehicle: Stop being simulated with telemetry

Until now, when the client asked to stop the telemetry, the
information was begin removed in the HUD but it was still being
simulated with telemetry data. Now, we call the new method to stop
the telemetry to completely removed this behaviour.
This commit is contained in:
Daniel Santos-Olivan 2021-09-02 10:43:06 +02:00 committed by bernat
parent 3858c5f04c
commit fba2bd4b3e
1 changed files with 3 additions and 1 deletions

View File

@ -482,8 +482,10 @@ void ACarlaWheeledVehicle::ShowDebugTelemetry(bool Enabled)
hud->AddDebugVehicleForTelemetry(GetVehicleMovementComponent()); hud->AddDebugVehicleForTelemetry(GetVehicleMovementComponent());
} }
else{ else{
if (hud->DebugVehicle == GetVehicleMovementComponent()) if (hud->DebugVehicle == GetVehicleMovementComponent()) {
hud->AddDebugVehicleForTelemetry(nullptr); hud->AddDebugVehicleForTelemetry(nullptr);
GetVehicleMovementComponent()->StopTelemetry();
}
} }
} }