Fixed manual control for pedestrians

This commit is contained in:
Axel 2022-11-30 14:11:10 +01:00 committed by bernat
parent e2c22b75a3
commit 26524eed4d
1 changed files with 2 additions and 1 deletions

View File

@ -246,7 +246,8 @@ class World(object):
# Get a random blueprint.
blueprint = random.choice(get_actor_blueprints(self.world, self._actor_filter, self._actor_generation))
blueprint.set_attribute('role_name', self.actor_role_name)
blueprint.set_attribute('terramechanics', 'true')
if blueprint.has_attribute('terramechanics'):
blueprint.set_attribute('terramechanics', 'true')
if blueprint.has_attribute('color'):
color = random.choice(blueprint.get_attribute('color').recommended_values)
blueprint.set_attribute('color', color)