Plumb the path from the client to the extra physics params and back

This commit is contained in:
Melanie
2013-02-07 22:25:28 +00:00
parent 338b02a8bc
commit 7bf33d333a
10 changed files with 127 additions and 7 deletions

View File

@@ -1408,7 +1408,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="SetPhantom"></param>
/// <param name="remoteClient"></param>
protected internal void UpdatePrimFlags(
uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, IClientAPI remoteClient)
uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, ExtraPhysicsData PhysData, IClientAPI remoteClient)
{
SceneObjectGroup group = GetGroupByPrim(localID);
if (group != null)
@@ -1416,7 +1416,28 @@ namespace OpenSim.Region.Framework.Scenes
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
{
// VolumeDetect can't be set via UI and will always be off when a change is made there
group.UpdatePrimFlags(localID, UsePhysics, SetTemporary, SetPhantom, false);
// now only change volume dtc if phantom off
if (PhysData.PhysShapeType == PhysShapeType.invalid) // check for extraPhysics data
{
bool vdtc;
if (SetPhantom) // if phantom keep volumedtc
vdtc = group.RootPart.VolumeDetectActive;
else // else turn it off
vdtc = false;
group.UpdatePrimFlags(localID, UsePhysics, SetTemporary, SetPhantom, vdtc);
}
else
{
SceneObjectPart part = GetSceneObjectPart(localID);
if (part != null)
{
part.UpdateExtraPhysics(PhysData);
if (part.UpdatePhysRequired)
remoteClient.SendPartPhysicsProprieties(part);
}
}
}
}
}