aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorRobert Adams2014-09-21 07:11:00 -0700
committerRobert Adams2014-09-21 07:11:00 -0700
commit2ed3a918bd88ad427899e3fdfe65afca7aad95e8 (patch)
treef49bce49520a5632f147acc75f1dcdf7d4611861 /OpenSim/Region/Framework
parentMerge branch 'master' into bullet-2.82 (diff)
parentThis fixes the Scene thread renaming issue (diff)
downloadopensim-SC_OLD-2ed3a918bd88ad427899e3fdfe65afca7aad95e8.zip
opensim-SC_OLD-2ed3a918bd88ad427899e3fdfe65afca7aad95e8.tar.gz
opensim-SC_OLD-2ed3a918bd88ad427899e3fdfe65afca7aad95e8.tar.bz2
opensim-SC_OLD-2ed3a918bd88ad427899e3fdfe65afca7aad95e8.tar.xz
Merge branch 'master' into bullet-2.82
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs15
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs31
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs5
4 files changed, 39 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index cddf818..ea242f5 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -145,6 +145,21 @@ namespace OpenSim.Region.Framework.Scenes
145 } 145 }
146 146
147 /// <summary> 147 /// <summary>
148 ///
149 /// </summary>
150 /// <param name="message"></param>
151 /// <param name="type"></param>
152 /// <param name="channel"></param>
153 /// <param name="fromPos"></param>
154 /// <param name="fromName"></param>
155 /// <param name="fromAgentID"></param>
156 /// <param name="targetID"></param>
157 public void SimChatToAgent(UUID targetID, byte[] message, int channel, Vector3 fromPos, string fromName, UUID fromID, bool fromAgent)
158 {
159 SimChat(message, ChatTypeEnum.Region, channel, fromPos, fromName, fromID, targetID, fromAgent, false);
160 }
161
162 /// <summary>
148 /// Invoked when the client requests a prim. 163 /// Invoked when the client requests a prim.
149 /// </summary> 164 /// </summary>
150 /// <param name="primLocalID"></param> 165 /// <param name="primLocalID"></param>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 28dbccb..19cb0f8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1079,6 +1079,7 @@ namespace OpenSim.Region.Framework.Scenes
1079 StatsReporter = new SimStatsReporter(this); 1079 StatsReporter = new SimStatsReporter(this);
1080 StatsReporter.OnSendStatsResult += SendSimStatsPackets; 1080 StatsReporter.OnSendStatsResult += SendSimStatsPackets;
1081 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; 1081 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
1082
1082 } 1083 }
1083 1084
1084 public Scene(RegionInfo regInfo, PhysicsScene physicsScene) : base(regInfo) 1085 public Scene(RegionInfo regInfo, PhysicsScene physicsScene) : base(regInfo)
@@ -1396,7 +1397,7 @@ namespace OpenSim.Region.Framework.Scenes
1396 1397
1397 m_heartbeatThread 1398 m_heartbeatThread
1398 = Watchdog.StartThread( 1399 = Watchdog.StartThread(
1399 Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false); 1400 Heartbeat, string.Format("Heartbeat-({0})", RegionInfo.RegionName.Replace(" ", "_")), ThreadPriority.Normal, false, false);
1400 1401
1401 StartScripts(); 1402 StartScripts();
1402 } 1403 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 8785ca9..c587b2a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1589,20 +1589,29 @@ namespace OpenSim.Region.Framework.Scenes
1589 1589
1590 public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim) 1590 public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim)
1591 { 1591 {
1592 byte[] data = new byte[16]; 1592 byte[] data;
1593 int pos = 0;
1594 1593
1595 // The flags don't like conversion from uint to byte, so we have to do 1594 if (pTexAnim.Flags == Primitive.TextureAnimMode.ANIM_OFF)
1596 // it the crappy way. See the above function :( 1595 {
1596 data = Utils.EmptyBytes;
1597 }
1598 else
1599 {
1600 data = new byte[16];
1601 int pos = 0;
1602
1603 // The flags don't like conversion from uint to byte, so we have to do
1604 // it the crappy way. See the above function :(
1597 1605
1598 data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++; 1606 data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++;
1599 data[pos] = (byte)pTexAnim.Face; pos++; 1607 data[pos] = (byte)pTexAnim.Face; pos++;
1600 data[pos] = (byte)pTexAnim.SizeX; pos++; 1608 data[pos] = (byte)pTexAnim.SizeX; pos++;
1601 data[pos] = (byte)pTexAnim.SizeY; pos++; 1609 data[pos] = (byte)pTexAnim.SizeY; pos++;
1602 1610
1603 Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); 1611 Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
1604 Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); 1612 Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
1605 Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); 1613 Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
1614 }
1606 1615
1607 m_TextureAnimation = data; 1616 m_TextureAnimation = data;
1608 } 1617 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 59b521d..87063c6 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2618,7 +2618,6 @@ namespace OpenSim.Region.Framework.Scenes
2618 } 2618 }
2619 } 2619 }
2620 2620
2621 Vector3 sitPartWorldPosition = part.GetWorldPosition();
2622 ControllingClient.SendClearFollowCamProperties(part.ParentUUID); 2621 ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
2623 2622
2624 ParentID = 0; 2623 ParentID = 0;
@@ -2647,13 +2646,13 @@ namespace OpenSim.Region.Framework.Scenes
2647 2646
2648// Vector3 standPositionAdjustment 2647// Vector3 standPositionAdjustment
2649// = part.SitTargetPosition + new Vector3(0.5f, 0f, m_sitAvatarHeight / 2f); 2648// = part.SitTargetPosition + new Vector3(0.5f, 0f, m_sitAvatarHeight / 2f);
2650 Vector3 adjustmentForSitPosition = (part.SitTargetPosition + OffsetPosition) * part.GetWorldRotation(); 2649 Vector3 adjustmentForSitPosition = (OffsetPosition - SIT_TARGET_ADJUSTMENT) * part.GetWorldRotation();
2651 2650
2652 // XXX: This is based on the physics capsule sizes. Need to find a better way to read this rather than 2651 // XXX: This is based on the physics capsule sizes. Need to find a better way to read this rather than
2653 // hardcoding here. 2652 // hardcoding here.
2654 Vector3 adjustmentForSitPose = new Vector3(0.74f, 0f, 0f) * standRotation; 2653 Vector3 adjustmentForSitPose = new Vector3(0.74f, 0f, 0f) * standRotation;
2655 2654
2656 Vector3 standPos = sitPartWorldPosition + adjustmentForSitPosition + adjustmentForSitPose; 2655 Vector3 standPos = part.ParentGroup.AbsolutePosition + adjustmentForSitPosition + adjustmentForSitPose;
2657 2656
2658// m_log.DebugFormat( 2657// m_log.DebugFormat(
2659// "[SCENE PRESENCE]: Setting stand to pos {0}, (adjustmentForSitPosition {1}, adjustmentForSitPose {2}) rotation {3} for {4} in {5}", 2658// "[SCENE PRESENCE]: Setting stand to pos {0}, (adjustmentForSitPosition {1}, adjustmentForSitPose {2}) rotation {3} for {4} in {5}",