aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs2
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SceneGraph.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs21
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs2
6 files changed, 25 insertions, 42 deletions
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
2865 root.SendPropertiesToClient(sp.ControllingClient); 2865 root.SendPropertiesToClient(sp.ControllingClient);
2866 if (oldUsePhysics && (root.Flags & PrimFlags.Physics) == 0) 2866 if (oldUsePhysics && (root.Flags & PrimFlags.Physics) == 0)
2867 { 2867 {
2868 sp.ControllingClient.SendAlertMessage("Object physics canceled"); 2868 sp.ControllingClient.SendAlertMessage("Object physics cancelled");
2869 } 2869 }
2870 } 2870 }
2871 } 2871 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 96b8c8b..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
1604 /// <param name="remoteClient"></param> 1604 /// <param name="remoteClient"></param>
1605 protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) 1605 protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient)
1606 { 1606 {
1607 SceneObjectGroup group = GetGroupByPrim(localID); 1607 SceneObjectPart part = GetSceneObjectPart(localID);
1608 if(part == null)
1609 return;
1608 1610
1609 if (group != null) 1611 SceneObjectGroup group = part.ParentGroup;
1612 if (group != null && !group.IsDeleted)
1610 { 1613 {
1611 if (m_parentScene.Permissions.CanEditObject(group, remoteClient)) 1614 if (m_parentScene.Permissions.CanEditObject(group, remoteClient))
1612 { 1615 {
1613 group.UpdateTextureEntry(localID, texture); 1616 part.UpdateTextureEntry(texture);
1614 } 1617 }
1615 } 1618 }
1616 } 1619 }
@@ -1661,8 +1664,11 @@ namespace OpenSim.Region.Framework.Scenes
1661 1664
1662 if (wantedPhys != group.UsesPhysics && remoteClient != null) 1665 if (wantedPhys != group.UsesPhysics && remoteClient != null)
1663 { 1666 {
1664 remoteClient.SendAlertMessage("Object physics canceled because exceeds the limit of " + 1667 if(m_parentScene.m_linksetPhysCapacity != 0)
1665 m_parentScene.m_linksetPhysCapacity + " physical prims with shape type not set to None"); 1668 remoteClient.SendAlertMessage("Object physics cancelled because it exceeds limits for physical prims, either size or number of primswith shape type not set to None");
1669 else
1670 remoteClient.SendAlertMessage("Object physics cancelled because it exceeds size limits for physical prims");
1671
1666 group.RootPart.ScheduleFullUpdate(); 1672 group.RootPart.ScheduleFullUpdate();
1667 } 1673 }
1668 } 1674 }
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
4129 return Parts.Count(); 4129 return Parts.Count();
4130 } 4130 }
4131 4131
4132 /// <summary>
4133 /// Update the texture entry for this part
4134 /// </summary>
4135 /// <param name="localID"></param>
4136 /// <param name="textureEntry"></param>
4137 public void UpdateTextureEntry(uint localID, byte[] textureEntry)
4138 {
4139 SceneObjectPart part = GetPart(localID);
4140 if (part != null)
4141 {
4142 part.UpdateTextureEntry(textureEntry);
4143 }
4144 }
4145
4146 public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive) 4132 public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive)
4147 { 4133 {
4148 uint newOwnerMask = (uint)(PermissionMask.All | PermissionMask.Export) & 0xfffffff0; // Mask folded bits 4134 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
5016 if (newTex.FaceTextures[i] != null) 5016 if (newTex.FaceTextures[i] != null)
5017 newFace = newTex.FaceTextures[i]; 5017 newFace = newTex.FaceTextures[i];
5018 5018
5019 if (oldFace.TextureID != newFace.TextureID)
5020 changeFlags |= Changed.TEXTURE;
5021
5019 Color4 oldRGBA = oldFace.RGBA; 5022 Color4 oldRGBA = oldFace.RGBA;
5020 Color4 newRGBA = newFace.RGBA; 5023 Color4 newRGBA = newFace.RGBA;
5021 5024
@@ -5025,9 +5028,6 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5025 oldRGBA.A != newRGBA.A) 5028 oldRGBA.A != newRGBA.A)
5026 changeFlags |= Changed.COLOR; 5029 changeFlags |= Changed.COLOR;
5027 5030
5028 if (oldFace.TextureID != newFace.TextureID)
5029 changeFlags |= Changed.TEXTURE;
5030
5031 // Max change, skip the rest of testing 5031 // Max change, skip the rest of testing
5032 if (changeFlags == (Changed.TEXTURE | Changed.COLOR)) 5032 if (changeFlags == (Changed.TEXTURE | Changed.COLOR))
5033 break; 5033 break;
@@ -5053,17 +5053,11 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5053 m_shape.TextureEntry = newTex.GetBytes(); 5053 m_shape.TextureEntry = newTex.GetBytes();
5054 if (changeFlags != 0) 5054 if (changeFlags != 0)
5055 TriggerScriptChangedEvent(changeFlags); 5055 TriggerScriptChangedEvent(changeFlags);
5056 UpdateFlag = UpdateRequired.FULL;
5057 ParentGroup.HasGroupChanged = true; 5056 ParentGroup.HasGroupChanged = true;
5058
5059 //This is madness..
5060 //ParentGroup.ScheduleGroupForFullUpdate();
5061 //This is sparta
5062 ScheduleFullUpdate(); 5057 ScheduleFullUpdate();
5063 } 5058 }
5064 } 5059 }
5065 5060
5066
5067 internal void UpdatePhysicsSubscribedEvents() 5061 internal void UpdatePhysicsSubscribedEvents()
5068 { 5062 {
5069 PhysicsActor pa = PhysActor; 5063 PhysicsActor pa = PhysActor;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 47af3b8..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
2280 m_lastChildAgentUpdateDrawDistance = DrawDistance; 2280 m_lastChildAgentUpdateDrawDistance = DrawDistance;
2281 m_lastChildAgentUpdatePosition = AbsolutePosition; 2281 m_lastChildAgentUpdatePosition = AbsolutePosition;
2282 m_childUpdatesBusy = false; // allow them 2282 m_childUpdatesBusy = false; // allow them
2283
2284
2285 } 2283 }
2286 2284
2287 m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 2285 m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2288 2286
2289
2290
2291 // send the rest of the world 2287 // send the rest of the world
2292 if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide) 2288 if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide)
2293 SendInitialDataToMe(); 2289 SendInitialDataToMe();
2294
2295 2290
2296 // priority uses avatar position only 2291 // priority uses avatar position only
2297// m_reprioritizationLastPosition = AbsolutePosition; 2292// m_reprioritizationLastPosition = AbsolutePosition;
@@ -2958,31 +2953,32 @@ namespace OpenSim.Region.Framework.Scenes
2958 Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN)); 2953 Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN));
2959 2954
2960 MovementFlag &= noMovFlagsMask; 2955 MovementFlag &= noMovFlagsMask;
2961 AgentControlFlags &= noMovFlagsMask; 2956 uint tmpAgentControlFlags = (uint)m_AgentControlFlags;
2957 tmpAgentControlFlags &= noMovFlagsMask;
2962 2958
2963 if (LocalVectorToTarget3D.X < 0) //MoveBack 2959 if (LocalVectorToTarget3D.X < 0) //MoveBack
2964 { 2960 {
2965 MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; 2961 MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK;
2966 AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; 2962 tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK;
2967 updated = true; 2963 updated = true;
2968 } 2964 }
2969 else if (LocalVectorToTarget3D.X > 0) //Move Forward 2965 else if (LocalVectorToTarget3D.X > 0) //Move Forward
2970 { 2966 {
2971 MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; 2967 MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD;
2972 AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; 2968 tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD;
2973 updated = true; 2969 updated = true;
2974 } 2970 }
2975 2971
2976 if (LocalVectorToTarget3D.Y > 0) //MoveLeft 2972 if (LocalVectorToTarget3D.Y > 0) //MoveLeft
2977 { 2973 {
2978 MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; 2974 MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT;
2979 AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; 2975 tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT;
2980 updated = true; 2976 updated = true;
2981 } 2977 }
2982 else if (LocalVectorToTarget3D.Y < 0) //MoveRight 2978 else if (LocalVectorToTarget3D.Y < 0) //MoveRight
2983 { 2979 {
2984 MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; 2980 MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT;
2985 AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; 2981 tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT;
2986 updated = true; 2982 updated = true;
2987 } 2983 }
2988 2984
@@ -3006,6 +3002,7 @@ namespace OpenSim.Region.Framework.Scenes
3006// "[SCENE PRESENCE]: HandleMoveToTargetUpdate adding {0} to move vector {1} for {2}", 3002// "[SCENE PRESENCE]: HandleMoveToTargetUpdate adding {0} to move vector {1} for {2}",
3007// LocalVectorToTarget3D, agent_control_v3, Name); 3003// LocalVectorToTarget3D, agent_control_v3, Name);
3008 3004
3005 m_AgentControlFlags = (AgentManager.ControlFlags) tmpAgentControlFlags;
3009 agent_control_v3 += LocalVectorToTarget3D; 3006 agent_control_v3 += LocalVectorToTarget3D;
3010 } 3007 }
3011 catch (Exception e) 3008 catch (Exception e)
@@ -4970,8 +4967,8 @@ namespace OpenSim.Region.Framework.Scenes
4970 4967
4971// if (m_updateCount > 0) 4968// if (m_updateCount > 0)
4972// { 4969// {
4973 if (Animator != null && Animator.UpdateMovementAnimations()) 4970// if (Animator != null && Animator.UpdateMovementAnimations())
4974 TriggerScenePresenceUpdated(); 4971// TriggerScenePresenceUpdated();
4975// m_updateCount--; 4972// m_updateCount--;
4976// } 4973// }
4977 4974
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
60 TestScene scene = new SceneHelpers().SetupScene(); 60 TestScene scene = new SceneHelpers().SetupScene();
61 ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); 61 ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1));
62 sp.Flying = true; 62 sp.Flying = true;
63 sp.PhysicsCollisionUpdate(new CollisionEventUpdate()); 63 sp.Animator.UpdateMovementAnimations();
64 64
65 Assert.That(sp.Animator.CurrentMovementAnimation, Is.EqualTo("HOVER")); 65 Assert.That(sp.Animator.CurrentMovementAnimation, Is.EqualTo("HOVER"));
66 } 66 }