Add localID to physical object creation functions.

This commit is contained in:
Mic Bowman
2011-06-15 11:31:32 -07:00
parent 29da57e380
commit ad84728aba
5 changed files with 25 additions and 5 deletions

View File

@@ -1467,6 +1467,7 @@ namespace OpenSim.Region.Framework.Scenes
newPart.PhysActor
= m_scene.PhysicsScene.AddPrimShape(
part.LocalId,
string.Format("{0}/{1}", part.Name, part.UUID),
pbs,
part.AbsolutePosition,
@@ -1474,7 +1475,6 @@ namespace OpenSim.Region.Framework.Scenes
part.RotationOffset,
part.PhysActor.IsPhysical);
newPart.PhysActor.LocalID = part.LocalId;
newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true);
}
}

View File

@@ -1582,6 +1582,7 @@ namespace OpenSim.Region.Framework.Scenes
if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible))
{
PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
LocalId,
string.Format("{0}/{1}", Name, UUID),
Shape,
AbsolutePosition,
@@ -1594,7 +1595,6 @@ namespace OpenSim.Region.Framework.Scenes
{
PhysActor.SOPName = this.Name; // save object name and desc into the PhysActor so ODE internals know the joint/body info
PhysActor.SOPDescription = this.Description;
PhysActor.LocalID = LocalId;
DoPhysicsPropertyUpdate(RigidBody, true);
PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0);
}
@@ -4410,6 +4410,7 @@ namespace OpenSim.Region.Framework.Scenes
{
// It's not phantom anymore. So make sure the physics engine get's knowledge of it
PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
LocalId,
string.Format("{0}/{1}", Name, UUID),
Shape,
AbsolutePosition,
@@ -4420,7 +4421,6 @@ namespace OpenSim.Region.Framework.Scenes
pa = PhysActor;
if (pa != null)
{
pa.LocalID = LocalId;
DoPhysicsPropertyUpdate(UsePhysics, true);
if (m_parentGroup != null)
{

View File

@@ -3295,7 +3295,7 @@ namespace OpenSim.Region.Framework.Scenes
Vector3 pVec = AbsolutePosition;
// Old bug where the height was in centimeters instead of meters
m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec,
m_physicsActor = scene.AddAvatar(LocalId, Firstname + "." + Lastname, pVec,
new Vector3(0f, 0f, m_appearance.AvatarHeight), isFlying);
scene.AddPhysicsActorTaint(m_physicsActor);