diff --git a/crates/sim/src/script/host/entity_damage.rs b/crates/sim/src/script/host/entity_damage.rs index 0325695..e96be32 100644 --- a/crates/sim/src/script/host/entity_damage.rs +++ b/crates/sim/src/script/host/entity_damage.rs @@ -229,7 +229,7 @@ pub(crate) fn damage_entity(world: &mut World, hit: &EntityHit) -> bool { return false; }; let frame = FrameWorld::from_world(world); - let tag = hit + let part = hit .bone .and_then(|bone| { frame @@ -248,7 +248,7 @@ pub(crate) fn damage_entity(world: &mut World, hit: &EntityHit) -> bool { if world.resource::().entities[&object].kind == super::entities::EntityKind::Vehicle { - super::vehicles::damage(world, object, hit, attacker, &weapon, &tag); + super::vehicles::damage(world, object, hit, attacker, &weapon, &part); return true; } let mut runtime = world.resource_mut::(); @@ -276,8 +276,8 @@ pub(crate) fn damage_entity(world: &mut World, hit: &EntityHit) -> bool { Value::Vector(hit.point), Value::string(hit.means), Value::String(model), - Value::String(tag.as_str().into()), Value::string(""), + Value::String(part.as_str().into()), Value::Int(hit.flags), Value::String(weapon.into()), ],