* Found several cases where prim set physical were not subscribing to physics events.
parent
f71fa731f5
commit
46ccfa1741
|
@ -449,7 +449,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
|
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
|
||||||
new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
|
new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
|
||||||
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
|
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
|
||||||
|
|
||||||
|
rootPart.doPhysicsPropertyUpdate(UsePhysics);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
rootPart.ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -647,6 +647,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// if not phantom, add to physics
|
// if not phantom, add to physics
|
||||||
bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim);
|
bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim);
|
||||||
if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
|
if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
|
||||||
|
{
|
||||||
|
|
||||||
rootPart.PhysActor =
|
rootPart.PhysActor =
|
||||||
phyScene.AddPrimShape(
|
phyScene.AddPrimShape(
|
||||||
rootPart.Name,
|
rootPart.Name,
|
||||||
|
@ -654,6 +656,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
new PhysicsVector(pos.X, pos.Y, pos.Z),
|
new PhysicsVector(pos.X, pos.Y, pos.Z),
|
||||||
new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z),
|
new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z),
|
||||||
new Quaternion(), UsePhysics);
|
new Quaternion(), UsePhysics);
|
||||||
|
// subscribe to physics events.
|
||||||
|
rootPart.doPhysicsPropertyUpdate(UsePhysics);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -480,6 +480,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X,
|
new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X,
|
||||||
dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z),
|
dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z),
|
||||||
dupe.RootPart.PhysActor.IsPhysical);
|
dupe.RootPart.PhysActor.IsPhysical);
|
||||||
|
dupe.RootPart.doPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical);
|
||||||
|
|
||||||
}
|
}
|
||||||
// Now we've made a copy that replaces this one, we need to
|
// Now we've made a copy that replaces this one, we need to
|
||||||
// switch the owner to the person who did the copying
|
// switch the owner to the person who did the copying
|
||||||
|
@ -859,6 +861,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
new Quaternion(linkPart.RotationOffset.W, linkPart.RotationOffset.X,
|
new Quaternion(linkPart.RotationOffset.W, linkPart.RotationOffset.X,
|
||||||
linkPart.RotationOffset.Y, linkPart.RotationOffset.Z),
|
linkPart.RotationOffset.Y, linkPart.RotationOffset.Z),
|
||||||
m_rootPart.PhysActor.IsPhysical);
|
m_rootPart.PhysActor.IsPhysical);
|
||||||
|
m_rootPart.doPhysicsPropertyUpdate(m_rootPart.PhysActor.IsPhysical);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart);
|
SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart);
|
||||||
|
@ -1165,6 +1169,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X,
|
new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X,
|
||||||
m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z),
|
m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z),
|
||||||
m_rootPart.PhysActor.IsPhysical);
|
m_rootPart.PhysActor.IsPhysical);
|
||||||
|
bool UsePhysics = ((m_rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0);
|
||||||
|
m_rootPart.doPhysicsPropertyUpdate(UsePhysics);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -892,10 +892,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
new PhysicsVector(Scale.X, Scale.Y, Scale.Z),
|
new PhysicsVector(Scale.X, Scale.Y, Scale.Z),
|
||||||
new Quaternion(RotationOffset.W, RotationOffset.X,
|
new Quaternion(RotationOffset.W, RotationOffset.X,
|
||||||
RotationOffset.Y, RotationOffset.Z), UsePhysics);
|
RotationOffset.Y, RotationOffset.Z), UsePhysics);
|
||||||
|
doPhysicsPropertyUpdate(UsePhysics);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PhysActor.IsPhysical = UsePhysics;
|
PhysActor.IsPhysical = UsePhysics;
|
||||||
|
doPhysicsPropertyUpdate(UsePhysics);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
|
SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
|
||||||
bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim);
|
bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim);
|
||||||
if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
|
if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
|
||||||
|
{
|
||||||
rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape(
|
rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape(
|
||||||
rootPart.Name,
|
rootPart.Name,
|
||||||
rootPart.Shape,
|
rootPart.Shape,
|
||||||
|
@ -54,6 +55,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
|
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
|
||||||
new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
|
new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
|
||||||
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
|
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
|
||||||
|
rootPart.doPhysicsPropertyUpdate(UsePhysics);
|
||||||
|
|
||||||
|
}
|
||||||
primCount++;
|
primCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,6 +116,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
|
SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
|
||||||
bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim);
|
bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim);
|
||||||
if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
|
if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
|
||||||
|
{
|
||||||
rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape(
|
rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape(
|
||||||
rootPart.Name,
|
rootPart.Name,
|
||||||
rootPart.Shape,
|
rootPart.Shape,
|
||||||
|
@ -120,6 +125,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
|
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
|
||||||
new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
|
new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
|
||||||
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
|
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
|
||||||
|
rootPart.doPhysicsPropertyUpdate(UsePhysics);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SavePrimsToXml2(string fileName)
|
public void SavePrimsToXml2(string fileName)
|
||||||
|
|
Loading…
Reference in New Issue