From d0afd4335c517d9a675708f8bf83b5d217c0e36f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 11 Jun 2017 22:32:56 +0100 Subject: fix a error message --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 96b8c8b..b51c169 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1661,8 +1661,11 @@ namespace OpenSim.Region.Framework.Scenes 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"); + if(m_parentScene.m_linksetPhysCapacity != 0) + remoteClient.SendAlertMessage("Object physics canceled because exceeds limits for physical prims, either size or number of primswith shape type not set to None"); + else + remoteClient.SendAlertMessage("Object physics canceled because exceeds size limits for physical prims"); + group.RootPart.ScheduleFullUpdate(); } } -- cgit v1.1 From dd7ab862ab57cabf10f5ebd43eabcf2a06ec9292 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 12 Jun 2017 01:07:38 +0100 Subject: stop doing UpdateMovementAnimations on avatar collisions, that may cause incorrect changes --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 47af3b8..2416b87 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -4970,8 +4970,8 @@ namespace OpenSim.Region.Framework.Scenes // if (m_updateCount > 0) // { - if (Animator != null && Animator.UpdateMovementAnimations()) - TriggerScenePresenceUpdated(); +// if (Animator != null && Animator.UpdateMovementAnimations()) +// TriggerScenePresenceUpdated(); // m_updateCount--; // } -- cgit v1.1 From 617f42bcfa762f5571b93728505571f9a700456f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 12 Jun 2017 01:32:18 +0100 Subject: try to mk jenkins happy --- OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs index 42d91b9..d650c43 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs @@ -60,7 +60,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests TestScene scene = new SceneHelpers().SetupScene(); ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); sp.Flying = true; - sp.PhysicsCollisionUpdate(new CollisionEventUpdate()); + sp.Animator.UpdateMovementAnimations(); Assert.That(sp.Animator.CurrentMovementAnimation, Is.EqualTo("HOVER")); } -- cgit v1.1 From f62400c4ca789456f7ad8d54475388684c8c3ebb Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 12 Jun 2017 13:34:39 +0100 Subject: improve english on few messages (thx) --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index bba7a96..057ca17 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -2865,7 +2865,7 @@ namespace OpenSim.Region.Framework.Scenes root.SendPropertiesToClient(sp.ControllingClient); if (oldUsePhysics && (root.Flags & PrimFlags.Physics) == 0) { - sp.ControllingClient.SendAlertMessage("Object physics canceled"); + sp.ControllingClient.SendAlertMessage("Object physics cancelled"); } } } diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index b51c169..6419f11 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1662,9 +1662,9 @@ namespace OpenSim.Region.Framework.Scenes if (wantedPhys != group.UsesPhysics && remoteClient != null) { if(m_parentScene.m_linksetPhysCapacity != 0) - remoteClient.SendAlertMessage("Object physics canceled because exceeds limits for physical prims, either size or number of primswith shape type not set to None"); + remoteClient.SendAlertMessage("Object physics cancelled because it exceeds limits for physical prims, either size or number of primswith shape type not set to None"); else - remoteClient.SendAlertMessage("Object physics canceled because exceeds size limits for physical prims"); + remoteClient.SendAlertMessage("Object physics cancelled because it exceeds size limits for physical prims"); group.RootPart.ScheduleFullUpdate(); } -- cgit v1.1 From 9526a96b4fd668c8b6d355155a8682868ae56abb Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 13 Jun 2017 13:22:01 +0100 Subject: some cleanup --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 9 ++++++--- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 14 -------------- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 12 +++--------- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 17 +++++++---------- 4 files changed, 16 insertions(+), 36 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 6419f11..ae827f4 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1604,13 +1604,16 @@ namespace OpenSim.Region.Framework.Scenes /// protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) { - SceneObjectGroup group = GetGroupByPrim(localID); + SceneObjectPart part = GetSceneObjectPart(localID); + if(part == null) + return; - if (group != null) + SceneObjectGroup group = part.ParentGroup; + if (group != null && !group.IsDeleted) { if (m_parentScene.Permissions.CanEditObject(group, remoteClient)) { - group.UpdateTextureEntry(localID, texture); + part.UpdateTextureEntry(texture); } } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 1695d9b..fdfe8ae 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -4129,20 +4129,6 @@ namespace OpenSim.Region.Framework.Scenes return Parts.Count(); } - /// - /// Update the texture entry for this part - /// - /// - /// - public void UpdateTextureEntry(uint localID, byte[] textureEntry) - { - SceneObjectPart part = GetPart(localID); - if (part != null) - { - part.UpdateTextureEntry(textureEntry); - } - } - public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive) { uint newOwnerMask = (uint)(PermissionMask.All | PermissionMask.Export) & 0xfffffff0; // Mask folded bits diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 61aa915..c2eac24 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -5016,6 +5016,9 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter if (newTex.FaceTextures[i] != null) newFace = newTex.FaceTextures[i]; + if (oldFace.TextureID != newFace.TextureID) + changeFlags |= Changed.TEXTURE; + Color4 oldRGBA = oldFace.RGBA; Color4 newRGBA = newFace.RGBA; @@ -5025,9 +5028,6 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter oldRGBA.A != newRGBA.A) changeFlags |= Changed.COLOR; - if (oldFace.TextureID != newFace.TextureID) - changeFlags |= Changed.TEXTURE; - // Max change, skip the rest of testing if (changeFlags == (Changed.TEXTURE | Changed.COLOR)) break; @@ -5053,17 +5053,11 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter m_shape.TextureEntry = newTex.GetBytes(); if (changeFlags != 0) TriggerScriptChangedEvent(changeFlags); - UpdateFlag = UpdateRequired.FULL; ParentGroup.HasGroupChanged = true; - - //This is madness.. - //ParentGroup.ScheduleGroupForFullUpdate(); - //This is sparta ScheduleFullUpdate(); } } - internal void UpdatePhysicsSubscribedEvents() { PhysicsActor pa = PhysActor; diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2416b87..7e3adb9 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2280,18 +2280,13 @@ namespace OpenSim.Region.Framework.Scenes m_lastChildAgentUpdateDrawDistance = DrawDistance; m_lastChildAgentUpdatePosition = AbsolutePosition; m_childUpdatesBusy = false; // allow them - - } m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts)); - - // send the rest of the world if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide) SendInitialDataToMe(); - // priority uses avatar position only // m_reprioritizationLastPosition = AbsolutePosition; @@ -2958,31 +2953,32 @@ namespace OpenSim.Region.Framework.Scenes Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN)); MovementFlag &= noMovFlagsMask; - AgentControlFlags &= noMovFlagsMask; + uint tmpAgentControlFlags = (uint)m_AgentControlFlags; + tmpAgentControlFlags &= noMovFlagsMask; if (LocalVectorToTarget3D.X < 0) //MoveBack { MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; - AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; + tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; updated = true; } else if (LocalVectorToTarget3D.X > 0) //Move Forward { MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; - AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; + tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; updated = true; } if (LocalVectorToTarget3D.Y > 0) //MoveLeft { MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; - AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; + tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; updated = true; } else if (LocalVectorToTarget3D.Y < 0) //MoveRight { MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; - AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; + tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; updated = true; } @@ -3006,6 +3002,7 @@ namespace OpenSim.Region.Framework.Scenes // "[SCENE PRESENCE]: HandleMoveToTargetUpdate adding {0} to move vector {1} for {2}", // LocalVectorToTarget3D, agent_control_v3, Name); + m_AgentControlFlags = (AgentManager.ControlFlags) tmpAgentControlFlags; agent_control_v3 += LocalVectorToTarget3D; } catch (Exception e) -- cgit v1.1