change root part physics type none to apply physics
parent
be16cf9531
commit
c30cb8a9cf
|
@ -3420,28 +3420,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
linkPart.setGroupPosition(worldPos);
|
linkPart.setGroupPosition(worldPos);
|
||||||
linkPart.setOffsetPosition(Vector3.Zero);
|
linkPart.setOffsetPosition(Vector3.Zero);
|
||||||
linkPart.setRotationOffset(worldRot);
|
linkPart.setRotationOffset(worldRot);
|
||||||
linkPart.Rezzed = RootPart.Rezzed;
|
|
||||||
|
|
||||||
// Create a new SOG to go around this unlinked and unattached SOP
|
// Create a new SOG to go around this unlinked and unattached SOP
|
||||||
SceneObjectGroup objectGroup = new SceneObjectGroup(linkPart);
|
SceneObjectGroup objectGroup = new SceneObjectGroup(linkPart);
|
||||||
|
m_scene.AddNewSceneObject(objectGroup, true);
|
||||||
|
linkPart.Rezzed = RootPart.Rezzed;
|
||||||
|
|
||||||
InvalidBoundsRadius();
|
InvalidBoundsRadius();
|
||||||
InvalidatePartsLinkMaps();
|
InvalidatePartsLinkMaps();
|
||||||
objectGroup.InvalidateEffectivePerms();
|
InvalidateEffectivePerms();
|
||||||
|
|
||||||
objectGroup.HasGroupChangedDueToDelink = true;
|
|
||||||
|
|
||||||
// When we delete a group, we currently have to force persist to the database if the object id has changed
|
|
||||||
// (since delete works by deleting all rows which have a given object id)
|
|
||||||
|
|
||||||
// this is as it seems to be in sl now
|
|
||||||
if (linkPart.PhysicsShapeType == (byte)PhysShapeType.none)
|
|
||||||
linkPart.PhysicsShapeType = linkPart.DefaultPhysicsShapeType(); // root prims can't have type none for now
|
|
||||||
|
|
||||||
m_scene.AddNewSceneObject(objectGroup, true);
|
|
||||||
|
|
||||||
if (m_rootPart.PhysActor != null)
|
if (m_rootPart.PhysActor != null)
|
||||||
m_rootPart.PhysActor.Building = false;
|
m_rootPart.PhysActor.Building = false;
|
||||||
|
|
||||||
|
objectGroup.HasGroupChangedDueToDelink = true;
|
||||||
|
|
||||||
if (sendEvents)
|
if (sendEvents)
|
||||||
linkPart.TriggerScriptChangedEvent(Changed.LINK);
|
linkPart.TriggerScriptChangedEvent(Changed.LINK);
|
||||||
|
|
||||||
|
|
|
@ -2068,7 +2068,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (PhysicsShapeType == (byte)PhysShapeType.none)
|
if (PhysicsShapeType == (byte)PhysShapeType.none)
|
||||||
|
{
|
||||||
|
if(ParentID == 0)
|
||||||
|
m_physicsShapeType = DefaultPhysicsShapeType();
|
||||||
|
else
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool isPhysical = (_ObjectFlags & (uint) PrimFlags.Physics) != 0;
|
bool isPhysical = (_ObjectFlags & (uint) PrimFlags.Physics) != 0;
|
||||||
bool isPhantom = (_ObjectFlags & (uint)PrimFlags.Phantom) != 0;
|
bool isPhantom = (_ObjectFlags & (uint)PrimFlags.Phantom) != 0;
|
||||||
|
|
Loading…
Reference in New Issue