Ejemplo n.º 1
0
        protected void GrabUpdate(UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient, List <SurfaceTouchEventArgs> surfaceArgs)
        {
            SceneObjectGroup group = m_sceneGraph.GetGroupByPrim(objectID);

            if (group != null)
            {
                SceneObjectPart part = group.GetChildPart(objectID);

                if (part != null)
                {
                    SurfaceTouchEventArgs surfaceArg = null;
                    if (surfaceArgs != null && surfaceArgs.Count > 0)
                    {
                        surfaceArg = surfaceArgs[0];
                    }

                    // If the touched prim handles touches, deliver it
                    // If not, deliver to root prim,if the root prim doesnt
                    // handle it, deliver a grab to the scene graph
                    if ((part.ScriptEvents & ScriptEvents.touch) != 0)
                    {
                        EventManager.TriggerObjectGrabUpdate(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
                    }
                    else if ((group.RootPart.ScriptEvents & ScriptEvents.touch) != 0)
                    {
                        EventManager.TriggerObjectGrabUpdate(group.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
                    }
                    else
                    {
                        //no one can handle it, send a grab
                        m_sceneGraph.MoveObject(objectID, offset, pos, remoteClient, surfaceArgs);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Invoked when the client selects a prim.
        /// </summary>
        /// <param name="primLocalID"></param>
        /// <param name="remoteClient"></param>
        public void SelectPrim(uint primLocalID, IClientAPI remoteClient)
        {
            SceneObjectGroup group = m_sceneGraph.GetGroupByPrim(primLocalID);

            if (group == null)
            {
                return;
            }

            if (group.LocalId == primLocalID)
            {
                group.GetProperties(remoteClient);
                group.IsSelected = true;

                // A prim is only tainted if it's allowed to be edited by the person clicking it.
                if (Permissions.CanEditObject(group.UUID, remoteClient.AgentId, 0) ||
                    Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))
                {
                    EventManager.TriggerParcelPrimCountTainted();
                }
            }
            else
            {
                //it's one of the child prims
                SceneObjectPart part = group.GetChildPart(primLocalID);
                part.GetProperties(remoteClient);
            }
        }
        public SceneObjectGroup GetRezReadySceneObject(TaskInventoryItem item)
        {
            AssetBase rezAsset = m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString());

            if (null == rezAsset)
            {
                m_log.WarnFormat(
                    "[PRIM INVENTORY]: Could not find asset {0} for inventory item {1} in {2}",
                    item.AssetID, item.Name, m_part.Name);
                return(null);
            }

            string           xmlData = Utils.BytesToString(rezAsset.Data);
            SceneObjectGroup group   = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);

            group.ResetIDs();

            SceneObjectPart rootPart = group.GetChildPart(group.UUID);

            // Since renaming the item in the inventory does not affect the name stored
            // in the serialization, transfer the correct name from the inventory to the
            // object itself before we rez.
            rootPart.Name        = item.Name;
            rootPart.Description = item.Description;

            SceneObjectPart[] partList = group.Parts;

            group.SetGroup(m_part.GroupID, null);

            if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0)
            {
                if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions())
                {
                    foreach (SceneObjectPart part in partList)
                    {
                        part.EveryoneMask  = item.EveryonePermissions;
                        part.NextOwnerMask = item.NextPermissions;
                    }

                    group.ApplyNextOwnerPermissions();
                }
            }

            foreach (SceneObjectPart part in partList)
            {
                if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0)
                {
                    part.LastOwnerID = part.OwnerID;
                    part.OwnerID     = item.OwnerID;
                    part.Inventory.ChangeInventoryOwner(item.OwnerID);
                }

                part.EveryoneMask  = item.EveryonePermissions;
                part.NextOwnerMask = item.NextPermissions;
            }

            rootPart.TrimPermissions();

            return(group);
        }
Ejemplo n.º 4
0
        public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient)
        {
            List <EntityBase> EntityList = GetEntities();

            foreach (EntityBase ent in EntityList)
            {
                if (ent is SceneObjectGroup)
                {
                    SceneObjectGroup obj = ent as SceneObjectGroup;

                    // Is this prim part of the group
                    if (obj.HasChildPrim(localID))
                    {
                        SceneObjectPart part = obj.GetChildPart(localID);
                        if (part != null)
                        {
                            // If the touched prim handles touches, deliver it
                            // If not, deliver to root prim
                            if ((part.ScriptEvents & scriptEvents.touch_end) != 0)
                            {
                                EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient);
                            }
                            else
                            {
                                EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient);
                            }

                            return;
                        }
                        return;
                    }
                }
            }
        }
Ejemplo n.º 5
0
        public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List <SurfaceTouchEventArgs> surfaceArgs)
        {
            List <EntityBase> EntityList = GetEntities();

            SurfaceTouchEventArgs surfaceArg = null;

            if (surfaceArgs != null && surfaceArgs.Count > 0)
            {
                surfaceArg = surfaceArgs[0];
            }

            foreach (EntityBase ent in EntityList)
            {
                if (ent is SceneObjectGroup)
                {
                    SceneObjectGroup obj = ent as SceneObjectGroup;
                    if (obj != null)
                    {
                        // Is this prim part of the group
                        if (obj.HasChildPrim(localID))
                        {
                            // Currently only grab/touch for the single prim
                            // the client handles rez correctly
                            obj.ObjectGrabHandler(localID, offsetPos, remoteClient);

                            SceneObjectPart part = obj.GetChildPart(localID);

                            // If the touched prim handles touches, deliver it
                            // If not, deliver to root prim
                            if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
                            {
                                EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
                            }
                            // Deliver to the root prim if the touched prim doesn't handle touches
                            // or if we're meant to pass on touches anyway. Don't send to root prim
                            // if prim touched is the root prim as we just did it
                            if (((part.ScriptEvents & scriptEvents.touch_start) == 0) ||
                                (part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
                            {
                                EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
                            }

                            return;
                        }
                    }
                }
            }
        }
Ejemplo n.º 6
0
        public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List <SurfaceTouchEventArgs> surfaceArgs)
        {
            SurfaceTouchEventArgs surfaceArg = null;

            if (surfaceArgs != null && surfaceArgs.Count > 0)
            {
                surfaceArg = surfaceArgs[0];
            }

            SceneObjectGroup obj = this.GetGroupByPrim(localID);

            if (obj != null)
            {
                // Is this prim part of the group
                if (obj.HasChildPrim(localID))
                {
                    // Currently only grab/touch for the single prim
                    // the client handles rez correctly
                    obj.ObjectGrabHandler(localID, offsetPos, remoteClient);

                    SceneObjectPart part = obj.GetChildPart(localID);

                    int touchEvents = ((int)ScriptEvents.touch_start | (int)ScriptEvents.touch | (int)ScriptEvents.touch_end);

                    bool hasTouchEvent = (((int)part.ScriptEvents & touchEvents) != 0);

                    // If the touched prim handles touches, deliver it
                    if (hasTouchEvent)
                    {
                        EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
                    }

                    // If not, or if PassTouches and we haven't just delivered it to the root prim, deliver it there
                    if ((!hasTouchEvent) || (part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
                    {
                        EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
                    }
                }
            }
        }
Ejemplo n.º 7
0
        public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List <SurfaceTouchEventArgs> surfaceArgs)
        {
            SurfaceTouchEventArgs surfaceArg = null;

            if (surfaceArgs != null && surfaceArgs.Count > 0)
            {
                surfaceArg = surfaceArgs[0];
            }

            SceneObjectGroup obj = this.GetGroupByPrim(localID);

            // Is this prim part of the group
            if (obj != null && obj.HasChildPrim(localID))
            {
                SceneObjectPart  part  = obj.GetChildPart(localID);
                SceneObjectGroup group = part.ParentGroup;
                if (part != null)
                {
                    // If the touched prim handles touches, deliver it
                    // If not, deliver to root prim
                    ScriptEvents eventsThatNeedDegrab = (ScriptEvents.touch_end | ScriptEvents.touch);

                    if ((part.ScriptEvents & eventsThatNeedDegrab) != 0)
                    {
                        EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient, surfaceArg);
                    }
                    else if ((group.RootPart.ScriptEvents & eventsThatNeedDegrab) != 0)
                    {
                        EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg);
                    }

                    // Always send an object degrab.
                    m_sceneGraph.DegrabObject(localID, remoteClient, surfaceArgs);

                    return;
                }
                return;
            }
        }
Ejemplo n.º 8
0
 public SceneObjectGroup CreateEntity(
     UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape)
 {
     if (Array.IndexOf(creationCapabilities, (PCode)shape.PCode) < 0)
     {
         m_log.DebugFormat("[VEGETATION]: PCode {0} not handled by {1}", shape.PCode, Name);
         return null;
     }
     
     SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
     SceneObjectPart rootPart = sceneObject.GetChildPart(sceneObject.UUID);
     
     // if grass or tree, make phantom
     //rootPart.TrimPermissions();
     rootPart.AddFlag(PrimFlags.Phantom);
     if (rootPart.Shape.PCode != (byte)PCode.Grass)
         AdaptTree(ref shape);
     
     m_scene.AddNewSceneObject(sceneObject, true);
     sceneObject.SetGroup(groupID, null);
     
     return sceneObject;
 }
Ejemplo n.º 9
0
        public virtual SceneObjectGroup RezPrim(SceneObjectPart sourcePart, SceneObjectPart newPart, int param, out string reason)
        {
            // Rez object
            Vector3 pos = newPart.AbsolutePosition;
            SceneObjectGroup group = new SceneObjectGroup(newPart);
            bool isTemp = (group.RootPart.GetEffectiveObjectFlags() & PrimFlags.TemporaryOnRez) != 0;

            ILandObject parcel = LandChannel.GetLandObject(pos.X, pos.Y);
            if (parcel == null)
            {
                reason = "land";
                return null;
            }

            // Pass 0 for landImpact here so that it can be tested separately.
            if (!Permissions.CanRezObject(0, newPart.OwnerID, sourcePart.UUID, pos, isTemp))
            {
                reason = "permission";
                return null;
            }

            if (!CheckLandImpact(parcel, group.LandImpact, out reason))
            {
                return null;
            }

            // Check for grey goo fence
            if (!CheckGreyGoo(sourcePart, group))
            {
                reason = "fence";
                return null;
            }

            // Allowing the rez... update the last rez time and the new group fields
            sourcePart.StampLastRez();
            group.CurrentParcel = parcel;   // initialize _currentParcel (and auto-return)
            group.SetGeneration(group.RootPart.Generation); // now update the rest of the parts
            group.ResetIDs();

            //set the group's group before setting the object's position.
            //this will make sure that the group id is correct during the script
            //engine's group check
            group.SetGroup(sourcePart.ParentGroup.RootPart.GroupID, null);

            AddNewSceneObject(group, !isTemp);

            SceneObjectPart rootPart = group.GetChildPart(group.UUID);

            rootPart.TrimPermissions();

            if (group.RootPart.IsPrim)
            {
                group.ClearPartAttachmentData();
            }

            group.CreateScriptInstances(param, ScriptStartFlags.PostOnRez, DefaultScriptEngine, (int)ScriptStateSource.PrimData, null);
            rootPart.ScheduleFullUpdate(PrimUpdateFlags.ForcedFullUpdate);

            reason = "success";
            return rootPart.ParentGroup;
        }
Ejemplo n.º 10
0
        private SceneObjectGroup RezSingleObjectToWorld(IClientAPI remoteClient, UUID itemID, 
            SceneObjectGroup group, Vector3 RayEnd, Vector3 RayStart,
            UUID RayTargetID, byte BypassRayCast, byte bRayEndIsIntersection,
            bool RezSelected, bool attachment, Vector3 pos, string name,
            string description, IInventoryItem item, ItemPermissionBlock itemPermissions,
            int? startParam, UUID? newAvatarGroupId, UUID? rezzedByObjectUUID)
        {
            bool ownerChanged = false;  // record this for the CHANGED_OWNER changed event

            if (IsBadUserLoad(group))
            {
                if (remoteClient != null)
                    remoteClient.SendAgentAlertMessage("You are currently not allowed to rez objects in this region.", false);
                return null;   // already reported above
            }
            if (IsBlacklistedLoad(group))
            {
                if (remoteClient != null)
                    remoteClient.SendAgentAlertMessage("Cannot rez blacklisted object '" + group.Name + "'.", false);
                return null;   // already reported above
            }

            //set the group here so that positioning in world will enable/disable the
            //script correctly based on the group the use is currently in

            // Initialize the server weight (LI)
            group.RecalcPrimWeights();

            group.RezzedFromFolderId = item.Folder;
            //group.FromAssetId = item.AssetID; //not needed yet

            if (newAvatarGroupId.HasValue)
            {
                //set the object's land group
                group.SetGroup(newAvatarGroupId.Value, null);
            }

            if (attachment)
            {
                group.SetFromItemID(itemID);
            }
            else
            {
                group.RootPart.SetGroupPositionDirect(pos);

                if (RezSelected)
                {
                    //also tell the client there is a new object being rezzed
                    foreach (SceneObjectPart part in group.GetParts())
                    {
                        part.AddFlag(PrimFlags.CreateSelected);
                    }
                }
            }

            SceneObjectPart rootPart = group.GetChildPart(group.UUID);
            if (rootPart == null) {
                string what = "object ";
                if (attachment)
                    what = " attachment ";
                m_log.Error("[AGENT INVENTORY]: Error rezzing ItemID: " + itemID + what + " root part not found.");
                return null;
            }

            // Since renaming the item in the inventory does not affect the name stored
            // in the serialization, transfer the correct name from the inventory to the
            // object itself before we rez.
            rootPart.Name = name;
            rootPart.Description = description;

            var partList = group.GetParts();

            foreach (SceneObjectPart part in partList)
            {
                /// This fixes inconsistencies between this part and the root part.
                /// In the past, there was a bug in Link operations that did not force 
                /// these permissions on child prims when linking.
                part.SyncChildPermsWithRoot();
            }

            if (rootPart.OwnerID != item.Owner)
            {
                if (Permissions.PropagatePermissions())
                {
                    if ((itemPermissions.CurrentPermissions & ScenePermBits.SLAM) != 0)
                    {    // enforce slam bit, apply item perms to the group parts
                        foreach (SceneObjectPart part in partList)
                        {
                            part.EveryoneMask = item.EveryOnePermissions;
                            part.NextOwnerMask = item.NextPermissions;
                            part.GroupMask = 0; // DO NOT propagate here
                        }
                    }
                    group.ApplyNextOwnerPermissions();
                }
            }

            ownerChanged |= group.Rationalize(item.Owner, false);

            foreach (SceneObjectPart part in partList)
            {
                if (part.OwnerID != item.Owner)
                {
                    part.LastOwnerID = part.OwnerID;
                    part.OwnerID = item.Owner;
                    part.Inventory.ChangeInventoryOwner(item.Owner);
                    ownerChanged = true;
                }
                else if (((itemPermissions.CurrentPermissions & ScenePermBits.SLAM) != 0) && (!attachment)) // Slam!
                {
                    part.EveryoneMask = itemPermissions.EveryOnePermissions;
                    part.NextOwnerMask = itemPermissions.NextPermissions;

                    part.GroupMask = 0; // DO NOT propagate here
                }
            }

            rootPart.TrimPermissions();

            if (!attachment)
            {
                if (group.RootPart.IsPrim)
                {
                    group.ClearPartAttachmentData();
                }
            }

            if (this.AddObjectToSceneIfPermitted(group, remoteClient, pos, attachment, rezzedByObjectUUID))
            {
                if (ownerChanged)
                {
                    foreach (SceneObjectPart part in partList)
                        part.TriggerScriptChangedEvent(Changed.OWNER);
                }

                if (!attachment)
                {
                    // Fire on_rez
                    group.CreateScriptInstances(startParam, ScriptStartFlags.PostOnRez, DefaultScriptEngine, (int)ScriptStateSource.PrimData, null);

                    rootPart.ScheduleFullUpdate(PrimUpdateFlags.ForcedFullUpdate);
                }

            } 
            else 
            {
                // The viewer automatically removes no-copy items from inventory on a rez attempt.
                // Since this one did not rez, it's still in inventory so let's "put it back".
                if (remoteClient != null)
                {
                    InventoryItemBase ib = item as InventoryItemBase;

                    if (item != null)
                    {
                        //this is a folder item, not a task item. update the user
                        remoteClient.SendInventoryItemCreateUpdate(ib, 0);
                    }
                }
                return null;
            }

            return rootPart.ParentGroup;
        }
Ejemplo n.º 11
0
        public SceneObjectGroup CreateEntity(
            UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape)
        {
            if (Array.IndexOf(creationCapabilities, (PCode)shape.PCode) < 0)
            {
                m_log.DebugFormat("[VEGETATION]: PCode {0} not handled by {1}", shape.PCode, Name);
                return null;
            }

            SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape, m_scene);
            SceneObjectPart rootPart = sceneObject.GetChildPart(sceneObject.UUID);

            rootPart.AddFlag(PrimFlags.Phantom);
            if (rootPart.Shape.PCode != (byte)PCode.Grass)
            {
                // Tree size has to be adapted depending on its type
                switch ((Tree)rootPart.Shape.State)
                {
                    case Tree.Cypress1:
                    case Tree.Cypress2:
                    case Tree.Palm1:
                    case Tree.Palm2:
                    case Tree.WinterAspen:
                        rootPart.Scale = new Vector3(4, 4, 10);
                        break;
                    case Tree.WinterPine1:
                    case Tree.WinterPine2:
                        rootPart.Scale = new Vector3(4, 4, 20);
                        break;

                    case Tree.Dogwood:
                        rootPart.Scale = new Vector3(6.5f, 6.5f, 6.5f);
                        break;

                    // case... other tree types
                    // tree.Scale = new Vector3(?, ?, ?);
                    // break;

                    default:
                        rootPart.Scale = new Vector3(4, 4, 4);
                        break;
                }
            }

            m_scene.AddPrimToScene(sceneObject);
            sceneObject.ScheduleGroupForFullUpdate(PrimUpdateFlags.FullUpdate);
            sceneObject.SetGroup(groupID, null);

            return sceneObject;
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Returns true if there was a change between meta entity and the entity group, false otherwise.
        /// If true is returned, it is assumed the metaentity's appearance has changed to reflect the difference (though clients haven't been updated).
        /// </summary>
        public bool MarkWithDifferences(SceneObjectGroup sceneEntityGroup)
        {
            SceneObjectPart sceneEntityPart;
            SceneObjectPart metaEntityPart;
            Diff differences;
            bool changed = false;

            // Use "UnchangedEntity" to do comparisons because its text, transparency, and other attributes will be just as the user
            // had originally saved.
            // m_Entity will NOT necessarily be the same entity as the user had saved.
            foreach (SceneObjectPart UnchangedPart in m_UnchangedEntity.Parts)
            {
                //This is the part that we use to show changes.
                metaEntityPart = m_Entity.GetLinkNumPart(UnchangedPart.LinkNum);
                if (sceneEntityGroup.ContainsPart(UnchangedPart.UUID))
                {
                    sceneEntityPart = sceneEntityGroup.GetChildPart(UnchangedPart.UUID);
                    differences = Difference.FindDifferences(UnchangedPart, sceneEntityPart);
                    if (differences != Diff.NONE)
                        metaEntityPart.Text = "CHANGE: " + differences.ToString();
                    if (differences != 0)
                    {
                        // Root Part that has been modified
                        if ((differences & Diff.POSITION) > 0)
                        {
                            // If the position of any part has changed, make sure the RootPart of the
                            // meta entity is pointing with a beam particle system
                            if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
                            {
                                m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
                                m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
                            }
                            BeamMetaEntity beamGroup = new BeamMetaEntity(m_Entity.Scene,
                                                                          m_UnchangedEntity.RootPart.GetWorldPosition(),
                                                                          MetaEntity.TRANSLUCENT,
                                                                          sceneEntityPart,
                                                                          new Vector3(0, 0, 254)
                                                                          );
                            m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup);
                        }

                        if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
                        {
                            m_AuraEntities[UnchangedPart.UUID].HideFromAll();
                            m_AuraEntities.Remove(UnchangedPart.UUID);
                        }
                        AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
                                                                      UnchangedPart.GetWorldPosition(),
                                                                      MetaEntity.TRANSLUCENT,
                                                                      new Vector3(0, 0, 254),
                                                                      UnchangedPart.Scale
                                                                      );
                        m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
                        SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT);

                        DiffersFromSceneGroup = true;
                    }
                    else // no differences between scene part and meta part
                    {
                        if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
                        {
                            m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
                            m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
                        }
                        if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
                        {
                            m_AuraEntities[UnchangedPart.UUID].HideFromAll();
                            m_AuraEntities.Remove(UnchangedPart.UUID);
                        }
                        SetPartTransparency(metaEntityPart, MetaEntity.NONE);
                    }
                }
                else  //The entity currently in the scene is missing parts from the metaentity saved, so mark parts red as deleted.
                {
                    if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
                    {
                        m_AuraEntities[UnchangedPart.UUID].HideFromAll();
                        m_AuraEntities.Remove(UnchangedPart.UUID);
                    }
                    AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
                                                                  UnchangedPart.GetWorldPosition(),
                                                                  MetaEntity.TRANSLUCENT,
                                                                  new Vector3(254, 0, 0),
                                                                  UnchangedPart.Scale
                                                                  );
                    m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
                    SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT);

                    DiffersFromSceneGroup = true;
                }
            }
            
            return changed;
        }
Ejemplo n.º 13
0
 public SceneObjectGroup CreateEntity(UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape)
 {
     if (Array.IndexOf(creationCapabilities, (PCode)shape.PCode) < 0)
     {
         m_log.DebugFormat("[VEGETATION]: PCode {0} not handled by {1}", shape.PCode, Name);
         return null;
     }
     SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
     SceneObjectPart rootPart = sceneObject.GetChildPart(sceneObject.UUID);
     rootPart.AddFlag(PrimFlags.Phantom);
     m_scene.AddNewSceneObject(sceneObject, false);
     sceneObject.SetGroup(groupID, null);
     return sceneObject;
 }