From f58e1f626562778a5491a6bad79b18b3962a6c38 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 15 Feb 2019 01:09:37 +0000 Subject: mantis 8479: deep change DeRezObjects(..) doing independent permitions checks per action. m_useTrashOnDelete should now work except if god deletes, but still not recomended --- .../Scenes/AsyncSceneObjectGroupDeleter.cs | 12 +- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 162 +++++++++------------ 2 files changed, 71 insertions(+), 103 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs index 7509686..eae6d6f 100644 --- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs +++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs @@ -94,19 +94,15 @@ namespace OpenSim.Region.Framework.Scenes m_inventoryDeletes.Enqueue(dtis); } - if (Enabled) - lock (m_inventoryTicker) - m_inventoryTicker.Start(); - - // Visually remove it, even if it isnt really gone yet. This means that if we crash before the object - // has gone to inventory, it will reappear in the region again on restart instead of being lost. - // This is not ideal since the object will still be available for manipulation when it should be, but it's - // better than losing the object for now. if (permissionToDelete) { foreach (SceneObjectGroup g in objectGroups) g.DeleteGroupFromScene(false); } + + if (Enabled) + lock (m_inventoryTicker) + m_inventoryTicker.Start(); } private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e) diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index e6e0354..6450c8b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -2110,7 +2110,7 @@ namespace OpenSim.Region.Framework.Scenes // build a list of eligible objects List deleteIDs = new List(); List deleteGroups = new List(); - List takeGroups = new List(); + List takeCopyGroups = new List(); List takeDeleteGroups = new List(); ScenePresence sp = null; @@ -2119,11 +2119,10 @@ namespace OpenSim.Region.Framework.Scenes else if(action != DeRezAction.Return) return; // only Return can be called without a client - // Start with true for both, then remove the flags if objects - // that we can't derez are part of the selection - bool permissionToTake = true; - bool permissionToTakeCopy = true; - bool permissionToDelete = true; + // this is not as 0.8x code + // 0.8x did refuse all operation is not allowed on all objects + // this will do it on allowed objects + // current viewers only ask if all allowed foreach (uint localID in localIDs) { @@ -2136,8 +2135,8 @@ namespace OpenSim.Region.Framework.Scenes continue; } - // Already deleted by someone else - if (part.ParentGroup.IsDeleted) + SceneObjectGroup grp = part.ParentGroup; + if (grp == null || grp.IsDeleted) { //Client still thinks the object exists, kill it deleteIDs.Add(localID); @@ -2145,128 +2144,101 @@ namespace OpenSim.Region.Framework.Scenes } // Can't delete child prims - if (part != part.ParentGroup.RootPart) + if (part != grp.RootPart) continue; - SceneObjectGroup grp = part.ParentGroup; if (grp.IsAttachment) - continue; + { + if(!sp.IsGod || action != DeRezAction.Return || action != DeRezAction.Delete) + continue; + // this may break the attachment, but its a security action + // viewers don't allow it anyways + } // If child prims have invalid perms, fix them grp.AdjustChildPrimPermissions(false); - if (remoteClient == null) + switch (action) { - // Autoreturn has a null client. Nothing else does. So - // allow only returns - if (action != DeRezAction.Return) + case DeRezAction.SaveToExistingUserInventoryItem: { - m_log.WarnFormat( - "[AGENT INVENTORY]: Ignoring attempt to {0} {1} {2} without a client", - action, grp.Name, grp.UUID); - return; + if (Permissions.CanTakeCopyObject(grp, sp)) + takeCopyGroups.Add(grp); + break; } - permissionToTakeCopy = false; - } - else - { - if (action == DeRezAction.TakeCopy) + case DeRezAction.TakeCopy: { - if (!Permissions.CanTakeCopyObject(grp, sp)) - permissionToTakeCopy = false; + if (Permissions.CanTakeCopyObject(grp, sp)) + takeCopyGroups.Add(grp); + break; } - else + + case DeRezAction.Take: { - permissionToTakeCopy = false; + if (Permissions.CanTakeObject(grp, sp)) + takeDeleteGroups.Add(grp); + break; } - if (!Permissions.CanTakeObject(grp, sp)) - permissionToTake = false; - - if (!Permissions.CanDeleteObject(grp, remoteClient)) - permissionToDelete = false; - } - - // Handle god perms - if ((remoteClient != null) && Permissions.IsGod(remoteClient.AgentId)) - { - permissionToTake = true; - permissionToTakeCopy = true; - permissionToDelete = true; - } - - // If we're re-saving, we don't even want to delete - if (action == DeRezAction.SaveToExistingUserInventoryItem) - permissionToDelete = false; - // if we want to take a copy, we also don't want to delete - // Note: after this point, the permissionToTakeCopy flag - // becomes irrelevant. It already includes the permissionToTake - // permission and after excluding no copy items here, we can - // just use that. - if (action == DeRezAction.TakeCopy) - { - // If we don't have permission, stop right here - if (!permissionToTakeCopy) + case DeRezAction.GodTakeCopy: { - remoteClient.SendAlertMessage("You don't have permission to take the object"); - return; + if((remoteClient != null) && Permissions.IsGod(remoteClient.AgentId)) + takeCopyGroups.Add(grp); + break; } - permissionToTake = true; - // Don't delete - permissionToDelete = false; - } - - if (action == DeRezAction.Return) - { - if (remoteClient != null) + case DeRezAction.Delete: { - if (Permissions.CanReturnObjects( - null, - remoteClient, - new List() {grp})) + if (Permissions.CanDeleteObject(grp, remoteClient)) { - permissionToTake = true; - permissionToDelete = true; - if(AddToReturns) - AddReturn(grp.OwnerID == grp.GroupID ? grp.LastOwnerID : grp.OwnerID, grp.Name, grp.AbsolutePosition, - "parcel owner return"); + if(m_useTrashOnDelete || (sp.IsGod && grp.OwnerID != sp.UUID)) + takeDeleteGroups.Add(grp); + else + deleteGroups.Add(grp); } + break; } - else // Auto return passes through here with null agent + + case DeRezAction.Return: { - permissionToTake = true; - permissionToDelete = true; + if (remoteClient != null) + { + if (Permissions.CanReturnObjects( null, remoteClient, new List() {grp})) + { + takeDeleteGroups.Add(grp); + if (AddToReturns) + AddReturn(grp.OwnerID == grp.GroupID ? grp.LastOwnerID : grp.OwnerID, grp.Name, grp.AbsolutePosition, + "parcel owner return"); + } + } + else // Auto return passes through here with null agent + { + takeDeleteGroups.Add(grp); + } + break; } - } - if (permissionToDelete) - { - if (permissionToTake) - takeDeleteGroups.Add(grp); - else - deleteGroups.Add(grp); - deleteIDs.Add(grp.LocalId); + default: + break; } - else if(permissionToTake) - takeGroups.Add(grp); } - SendKillObject(deleteIDs); + if(deleteIDs.Count > 0) + SendKillObject(deleteIDs); if (takeDeleteGroups.Count > 0) { - m_asyncSceneObjectDeleter.DeleteToInventory( - action, destinationID, takeDeleteGroups, remoteClient, - true); + m_asyncSceneObjectDeleter.DeleteToInventory(action, destinationID, takeDeleteGroups, + remoteClient, true); } - if (takeGroups.Count > 0) + + if (takeCopyGroups.Count > 0) { - m_asyncSceneObjectDeleter.DeleteToInventory( - action, destinationID, takeGroups, remoteClient, - false); + m_asyncSceneObjectDeleter.DeleteToInventory(action, destinationID, takeCopyGroups, + remoteClient, false); } + if (deleteGroups.Count > 0) { foreach (SceneObjectGroup g in deleteGroups) -- cgit v1.1 From 98b6ba24b4340f0ed2f14d379952d3f5886f4282 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 15 Feb 2019 02:28:00 +0000 Subject: oops do show the object delete --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 6450c8b..debcad3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -2242,7 +2242,7 @@ namespace OpenSim.Region.Framework.Scenes if (deleteGroups.Count > 0) { foreach (SceneObjectGroup g in deleteGroups) - DeleteSceneObject(g, true); + DeleteSceneObject(g, false); } } -- cgit v1.1 From 17ea412da1a38f8e09d95c5604694c595f111473 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 21 Feb 2019 21:54:24 +0000 Subject: fix last owner on add to object inventory --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index bf217a5..8899e96 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs @@ -154,7 +154,7 @@ namespace OpenSim.Region.Framework.Scenes // We're adding this to a prim we don't own. Force // owner change taskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; - + taskItem.LastOwnerID = item.Owner; } else { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 4934b83..bc9ab7f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -815,10 +815,10 @@ namespace OpenSim.Region.Framework.Scenes m_items.LockItemsForWrite(true); m_items.Add(item.ItemID, item); m_items.LockItemsForWrite(false); - if (allowedDrop) - m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP); - else - m_part.TriggerScriptChangedEvent(Changed.INVENTORY); + if (allowedDrop) + m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP); + else + m_part.TriggerScriptChangedEvent(Changed.INVENTORY); m_part.AggregateInnerPerms(); m_inventorySerial++; -- cgit v1.1 From ece38437983440449acbc7f7202c470e72ae4e61 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 21 Feb 2019 22:54:17 +0000 Subject: let changed allowed drop have lldetectedkey[0] return the dropped item id, Yengine and still testing" --- OpenSim/Region/Framework/Scenes/EventManager.cs | 6 +++--- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 ++-- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index f76f882..edc8886 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -539,7 +539,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// public event ScriptChangedEvent OnScriptChangedEvent; - public delegate void ScriptChangedEvent(uint localID, uint change); + public delegate void ScriptChangedEvent(uint localID, uint change, object data); public delegate void ScriptControlEvent(UUID item, UUID avatarID, uint held, uint changed); @@ -1185,7 +1185,7 @@ namespace OpenSim.Region.Framework.Scenes } } - public void TriggerOnScriptChangedEvent(uint localID, uint change) + public void TriggerOnScriptChangedEvent(uint localID, uint change, object parameter = null) { ScriptChangedEvent handlerScriptChangedEvent = OnScriptChangedEvent; if (handlerScriptChangedEvent != null) @@ -1194,7 +1194,7 @@ namespace OpenSim.Region.Framework.Scenes { try { - d(localID, change); + d(localID, change, parameter); } catch (Exception e) { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index a23ebbf..23bef74 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -4439,10 +4439,10 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectSerializer.SOPToXml2(xmlWriter, this, new Dictionary()); } - public void TriggerScriptChangedEvent(Changed val) + public void TriggerScriptChangedEvent(Changed val, object data = null) { if (ParentGroup != null && ParentGroup.Scene != null) - ParentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val); + ParentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val, data); } public void TrimPermissions() diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index bc9ab7f..a0f8959 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -816,7 +816,7 @@ namespace OpenSim.Region.Framework.Scenes m_items.Add(item.ItemID, item); m_items.LockItemsForWrite(false); if (allowedDrop) - m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP); + m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP, item.ItemID); else m_part.TriggerScriptChangedEvent(Changed.INVENTORY); -- cgit v1.1 From e24adb9ea12d68f743b5936d6b04899dcef83dfc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 26 Feb 2019 13:38:03 +0000 Subject: mantis 6569: restore full health on invulnerable set to true; combat module is outdated and needs work. By then the proposal on this mantis should be reviewed --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index cfb1be4..f3e2179 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -523,7 +523,12 @@ namespace OpenSim.Region.Framework.Scenes public bool Invulnerable { - set { m_invulnerable = value; } + set + { + m_invulnerable = value; + if(value && Health != 100.0f) + Health = 100.0f; + } get { return m_invulnerable; } } -- cgit v1.1 From 87733b196bdc36a21aee775860c962c1141d44af Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 1 Mar 2019 11:48:00 +0000 Subject: reduce the chance of using a invalid avatar physics actor --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 43 +++++++++++++++--------- 1 file changed, 28 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f3e2179..1c5d23d 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -507,7 +507,19 @@ namespace OpenSim.Region.Framework.Scenes /// /// Physical scene representation of this Avatar. /// - public PhysicsActor PhysicsActor { get; private set; } + + PhysicsActor m_physActor; + public PhysicsActor PhysicsActor + { + get + { + return m_physActor; + } + private set + { + m_physActor = value; + } + } /// /// Record user movement inputs. @@ -1641,15 +1653,15 @@ namespace OpenSim.Region.Framework.Scenes /// public void RemoveFromPhysicalScene() { - if (PhysicsActor != null) + PhysicsActor pa = Interlocked.Exchange(ref m_physActor, null); + if (pa != null) { // PhysicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; - PhysicsActor.OnOutOfBounds -= OutOfBoundsCall; - PhysicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate; - PhysicsActor.UnSubscribeEvents(); - m_scene.PhysicsScene.RemoveAvatar(PhysicsActor); - PhysicsActor = null; + pa.OnOutOfBounds -= OutOfBoundsCall; + pa.OnCollisionUpdate -= PhysicsCollisionUpdate; + pa.UnSubscribeEvents(); + m_scene.PhysicsScene.RemoveAvatar(pa); } // else // { @@ -2542,7 +2554,7 @@ namespace OpenSim.Region.Framework.Scenes m_pos.X = 127f; m_pos.Y = 127f; m_pos.Z = 127f; - m_log.Error("[AVATAR]: NonFinite Avatar position detected... Reset Position. Mantis this please. Error #9999903"); + m_log.Error("[AVATAR]: NonFinite Avatar on lastFiniteposition also. Reset Position. Mantis this please. Error #9999903"); } if(isphysical) @@ -5012,16 +5024,17 @@ namespace OpenSim.Region.Framework.Scenes PhysicsScene scene = m_scene.PhysicsScene; Vector3 pVec = AbsolutePosition; - PhysicsActor = scene.AddAvatar( + PhysicsActor pa = scene.AddAvatar( LocalId, Firstname + "." + Lastname, pVec, Appearance.AvatarBoxSize,Appearance.AvatarFeetOffset, isFlying); - PhysicsActor.Orientation = m_bodyRot; + pa.Orientation = m_bodyRot; //PhysicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; - PhysicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; - PhysicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong - PhysicsActor.SubscribeEvents(100); - PhysicsActor.LocalID = LocalId; - PhysicsActor.SetAlwaysRun = m_setAlwaysRun; + pa.OnCollisionUpdate += PhysicsCollisionUpdate; + pa.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong + pa.SubscribeEvents(100); + pa.LocalID = LocalId; + pa.SetAlwaysRun = m_setAlwaysRun; + PhysicsActor = pa; } private void OutOfBoundsCall(Vector3 pos) -- cgit v1.1 From ca1993c72d53d5052cea4fef56481c9a54645fca Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 2 Mar 2019 18:23:29 +0000 Subject: direct encode lludp terse object update, let contain texture entry --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 23bef74..a1296ba 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -3242,8 +3242,6 @@ namespace OpenSim.Region.Framework.Scenes if (ParentGroup.Scene.GetNumberOfClients() == 0) return; - ParentGroup.QueueForUpdateCheck(); - bool isfull = false; if (ParentGroup.IsAttachment) { @@ -3254,6 +3252,8 @@ namespace OpenSim.Region.Framework.Scenes lock (UpdateFlagLock) UpdateFlag |= update; + ParentGroup.QueueForUpdateCheck(); + ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this, isfull); } @@ -5133,8 +5133,7 @@ namespace OpenSim.Region.Framework.Scenes m_shape.TextureEntry = newTex.GetBytes(); TriggerScriptChangedEvent(changeFlags); ParentGroup.HasGroupChanged = true; - ScheduleFullUpdate(); - + ScheduleUpdate(PrimUpdateFlags.Textures); } /// @@ -5163,7 +5162,7 @@ namespace OpenSim.Region.Framework.Scenes m_shape.TextureEntry = newTex.GetBytes(); TriggerScriptChangedEvent(changeFlags); ParentGroup.HasGroupChanged = true; - ScheduleFullUpdate(); + ScheduleUpdate(PrimUpdateFlags.Textures); } internal void UpdatePhysicsSubscribedEvents() @@ -5575,20 +5574,26 @@ namespace OpenSim.Region.Framework.Scenes // handle osVolumeDetect public void ScriptSetVolumeDetect(bool makeVolumeDetect) { + if(ParentGroup.IsDeleted) + return; + if(_parentID == 0) { - // if root prim do it via SOG + // if root prim do it is like llVolumeDetect ParentGroup.ScriptSetVolumeDetect(makeVolumeDetect); return; } - bool wasUsingPhysics = ((Flags & PrimFlags.Physics) != 0); - bool wasTemporary = ((Flags & PrimFlags.TemporaryOnRez) != 0); - bool wasPhantom = ((Flags & PrimFlags.Phantom) != 0); + if(ParentGroup.IsVolumeDetect) + return; // entire linkset is phantom already + + bool wasUsingPhysics = ParentGroup.UsesPhysics; + bool wasTemporary = ParentGroup.IsTemporary; + bool wasPhantom = ParentGroup.IsPhantom; if(PhysActor != null) PhysActor.Building = true; - UpdatePrimFlags(wasUsingPhysics,wasTemporary,wasPhantom,makeVolumeDetect,false); + UpdatePrimFlags(wasUsingPhysics, wasTemporary, wasPhantom, makeVolumeDetect, false); } protected static int m_animationSequenceNumber = (int)(Util.GetTimeStampTicks() & 0x5fffafL); -- cgit v1.1 From 39f73b82d4d0a5a43443c8275c8fe94297c51410 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 5 Mar 2019 17:03:17 +0000 Subject: dont try to backup a object in the middle of possible multipack link --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index b526fe9..ea037be 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1913,9 +1913,8 @@ namespace OpenSim.Region.Framework.Scenes { if (parentGroup.OwnerID == child.OwnerID) { - parentGroup.LinkToGroup(child); - child.DetachFromBackup(); + parentGroup.LinkToGroup(child); // this is here so physics gets updated! // Don't remove! Bad juju! Stay away! or fix physics! @@ -1943,7 +1942,6 @@ namespace OpenSim.Region.Framework.Scenes */ parentGroup.AdjustChildPrimPermissions(false); parentGroup.HasGroupChanged = true; - parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true); parentGroup.ScheduleGroupForFullAnimUpdate(); Monitor.Exit(m_linkLock); } -- cgit v1.1 From fbd741ece37b688d7ec2860f4e4f35767213e09f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 7 Mar 2019 12:12:11 +0000 Subject: prims have at most 9 face textures --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index a1296ba..312ce26 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -5130,7 +5130,7 @@ namespace OpenSim.Region.Framework.Scenes if (changeFlags == 0) return; - m_shape.TextureEntry = newTex.GetBytes(); + m_shape.TextureEntry = newTex.GetBytes(9); TriggerScriptChangedEvent(changeFlags); ParentGroup.HasGroupChanged = true; ScheduleUpdate(PrimUpdateFlags.Textures); @@ -5159,7 +5159,7 @@ namespace OpenSim.Region.Framework.Scenes if (changeFlags == 0) return; - m_shape.TextureEntry = newTex.GetBytes(); + m_shape.TextureEntry = newTex.GetBytes(9); TriggerScriptChangedEvent(changeFlags); ParentGroup.HasGroupChanged = true; ScheduleUpdate(PrimUpdateFlags.Textures); -- cgit v1.1 From 32a03a49fc06edb65cb016b8c69f88e3c595be1d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 10 Mar 2019 15:56:14 +0000 Subject: lludp: direct encode terrain patchs packets --- OpenSim/Region/Framework/Scenes/TerrainCompressor.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs index a60381a..020c7be 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs @@ -155,6 +155,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return iout; } +/* // new using terrain data and patchs indexes public static List CreateLayerDataPackets(TerrainData terrData, int[] map) { @@ -213,6 +214,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return ret; } +*/ public static void CreatePatchFromTerrainData(BitPack output, TerrainData terrData, int patchX, int patchY) { -- cgit v1.1