Merge commit '732e9373795a35ed1965bbb93a02117fcf0a8c3e' into bigmerge
commit
28d2103439
|
@ -4466,9 +4466,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentGroup.Scene == null)
|
if (ParentGroup.Scene == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PhysicsActor pa = PhysActor;
|
if (PhysActor == null)
|
||||||
|
|
||||||
if (pa == null)
|
|
||||||
{
|
{
|
||||||
// It's not phantom anymore. So make sure the physics engine get's knowledge of it
|
// It's not phantom anymore. So make sure the physics engine get's knowledge of it
|
||||||
PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
|
PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
|
||||||
|
@ -4480,38 +4478,34 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
UsePhysics,
|
UsePhysics,
|
||||||
m_localId);
|
m_localId);
|
||||||
|
|
||||||
pa = PhysActor;
|
PhysActor.SetMaterial(Material);
|
||||||
if (pa != null)
|
DoPhysicsPropertyUpdate(UsePhysics, true);
|
||||||
|
|
||||||
|
if (!m_parentGroup.IsDeleted)
|
||||||
{
|
{
|
||||||
PhysActor.SetMaterial(Material);
|
if (LocalId == m_parentGroup.RootPart.LocalId)
|
||||||
DoPhysicsPropertyUpdate(UsePhysics, true);
|
|
||||||
|
|
||||||
if (!m_parentGroup.IsDeleted)
|
|
||||||
{
|
{
|
||||||
if (LocalId == m_parentGroup.RootPart.LocalId)
|
m_parentGroup.CheckSculptAndLoad();
|
||||||
{
|
|
||||||
m_parentGroup.CheckSculptAndLoad();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
((AggregateScriptEvents & scriptEvents.collision) != 0) ||
|
((AggregateScriptEvents & scriptEvents.collision) != 0) ||
|
||||||
((AggregateScriptEvents & scriptEvents.collision_end) != 0) ||
|
((AggregateScriptEvents & scriptEvents.collision_end) != 0) ||
|
||||||
((AggregateScriptEvents & scriptEvents.collision_start) != 0) ||
|
((AggregateScriptEvents & scriptEvents.collision_start) != 0) ||
|
||||||
((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) ||
|
((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) ||
|
||||||
((AggregateScriptEvents & scriptEvents.land_collision) != 0) ||
|
((AggregateScriptEvents & scriptEvents.land_collision) != 0) ||
|
||||||
((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) ||
|
((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) ||
|
||||||
(CollisionSound != UUID.Zero)
|
(CollisionSound != UUID.Zero)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
PhysActor.OnCollisionUpdate += PhysicsCollision;
|
PhysActor.OnCollisionUpdate += PhysicsCollision;
|
||||||
PhysActor.SubscribeEvents(1000);
|
PhysActor.SubscribeEvents(1000);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // it already has a physical representation
|
else // it already has a physical representation
|
||||||
{
|
{
|
||||||
pa.IsPhysical = UsePhysics;
|
PhysActor.IsPhysical = UsePhysics;
|
||||||
|
|
||||||
DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. If it's phantom this will remove the prim
|
DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. If it's phantom this will remove the prim
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue