* Remove responsibilty for signalling scene object change from SceneObjectPart.SendFullUpdate()
* This means that we will no longer pointlessly repersist all the prims in the scene when OpenSim first starts up * This also means that force-update on the console will not trigger repersistence. * Also, in other places persistence is no longer done where it wasn't actually necessary * I think I changed the code for all instances correctly, but it's not possible that I missed some and some things which did persist properly have stopped * Please patch or mantis if this is the case0.6.0-stable
							parent
							
								
									cea6e03ae0
								
							
						
					
					
						commit
						9bf67201c3
					
				| 
						 | 
				
			
			@ -1522,6 +1522,7 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
                    }
 | 
			
		||||
 | 
			
		||||
                    copy.StartScripts();
 | 
			
		||||
                    copy.HasGroupChanged = true;
 | 
			
		||||
                    copy.ScheduleGroupForFullUpdate();
 | 
			
		||||
                    return copy;
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -477,6 +477,7 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
            newPart.LinkNum = m_parts.Count;
 | 
			
		||||
            m_parts.Add(newPart.UUID, newPart);
 | 
			
		||||
            SetPartAsRoot(newPart);
 | 
			
		||||
            
 | 
			
		||||
            // one of these is a proxy.
 | 
			
		||||
            if (shape.PCode != (byte)PCode.None && shape.PCode != (byte)PCode.ParticleSystem)
 | 
			
		||||
                AttachToBackup();
 | 
			
		||||
| 
						 | 
				
			
			@ -686,7 +687,12 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
            m_rootPart = part;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Attach this scene object to the given avatar.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="agentID"></param>
 | 
			
		||||
        /// <param name="attachmentpoint"></param>
 | 
			
		||||
        /// <param name="AttachOffset"></param>
 | 
			
		||||
        public void AttachToAgent(LLUUID agentID, uint attachmentpoint, LLVector3 AttachOffset)
 | 
			
		||||
        {
 | 
			
		||||
            ScenePresence avatar = m_scene.GetScenePresence(agentID);
 | 
			
		||||
| 
						 | 
				
			
			@ -752,6 +758,7 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
            m_rootPart.SetAttachmentPoint((byte)0);
 | 
			
		||||
            m_rootPart.m_IsAttachment = false;
 | 
			
		||||
            m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim);
 | 
			
		||||
            HasGroupChanged = true;
 | 
			
		||||
            AttachToBackup();
 | 
			
		||||
            m_rootPart.ScheduleFullUpdate();
 | 
			
		||||
            m_rootPart.ClearUndoState();
 | 
			
		||||
| 
						 | 
				
			
			@ -1026,6 +1033,7 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
                lock (m_targets)
 | 
			
		||||
                    m_targets.Clear();
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            ScheduleGroupForFullUpdate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1037,6 +1045,7 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
                                   (int) (color.z * 0xff));
 | 
			
		||||
            Text = text;
 | 
			
		||||
 | 
			
		||||
            HasGroupChanged = true;
 | 
			
		||||
            m_rootPart.ScheduleFullUpdate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1229,6 +1238,7 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
 | 
			
		||||
                dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true);
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            // Now we've made a copy that replaces this one, we need to
 | 
			
		||||
            // switch the owner to the person who did the copying
 | 
			
		||||
            // Second Life copies an object and duplicates the first one in it's place
 | 
			
		||||
| 
						 | 
				
			
			@ -1257,8 +1267,9 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
            if (userExposed)
 | 
			
		||||
            {
 | 
			
		||||
                dupe.UpdateParentIDs();
 | 
			
		||||
 | 
			
		||||
                dupe.HasGroupChanged = true;
 | 
			
		||||
                dupe.AttachToBackup();
 | 
			
		||||
                
 | 
			
		||||
                ScheduleGroupForFullUpdate();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1386,7 +1397,6 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
            part.OwnerID = cAgentID;
 | 
			
		||||
            part.GroupID = cGroupID;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            if (part.OwnerID != cAgentID)
 | 
			
		||||
            {
 | 
			
		||||
                // Apply Next Owner Permissions if we're not bypassing permissions
 | 
			
		||||
| 
						 | 
				
			
			@ -1535,7 +1545,6 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
        /// </summary>
 | 
			
		||||
        public void ScheduleGroupForFullUpdate()
 | 
			
		||||
        {
 | 
			
		||||
            HasGroupChanged = true;
 | 
			
		||||
            checkAtTargets();
 | 
			
		||||
            lock (m_parts)
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -1774,6 +1783,7 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
            // The traffic caused is always going to be pretty minor, so it's not high priority
 | 
			
		||||
            //objectGroup.DeleteGroup();
 | 
			
		||||
 | 
			
		||||
            HasGroupChanged = true;
 | 
			
		||||
            ScheduleGroupForFullUpdate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1834,6 +1844,7 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
 | 
			
		||||
                m_scene.AddNewSceneObject(objectGroup, true);
 | 
			
		||||
 | 
			
		||||
                HasGroupChanged = true;
 | 
			
		||||
                ScheduleGroupForFullUpdate();
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
| 
						 | 
				
			
			@ -2112,6 +2123,8 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
                    m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor);
 | 
			
		||||
                }
 | 
			
		||||
                //if (part.UUID != m_rootPart.UUID)
 | 
			
		||||
                
 | 
			
		||||
                HasGroupChanged = true;
 | 
			
		||||
                ScheduleGroupForFullUpdate();
 | 
			
		||||
 | 
			
		||||
                //if (part.UUID == m_rootPart.UUID)
 | 
			
		||||
| 
						 | 
				
			
			@ -2552,6 +2565,8 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
                {
 | 
			
		||||
                    part.SetGroup(GroupID, client);
 | 
			
		||||
                }
 | 
			
		||||
                
 | 
			
		||||
                HasGroupChanged = true;
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            ScheduleGroupForFullUpdate();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -454,11 +454,12 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
                        }
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
                    
 | 
			
		||||
                    if (scriptcount <= 0)
 | 
			
		||||
                    {
 | 
			
		||||
                        RemFlag(LLObject.ObjectFlags.Scripted);
 | 
			
		||||
                        ScheduleFullUpdate();
 | 
			
		||||
                    }
 | 
			
		||||
                    
 | 
			
		||||
                    ScheduleFullUpdate();
 | 
			
		||||
 | 
			
		||||
                    return type;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1660,7 +1660,6 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
        {
 | 
			
		||||
            if (m_parentGroup != null)
 | 
			
		||||
            {
 | 
			
		||||
                m_parentGroup.HasGroupChanged = true;
 | 
			
		||||
                m_parentGroup.QueueForUpdateCheck();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1766,7 +1765,7 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
        #region Shape
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        ///
 | 
			
		||||
        /// Update the shape of this part.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="shapeBlock"></param>
 | 
			
		||||
        public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock)
 | 
			
		||||
| 
						 | 
				
			
			@ -1793,6 +1792,8 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
            {
 | 
			
		||||
                PhysActor.Shape = m_shape;
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            ParentGroup.HasGroupChanged = true;
 | 
			
		||||
            ScheduleFullUpdate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -2012,6 +2013,7 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
                }
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            ParentGroup.HasGroupChanged = true;
 | 
			
		||||
            ScheduleFullUpdate();
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
| 
						 | 
				
			
			@ -2066,13 +2068,15 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
        #region Texture
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        ///
 | 
			
		||||
        /// Update the texture entry for this part.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="textureEntry"></param>
 | 
			
		||||
        public void UpdateTextureEntry(byte[] textureEntry)
 | 
			
		||||
        {
 | 
			
		||||
            m_shape.TextureEntry = textureEntry;
 | 
			
		||||
            TriggerScriptChangedEvent(Changed.TEXTURE);
 | 
			
		||||
            
 | 
			
		||||
            ParentGroup.HasGroupChanged = true;
 | 
			
		||||
            ScheduleFullUpdate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -2301,7 +2305,7 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
        #region Resizing/Scale
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        ///
 | 
			
		||||
        /// Resize this part.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="scale"></param>
 | 
			
		||||
        public void Resize(LLVector3 scale)
 | 
			
		||||
| 
						 | 
				
			
			@ -2309,6 +2313,7 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
            StoreUndoState();
 | 
			
		||||
            m_shape.Scale = scale;
 | 
			
		||||
 | 
			
		||||
            ParentGroup.HasGroupChanged = true;
 | 
			
		||||
            ScheduleFullUpdate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -2576,12 +2581,24 @@ namespace OpenSim.Region.Environment.Scenes
 | 
			
		|||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Set the text displayed for this part.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="text"></param>
 | 
			
		||||
        public void SetText(string text)
 | 
			
		||||
        {
 | 
			
		||||
            Text = text;
 | 
			
		||||
            
 | 
			
		||||
            ParentGroup.HasGroupChanged = true;
 | 
			
		||||
            ScheduleFullUpdate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Set the text displayed for this part.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="text"></param>
 | 
			
		||||
        /// <param name="color"></param>
 | 
			
		||||
        /// <param name="alpha"></param>
 | 
			
		||||
        public void SetText(string text, Vector3 color, double alpha)
 | 
			
		||||
        {
 | 
			
		||||
            Color = Color.FromArgb(0xff - (int) (alpha*0xff),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1058,6 +1058,19 @@ namespace OpenSim.Region.ScriptEngine.Common
 | 
			
		|||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Set flexi parameters of a part.
 | 
			
		||||
        /// 
 | 
			
		||||
        /// FIXME: Much of this code should probably be within the part itself.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="part"></param>
 | 
			
		||||
        /// <param name="flexi"></param>
 | 
			
		||||
        /// <param name="softness"></param>
 | 
			
		||||
        /// <param name="gravity"></param>
 | 
			
		||||
        /// <param name="friction"></param>
 | 
			
		||||
        /// <param name="wind"></param>
 | 
			
		||||
        /// <param name="tension"></param>
 | 
			
		||||
        /// <param name="Force"></param>
 | 
			
		||||
        private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, 
 | 
			
		||||
            float wind, float tension, LSL_Types.Vector3 Force)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -1097,14 +1110,26 @@ namespace OpenSim.Region.ScriptEngine.Common
 | 
			
		|||
            if (needs_fakedelete)
 | 
			
		||||
            {
 | 
			
		||||
                if (part.ParentGroup != null)
 | 
			
		||||
                {
 | 
			
		||||
                {                    
 | 
			
		||||
                    part.ParentGroup.FakeDeleteGroup();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            part.ParentGroup.HasGroupChanged = true;
 | 
			
		||||
            part.ScheduleFullUpdate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Set a light point on a part
 | 
			
		||||
        /// 
 | 
			
		||||
        /// FIXME: Much of this code should probably be in SceneObjectGroup
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="part"></param>
 | 
			
		||||
        /// <param name="light"></param>
 | 
			
		||||
        /// <param name="color"></param>
 | 
			
		||||
        /// <param name="intensity"></param>
 | 
			
		||||
        /// <param name="radius"></param>
 | 
			
		||||
        /// <param name="falloff"></param>
 | 
			
		||||
        private void SetPointLight(SceneObjectPart part, bool light, LSL_Types.Vector3 color, float intensity, float radius, float falloff)
 | 
			
		||||
        {
 | 
			
		||||
            if (part == null)
 | 
			
		||||
| 
						 | 
				
			
			@ -1125,6 +1150,7 @@ namespace OpenSim.Region.ScriptEngine.Common
 | 
			
		|||
                part.Shape.LightEntry = false;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            part.ParentGroup.HasGroupChanged = true;
 | 
			
		||||
            part.ScheduleFullUpdate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1583,7 +1609,7 @@ namespace OpenSim.Region.ScriptEngine.Common
 | 
			
		|||
            m_host.SoundGain = volume;
 | 
			
		||||
            m_host.SoundFlags = 1;      // looping
 | 
			
		||||
            m_host.SoundRadius = 20;    // Magic number, 20 seems reasonable. Make configurable?
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
            m_host.ScheduleFullUpdate();
 | 
			
		||||
            m_host.SendFullUpdateToAllClients();
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -911,6 +911,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
 | 
			
		|||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Set flexi parameters of a part.
 | 
			
		||||
        /// 
 | 
			
		||||
        /// FIXME: Much of this code should probably be within the part itself.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="part"></param>
 | 
			
		||||
        /// <param name="flexi"></param>
 | 
			
		||||
        /// <param name="softness"></param>
 | 
			
		||||
        /// <param name="gravity"></param>
 | 
			
		||||
        /// <param name="friction"></param>
 | 
			
		||||
        /// <param name="wind"></param>
 | 
			
		||||
        /// <param name="tension"></param>
 | 
			
		||||
        /// <param name="Force"></param>        
 | 
			
		||||
        private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction,
 | 
			
		||||
            float wind, float tension, LSL_Types.Vector3 Force)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -955,9 +968,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
 | 
			
		|||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            part.ParentGroup.HasGroupChanged = true;
 | 
			
		||||
            part.ScheduleFullUpdate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Set a light point on a part
 | 
			
		||||
        /// 
 | 
			
		||||
        /// FIXME: Much of this code should probably be in SceneObjectGroup
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="part"></param>
 | 
			
		||||
        /// <param name="light"></param>
 | 
			
		||||
        /// <param name="color"></param>
 | 
			
		||||
        /// <param name="intensity"></param>
 | 
			
		||||
        /// <param name="radius"></param>
 | 
			
		||||
        /// <param name="falloff"></param>        
 | 
			
		||||
        private void SetPointLight(SceneObjectPart part, bool light, LSL_Types.Vector3 color, float intensity, float radius, float falloff)
 | 
			
		||||
        {
 | 
			
		||||
            if (part == null)
 | 
			
		||||
| 
						 | 
				
			
			@ -978,11 +1003,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
 | 
			
		|||
                part.Shape.LightEntry = false;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            part.ParentGroup.HasGroupChanged = true;
 | 
			
		||||
            part.ScheduleFullUpdate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public LSL_Types.Vector3 llGetColor(int face)
 | 
			
		||||
        {
 | 
			
		||||
            m_host.AddScriptLPS(1);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue