From f9293c80eda7d8c28ecb117527295a7f3f27521f Mon Sep 17 00:00:00 2001 From: nsubiron Date: Tue, 13 Nov 2018 15:54:43 +0100 Subject: [PATCH] Use actor_get_display_name when possible --- PythonAPI/manual_control.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PythonAPI/manual_control.py b/PythonAPI/manual_control.py index b2099f666..7bb24be37 100755 --- a/PythonAPI/manual_control.py +++ b/PythonAPI/manual_control.py @@ -157,7 +157,7 @@ class World(object): self.camera_manager = CameraManager(self.vehicle, self.hud) self.camera_manager._transform_index = cam_pos_index self.camera_manager.set_sensor(cam_index, notify=False) - actor_type = ' '.join(self.vehicle.type_id.replace('_', '.').title().split('.')[1:]) + actor_type = get_actor_display_name(self.vehicle) self.hud.notification(actor_type) def next_weather(self, reverse=False): @@ -464,7 +464,7 @@ class CollisionSensor(object): self = weak_self() if not self: return - actor_type = ' '.join(event.other_actor.type_id.replace('_', '.').title().split('.')[1:]) + actor_type = get_actor_display_name(event.other_actor) self._hud.notification('Collision with %r' % actor_type) impulse = event.normal_impulse intensity = math.sqrt(impulse.x**2 + impulse.y**2 + impulse.z**2)