Enforce physical prim max size on single prims.

Also convert a lock() to ReaderWriterLockSlim that i missed in the last commit
avinationmerge
CasperW 2009-11-30 21:52:55 +01:00
parent 9888f95068
commit 2e6dce434f
1 changed files with 59 additions and 62 deletions

View File

@ -2871,11 +2871,9 @@ namespace OpenSim.Region.Framework.Scenes
scale.Y = m_scene.m_maxNonphys;
if (scale.Z > m_scene.m_maxNonphys)
scale.Z = m_scene.m_maxNonphys;
SceneObjectPart part = GetChildPart(localID);
if (part != null)
{
part.Resize(scale);
if (part.PhysActor != null)
{
if (part.PhysActor.IsPhysical)
@ -2890,7 +2888,7 @@ namespace OpenSim.Region.Framework.Scenes
part.PhysActor.Size = scale;
m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor);
}
//if (part.UUID != m_rootPart.UUID)
part.Resize(scale);
HasGroupChanged = true;
ScheduleGroupForFullUpdate();
@ -2931,8 +2929,7 @@ namespace OpenSim.Region.Framework.Scenes
float y = (scale.Y / part.Scale.Y);
float z = (scale.Z / part.Scale.Z);
lock (m_parts)
{
lockPartsForRead(true);
if (x > 1.0f || y > 1.0f || z > 1.0f)
{
foreach (SceneObjectPart obPart in m_parts.Values)
@ -3001,7 +2998,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
}
lockPartsForRead(false);
Vector3 prevScale = part.Scale;
prevScale.X *= x;