aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie2014-01-05 20:12:32 +0000
committerMelanie2014-01-05 20:12:32 +0000
commite79fab91dbe731e9d177de61993d963bcc067299 (patch)
tree4358fd508e55dd91774ba83b8e4c30fc24f452c7 /OpenSim/Region/Framework/Scenes
parentMerge commit '92aad6f1bb45974927fa43d6fd30f98337dee3f0' into careminster (diff)
parentSome missing definitions needed for successful compilation. (diff)
downloadopensim-SC-e79fab91dbe731e9d177de61993d963bcc067299.zip
opensim-SC-e79fab91dbe731e9d177de61993d963bcc067299.tar.gz
opensim-SC-e79fab91dbe731e9d177de61993d963bcc067299.tar.bz2
opensim-SC-e79fab91dbe731e9d177de61993d963bcc067299.tar.xz
Intermediate commit. Sill errors.
Merge branch 'master' into careminster Conflicts: OpenSim/Data/SQLite/SQLiteUserProfilesData.cs OpenSim/Framework/RegionInfo.cs OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs OpenSim/Services/UserProfilesService/UserProfilesService.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs11
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs25
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/UuidGatherer.cs15
6 files changed, 47 insertions, 26 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 21036d8..3fd7485 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2016,6 +2016,11 @@ namespace OpenSim.Region.Framework.Scenes
2016 2016
2017 GridRegion region = new GridRegion(RegionInfo); 2017 GridRegion region = new GridRegion(RegionInfo);
2018 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); 2018 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region);
2019 m_log.DebugFormat("{0} RegisterRegionWithGrid. name={1},id={2},loc=<{3},{4}>,size=<{5},{6}>",
2020 LogHeader, m_regionName,
2021 RegionInfo.RegionID,
2022 RegionInfo.RegionLocX, RegionInfo.RegionLocY,
2023 RegionInfo.RegionSizeX, RegionInfo.RegionSizeY);
2019 if (error != String.Empty) 2024 if (error != String.Empty)
2020 throw new Exception(error); 2025 throw new Exception(error);
2021 } 2026 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index 9354a88..08e26c5 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -42,7 +42,8 @@ namespace OpenSim.Region.Framework.Scenes
42{ 42{
43 public abstract class SceneBase : IScene 43 public abstract class SceneBase : IScene
44 { 44 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 protected static readonly string LogHeader = "[SCENE]";
46 47
47 #region Events 48 #region Events
48 49
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 997a1be..9db34fd 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -506,9 +506,7 @@ namespace OpenSim.Region.Framework.Scenes
506 { 506 {
507 return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0)); 507 return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0));
508 } 508 }
509 509
510
511
512 private struct avtocrossInfo 510 private struct avtocrossInfo
513 { 511 {
514 public ScenePresence av; 512 public ScenePresence av;
@@ -660,12 +658,6 @@ namespace OpenSim.Region.Framework.Scenes
660 } 658 }
661 } 659 }
662 660
663/* don't see the need but worse don't see where is restored to false if things stay in
664 foreach (SceneObjectPart part in m_parts.GetArray())
665 {
666 part.IgnoreUndoUpdate = true;
667 }
668 */
669 if (RootPart.GetStatusSandbox()) 661 if (RootPart.GetStatusSandbox())
670 { 662 {
671 if (Util.GetDistanceTo(RootPart.StatusSandboxPos, value) > 10) 663 if (Util.GetDistanceTo(RootPart.StatusSandboxPos, value) > 10)
@@ -751,7 +743,6 @@ namespace OpenSim.Region.Framework.Scenes
751 } 743 }
752 744
753 agent.ParentUUID = UUID.Zero; 745 agent.ParentUUID = UUID.Zero;
754
755// agent.Reset(); 746// agent.Reset();
756// else // Not successful 747// else // Not successful
757// agent.RestoreInCurrentScene(); 748// agent.RestoreInCurrentScene();
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3c749aa..8ff17f6 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2863,16 +2863,33 @@ namespace OpenSim.Region.Framework.Scenes
2863 Vector3 up = new Vector3((float)x, (float)y, (float)z); 2863 Vector3 up = new Vector3((float)x, (float)y, (float)z);
2864 Vector3 sitOffset = up * Appearance.AvatarHeight * 0.02638f; 2864 Vector3 sitOffset = up * Appearance.AvatarHeight * 0.02638f;
2865 2865
2866 m_pos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT; 2866 Vector3 newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT;
2867 Quaternion newRot;
2868
2869 if (part.IsRoot)
2870 {
2871 newRot = sitTargetOrient;
2872 }
2873 else
2874 {
2875 newPos = newPos * part.RotationOffset;
2876 newRot = part.RotationOffset * sitTargetOrient;
2877 }
2878
2879 newPos += part.OffsetPosition;
2880
2881 m_pos = newPos;
2882 Rotation = newRot;
2867 2883
2868// m_pos = sitTargetPos + SIT_TARGET_ADJUSTMENT - sitOffset;
2869 Rotation = sitTargetOrient;
2870// ParentPosition = part.AbsolutePosition; 2884// ParentPosition = part.AbsolutePosition;
2871 part.ParentGroup.AddAvatar(UUID); 2885 part.ParentGroup.AddAvatar(UUID);
2872 } 2886 }
2873 else 2887 else
2874 { 2888 {
2875 m_pos -= part.AbsolutePosition; 2889 // An viewer expects to specify sit positions as offsets to the root prim, even if a child prim is
2890 // being sat upon.
2891 m_pos -= part.GroupPosition;
2892
2876// ParentPosition = part.AbsolutePosition; 2893// ParentPosition = part.AbsolutePosition;
2877 part.ParentGroup.AddAvatar(UUID); 2894 part.ParentGroup.AddAvatar(UUID);
2878 2895
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs
index acaeb90..0911f00 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs
@@ -111,15 +111,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
111 111
112 SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; 112 SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart;
113 113
114 // We need to preserve this here because phys actor is removed by the sit.
115 Vector3 spPhysActorSize = m_sp.PhysicsActor.Size;
114 m_sp.HandleAgentRequestSit(m_sp.ControllingClient, m_sp.UUID, part.UUID, Vector3.Zero); 116 m_sp.HandleAgentRequestSit(m_sp.ControllingClient, m_sp.UUID, part.UUID, Vector3.Zero);
115 117
116 // FIXME: This is different for live avatars - z position is adjusted. This is half the height of the
117 // default avatar.
118 // Curiously, Vector3.ToString() will not display the last two places of the float. For example,
119 // printing out npc.AbsolutePosition will give <0, 0, 0.8454993> not <0, 0, 0.845499337>
120 Assert.That( 118 Assert.That(
121 m_sp.AbsolutePosition, 119 m_sp.AbsolutePosition,
122 Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.845499337f))); 120 Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, spPhysActorSize.Z / 2)));
123 121
124 m_sp.StandUp(); 122 m_sp.StandUp();
125 123
@@ -147,9 +145,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
147 145
148 Assert.That(part.SitTargetAvatar, Is.EqualTo(m_sp.UUID)); 146 Assert.That(part.SitTargetAvatar, Is.EqualTo(m_sp.UUID));
149 Assert.That(m_sp.ParentID, Is.EqualTo(part.LocalId)); 147 Assert.That(m_sp.ParentID, Is.EqualTo(part.LocalId));
150 Assert.That( 148// Assert.That(
151 m_sp.AbsolutePosition, 149// m_sp.AbsolutePosition,
152 Is.EqualTo(part.AbsolutePosition + part.SitTargetPosition + ScenePresence.SIT_TARGET_ADJUSTMENT)); 150// Is.EqualTo(part.AbsolutePosition + part.SitTargetPosition + ScenePresence.SIT_TARGET_ADJUSTMENT));
153 Assert.That(m_sp.PhysicsActor, Is.Null); 151 Assert.That(m_sp.PhysicsActor, Is.Null);
154 152
155 Assert.That(part.GetSittingAvatarsCount(), Is.EqualTo(1)); 153 Assert.That(part.GetSittingAvatarsCount(), Is.EqualTo(1));
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
index 84e410f..d8309d8 100644
--- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
+++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
@@ -177,9 +177,18 @@ namespace OpenSim.Region.Framework.Scenes
177 177
178 if (part.ParticleSystem.Length > 0) 178 if (part.ParticleSystem.Length > 0)
179 { 179 {
180 Primitive.ParticleSystem ps = new Primitive.ParticleSystem(part.ParticleSystem, 0); 180 try
181 if (ps.Texture != UUID.Zero) 181 {
182 assetUuids[ps.Texture] = AssetType.Texture; 182 Primitive.ParticleSystem ps = new Primitive.ParticleSystem(part.ParticleSystem, 0);
183 if (ps.Texture != UUID.Zero)
184 assetUuids[ps.Texture] = AssetType.Texture;
185 }
186 catch (Exception e)
187 {
188 m_log.WarnFormat(
189 "[UUID GATHERER]: Could not check particle system for part {0} {1} in object {2} {3} since it is corrupt. Continuing.",
190 part.Name, part.UUID, sceneObject.Name, sceneObject.UUID);
191 }
183 } 192 }
184 193
185 TaskInventoryDictionary taskDictionary = (TaskInventoryDictionary)part.TaskInventory.Clone(); 194 TaskInventoryDictionary taskDictionary = (TaskInventoryDictionary)part.TaskInventory.Clone();