Exposed 'is_invincible' for pedestrians (#1454)
This commit is contained in:
parent
661bc87a0c
commit
1f8e405425
|
@ -21,6 +21,7 @@
|
|||
* Updated OpenDriveActor to use the new Waypoint API
|
||||
* Fixed wrong units in VehiclePhysicsControl's center of mass
|
||||
* Several optimizations to the RPC server, now supports a bigger load of async messages
|
||||
* Exposed 'is_invincible' for pedestrians
|
||||
|
||||
## CARLA 0.9.5
|
||||
|
||||
|
@ -75,6 +76,7 @@
|
|||
* Fixed obstacle detector not working
|
||||
* Fixed small float bug in misc.py
|
||||
|
||||
|
||||
## CARLA 0.9.4
|
||||
|
||||
* Added recording and playback functionality
|
||||
|
|
|
@ -171,6 +171,8 @@ class World(object):
|
|||
if blueprint.has_attribute('color'):
|
||||
color = random.choice(blueprint.get_attribute('color').recommended_values)
|
||||
blueprint.set_attribute('color', color)
|
||||
if blueprint.has_attribute('is_invincible'):
|
||||
blueprint.set_attribute('is_invincible', 'true')
|
||||
# Spawn the player.
|
||||
if self.player is not None:
|
||||
spawn_point = self.player.get_transform()
|
||||
|
|
|
@ -438,6 +438,15 @@ void UActorBlueprintFunctionLibrary::MakePedestrianDefinition(
|
|||
EActorAttributeType::String,
|
||||
GetGender(Parameters.Gender)});
|
||||
|
||||
FActorVariation IsInvincible;
|
||||
|
||||
IsInvincible.Id = TEXT("is_invincible");
|
||||
IsInvincible.Type = EActorAttributeType::Bool;
|
||||
IsInvincible.RecommendedValues = { TEXT("true") };
|
||||
IsInvincible.bRestrictToRecommended = false;
|
||||
|
||||
Definition.Variations.Emplace(IsInvincible);
|
||||
|
||||
Success = CheckActorDefinition(Definition);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue