refactor: Remove redundant code in SOP.UpdatePrimFlags()
parent
c93c9ea072
commit
732e937379
|
@ -4411,9 +4411,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (ParentGroup.Scene == null)
|
||||
return;
|
||||
|
||||
PhysicsActor pa = PhysActor;
|
||||
|
||||
if (pa == null)
|
||||
if (PhysActor == null)
|
||||
{
|
||||
// It's not phantom anymore. So make sure the physics engine get's knowledge of it
|
||||
PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
|
||||
|
@ -4425,9 +4423,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
UsePhysics,
|
||||
m_localId);
|
||||
|
||||
pa = PhysActor;
|
||||
if (pa != null)
|
||||
{
|
||||
PhysActor.SetMaterial(Material);
|
||||
DoPhysicsPropertyUpdate(UsePhysics, true);
|
||||
|
||||
|
@ -4453,10 +4448,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
PhysActor.SubscribeEvents(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue