fix a bad reset of shapetype on pbshape change, added missing checksculpload ( to reload mesh on change )

avinationmerge
UbitUmarov 2012-03-21 15:27:33 +00:00
parent a03c55fee7
commit 68736aa460
1 changed files with 10 additions and 7 deletions

View File

@ -989,7 +989,6 @@ namespace OpenSim.Region.Framework.Scenes
set
{
m_shape = value;
m_physicsShapeType = DefaultPhysicsShapeType();
}
}
@ -1003,7 +1002,6 @@ namespace OpenSim.Region.Framework.Scenes
{
if (m_shape != null)
{
// StoreUndoState();
m_shape.Scale = value;
@ -1498,6 +1496,7 @@ namespace OpenSim.Region.Framework.Scenes
set
{
byte oldv = m_physicsShapeType;
if (value >= 0 && value <= (byte)PhysShapeType.convex)
{
if (value == (byte)PhysShapeType.none && ParentGroup != null && ParentGroup.RootPart == this)
@ -1508,7 +1507,6 @@ namespace OpenSim.Region.Framework.Scenes
else
m_physicsShapeType = DefaultPhysicsShapeType();
if (m_physicsShapeType != oldv && ParentGroup != null)
{
if (m_physicsShapeType == (byte)PhysShapeType.none)
@ -1526,13 +1524,18 @@ namespace OpenSim.Region.Framework.Scenes
else if (PhysActor == null)
ApplyPhysics((uint)Flags, VolumeDetectActive, false);
else
PhysActor.PhysicsShapeType = m_physicsShapeType;
}
if (m_physicsShapeType != value)
{
PhysActor.PhysicsShapeType = m_physicsShapeType;
if (Shape.SculptEntry)
CheckSculptAndLoad();
}
if (ParentGroup != null)
ParentGroup.HasGroupChanged = true;
}
if (m_physicsShapeType != value)
{
UpdatePhysRequired = true;
}
}