diff options
author | Robert Adams | 2014-09-21 07:11:00 -0700 |
---|---|---|
committer | Robert Adams | 2014-09-21 07:11:00 -0700 |
commit | 2ed3a918bd88ad427899e3fdfe65afca7aad95e8 (patch) | |
tree | f49bce49520a5632f147acc75f1dcdf7d4611861 /OpenSim/Region | |
parent | Merge branch 'master' into bullet-2.82 (diff) | |
parent | This fixes the Scene thread renaming issue (diff) | |
download | opensim-SC-2ed3a918bd88ad427899e3fdfe65afca7aad95e8.zip opensim-SC-2ed3a918bd88ad427899e3fdfe65afca7aad95e8.tar.gz opensim-SC-2ed3a918bd88ad427899e3fdfe65afca7aad95e8.tar.bz2 opensim-SC-2ed3a918bd88ad427899e3fdfe65afca7aad95e8.tar.xz |
Merge branch 'master' into bullet-2.82
Diffstat (limited to 'OpenSim/Region')
6 files changed, 48 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}", |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 03c6265..95e59ab 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -234,6 +234,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
234 | ScenePresence sp; | 234 | ScenePresence sp; |
235 | if (scene.TryGetScenePresence(agentID, out sp)) | 235 | if (scene.TryGetScenePresence(agentID, out sp)) |
236 | { | 236 | { |
237 | if (sp.IsSatOnObject || sp.SitGround) | ||
238 | return false; | ||
239 | |||
237 | // m_log.DebugFormat( | 240 | // m_log.DebugFormat( |
238 | // "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}", | 241 | // "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}", |
239 | // sp.Name, pos, scene.RegionInfo.RegionName, | 242 | // sp.Name, pos, scene.RegionInfo.RegionName, |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 7c384b2..e7ba7a4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -968,6 +968,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
968 | 968 | ||
969 | m_host.AddScriptLPS(1); | 969 | m_host.AddScriptLPS(1); |
970 | 970 | ||
971 | World.SimChat(Utils.StringToBytes(text), | ||
972 | ChatTypeEnum.Region, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); | ||
973 | |||
971 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 974 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
972 | if (wComm != null) | 975 | if (wComm != null) |
973 | wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text); | 976 | wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text); |
@@ -988,6 +991,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
988 | UUID TargetID; | 991 | UUID TargetID; |
989 | UUID.TryParse(target, out TargetID); | 992 | UUID.TryParse(target, out TargetID); |
990 | 993 | ||
994 | World.SimChatToAgent(TargetID, Utils.StringToBytes(msg), | ||
995 | channel, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); | ||
996 | |||
991 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 997 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
992 | if (wComm != null) | 998 | if (wComm != null) |
993 | wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg); | 999 | wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg); |