コード例 #1
0
ファイル: SceneGraph.cs プロジェクト: CassieEllen/opensim
 protected internal void PrimMaterial(IClientAPI remoteClient, uint primLocalID, string material)
 {
     SceneObjectGroup group = GetGroupByPrim(primLocalID);
     if (group != null)
     {
         if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
         {
             SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID);
             if (part != null)
             {
                 part.Material = Convert.ToByte(material);
                 group.HasGroupChanged = true;
                 remoteClient.SendPartPhysicsProprieties(part);
             }
         }
     }
 }
コード例 #2
0
ファイル: SceneGraph.cs プロジェクト: rryk/omp-server
        /// <summary>
        /// Update the flags on a scene object.  This covers properties such as phantom, physics and temporary.
        /// </summary>
        /// <remarks>
        /// This is currently handling the incoming call from the client stack (e.g. LLClientView).
        /// </remarks>
        /// <param name="localID"></param>
        /// <param name="UsePhysics"></param>
        /// <param name="SetTemporary"></param>
        /// <param name="SetPhantom"></param>
        /// <param name="remoteClient"></param>
        protected internal void UpdatePrimFlags(
            uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, ExtraPhysicsData PhysData, IClientAPI remoteClient)
        {
            SceneObjectGroup group = GetGroupByPrim(localID);
            if (group != null)
            {
                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
                    // 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);
                        }
                    }
                }
            }
        }
コード例 #3
0
ファイル: SceneGraph.cs プロジェクト: CassieEllen/opensim
        /// <summary>
        /// Update the flags on a scene object.  This covers properties such as phantom, physics and temporary.
        /// </summary>
        /// <remarks>
        /// This is currently handling the incoming call from the client stack (e.g. LLClientView).
        /// </remarks>
        /// <param name="localID"></param>
        /// <param name="UsePhysics"></param>
        /// <param name="SetTemporary"></param>
        /// <param name="SetPhantom"></param>
        /// <param name="remoteClient"></param>
        protected internal void UpdatePrimFlags(
            uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, ExtraPhysicsData PhysData, IClientAPI remoteClient)
        {
            SceneObjectGroup group = GetGroupByPrim(localID);
            if (group != null)
            {
                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
                    // now only change volume dtc if phantom off

                    bool wantedPhys = UsePhysics;
                    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 != null)
                                remoteClient.SendPartPhysicsProprieties(part);
                        }
                    }

                    if (wantedPhys != group.UsesPhysics && remoteClient != null)
                    {
                        remoteClient.SendAlertMessage("Object physics canceled because exceeds the limit of " +
                            m_parentScene.m_linksetPhysCapacity + " physical prims with shape type not set to None");
                        group.RootPart.ScheduleFullUpdate();
                    }
                }
            }
        }