diff options
Diffstat (limited to 'OpenSim/Region')
9 files changed, 170 insertions, 61 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 2359bd6..b77ead3 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | |||
@@ -27,12 +27,15 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | ||
30 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Threading; | ||
31 | using log4net; | 33 | using log4net; |
32 | using Nini.Config; | 34 | using Nini.Config; |
33 | using Mono.Addins; | 35 | using Mono.Addins; |
34 | using OpenMetaverse; | 36 | using OpenMetaverse; |
35 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Servers; | ||
36 | using OpenSim.Framework.Servers.HttpServer; | 39 | using OpenSim.Framework.Servers.HttpServer; |
37 | using OpenSim.Region.Framework.Interfaces; | 40 | using OpenSim.Region.Framework.Interfaces; |
38 | using OpenSim.Region.Framework.Scenes; | 41 | using OpenSim.Region.Framework.Scenes; |
@@ -48,67 +51,49 @@ namespace OpenSim.Region.ClientStack.Linden | |||
48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 51 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
49 | public class WebFetchInvDescModule : INonSharedRegionModule | 52 | public class WebFetchInvDescModule : INonSharedRegionModule |
50 | { | 53 | { |
51 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
52 | 55 | ||
53 | private Scene m_scene; | 56 | private Scene m_scene; |
54 | 57 | ||
55 | private IInventoryService m_InventoryService; | 58 | private IInventoryService m_InventoryService; |
56 | private ILibraryService m_LibraryService; | 59 | private ILibraryService m_LibraryService; |
57 | 60 | ||
58 | private bool m_Enabled; | 61 | private WebFetchInvDescHandler m_webFetchHandler; |
59 | 62 | ||
60 | private string m_fetchInventoryDescendents2Url; | 63 | private ManualResetEvent m_ev = new ManualResetEvent(true); |
61 | private string m_webFetchInventoryDescendentsUrl; | 64 | private object m_lock = new object(); |
62 | 65 | ||
63 | private WebFetchInvDescHandler m_webFetchHandler; | 66 | private Dictionary<UUID, string> m_capsDict = new Dictionary<UUID, string>(); |
67 | private Dictionary<UUID, Hashtable> m_requests = new Dictionary<UUID, Hashtable>(); | ||
64 | 68 | ||
65 | #region ISharedRegionModule Members | 69 | #region ISharedRegionModule Members |
66 | 70 | ||
67 | public void Initialise(IConfigSource source) | 71 | public void Initialise(IConfigSource source) |
68 | { | 72 | { |
69 | IConfig config = source.Configs["ClientStack.LindenCaps"]; | ||
70 | if (config == null) | ||
71 | return; | ||
72 | |||
73 | m_fetchInventoryDescendents2Url = config.GetString("Cap_FetchInventoryDescendents2", string.Empty); | ||
74 | m_webFetchInventoryDescendentsUrl = config.GetString("Cap_WebFetchInventoryDescendents", string.Empty); | ||
75 | |||
76 | if (m_fetchInventoryDescendents2Url != string.Empty || m_webFetchInventoryDescendentsUrl != string.Empty) | ||
77 | { | ||
78 | m_Enabled = true; | ||
79 | } | ||
80 | } | 73 | } |
81 | 74 | ||
82 | public void AddRegion(Scene s) | 75 | public void AddRegion(Scene s) |
83 | { | 76 | { |
84 | if (!m_Enabled) | ||
85 | return; | ||
86 | |||
87 | m_scene = s; | 77 | m_scene = s; |
88 | } | 78 | } |
89 | 79 | ||
90 | public void RemoveRegion(Scene s) | 80 | public void RemoveRegion(Scene s) |
91 | { | 81 | { |
92 | if (!m_Enabled) | ||
93 | return; | ||
94 | |||
95 | m_scene.EventManager.OnRegisterCaps -= RegisterCaps; | 82 | m_scene.EventManager.OnRegisterCaps -= RegisterCaps; |
83 | m_scene.EventManager.OnDeregisterCaps -= DeregisterCaps; | ||
96 | m_scene = null; | 84 | m_scene = null; |
97 | } | 85 | } |
98 | 86 | ||
99 | public void RegionLoaded(Scene s) | 87 | public void RegionLoaded(Scene s) |
100 | { | 88 | { |
101 | if (!m_Enabled) | ||
102 | return; | ||
103 | |||
104 | m_InventoryService = m_scene.InventoryService; | 89 | m_InventoryService = m_scene.InventoryService; |
105 | m_LibraryService = m_scene.LibraryService; | 90 | m_LibraryService = m_scene.LibraryService; |
106 | 91 | ||
107 | // We'll reuse the same handler for all requests. | 92 | // We'll reuse the same handler for all requests. |
108 | if (m_fetchInventoryDescendents2Url == "localhost" || m_webFetchInventoryDescendentsUrl == "localhost") | 93 | m_webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService); |
109 | m_webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService); | ||
110 | 94 | ||
111 | m_scene.EventManager.OnRegisterCaps += RegisterCaps; | 95 | m_scene.EventManager.OnRegisterCaps += RegisterCaps; |
96 | m_scene.EventManager.OnDeregisterCaps += DeregisterCaps; | ||
112 | } | 97 | } |
113 | 98 | ||
114 | public void PostInitialise() | 99 | public void PostInitialise() |
@@ -128,41 +113,110 @@ namespace OpenSim.Region.ClientStack.Linden | |||
128 | 113 | ||
129 | private void RegisterCaps(UUID agentID, Caps caps) | 114 | private void RegisterCaps(UUID agentID, Caps caps) |
130 | { | 115 | { |
131 | if (m_webFetchInventoryDescendentsUrl != "") | 116 | string capUrl = "/CAPS/" + UUID.Random() + "/"; |
132 | RegisterFetchCap(agentID, caps, "WebFetchInventoryDescendents", m_webFetchInventoryDescendentsUrl); | 117 | |
118 | // Register this as a poll service | ||
119 | PollServiceEventArgs args = new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, agentID, 300000); | ||
120 | args.Type = PollServiceEventArgs.EventType.Inventory; | ||
121 | MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); | ||
122 | |||
123 | string hostName = m_scene.RegionInfo.ExternalHostName; | ||
124 | uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; | ||
125 | string protocol = "http"; | ||
126 | |||
127 | if (MainServer.Instance.UseSSL) | ||
128 | { | ||
129 | hostName = MainServer.Instance.SSLCommonName; | ||
130 | port = MainServer.Instance.SSLPort; | ||
131 | protocol = "https"; | ||
132 | } | ||
133 | caps.RegisterHandler("FetchInventoryDescendents2", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl)); | ||
133 | 134 | ||
134 | if (m_fetchInventoryDescendents2Url != "") | 135 | m_capsDict[agentID] = capUrl; |
135 | RegisterFetchCap(agentID, caps, "FetchInventoryDescendents2", m_fetchInventoryDescendents2Url); | ||
136 | } | 136 | } |
137 | 137 | ||
138 | private void RegisterFetchCap(UUID agentID, Caps caps, string capName, string url) | 138 | private void DeregisterCaps(UUID agentID, Caps caps) |
139 | { | 139 | { |
140 | string capUrl; | 140 | string capUrl; |
141 | 141 | ||
142 | if (url == "localhost") | 142 | if (m_capsDict.TryGetValue(agentID, out capUrl)) |
143 | { | 143 | { |
144 | capUrl = "/CAPS/" + UUID.Random(); | 144 | MainServer.Instance.RemoveHTTPHandler("", capUrl); |
145 | m_capsDict.Remove(agentID); | ||
146 | } | ||
147 | } | ||
145 | 148 | ||
146 | IRequestHandler reqHandler | 149 | public void HttpRequestHandler(UUID requestID, Hashtable request) |
147 | = new RestStreamHandler( | 150 | { |
148 | "POST", | 151 | // m_log.DebugFormat("[FETCH2]: Received request {0}", requestID); |
149 | capUrl, | 152 | m_requests[requestID] = request; |
150 | m_webFetchHandler.FetchInventoryDescendentsRequest, | 153 | } |
151 | "FetchInventoryDescendents2", | ||
152 | agentID.ToString()); | ||
153 | 154 | ||
154 | caps.RegisterHandler(capName, reqHandler); | 155 | private bool HasEvents(UUID requestID, UUID sessionID) |
156 | { | ||
157 | lock (m_lock) | ||
158 | { | ||
159 | if (m_ev.WaitOne(0)) | ||
160 | { | ||
161 | m_ev.Reset(); | ||
162 | return true; | ||
163 | } | ||
164 | return false; | ||
155 | } | 165 | } |
156 | else | 166 | } |
167 | |||
168 | private Hashtable NoEvents(UUID requestID, UUID sessionID) | ||
169 | { | ||
170 | m_requests.Remove(requestID); | ||
171 | |||
172 | Hashtable response = new Hashtable(); | ||
173 | |||
174 | response["int_response_code"] = 500; | ||
175 | response["str_response_string"] = "Script timeout"; | ||
176 | response["content_type"] = "text/plain"; | ||
177 | response["keepalive"] = false; | ||
178 | response["reusecontext"] = false; | ||
179 | |||
180 | return response; | ||
181 | } | ||
182 | |||
183 | private Hashtable GetEvents(UUID requestID, UUID sessionID, string request) | ||
184 | { | ||
185 | Hashtable response = new Hashtable(); | ||
186 | |||
187 | response["int_response_code"] = 500; | ||
188 | response["str_response_string"] = "Internal error"; | ||
189 | response["content_type"] = "text/plain"; | ||
190 | response["keepalive"] = false; | ||
191 | response["reusecontext"] = false; | ||
192 | |||
193 | try | ||
157 | { | 194 | { |
158 | capUrl = url; | 195 | Hashtable requestHash; |
196 | if (!m_requests.TryGetValue(requestID, out requestHash)) | ||
197 | { | ||
198 | lock (m_lock) | ||
199 | m_ev.Set(); | ||
200 | response["str_response_string"] = "Invalid request"; | ||
201 | return response; | ||
202 | } | ||
203 | |||
204 | // m_log.DebugFormat("[FETCH2]: Processed request {0}", requestID); | ||
159 | 205 | ||
160 | caps.RegisterHandler(capName, capUrl); | 206 | string reply = m_webFetchHandler.FetchInventoryDescendentsRequest(requestHash["body"].ToString(), String.Empty, String.Empty, null, null); |
207 | |||
208 | m_requests.Remove(requestID); | ||
209 | |||
210 | response["int_response_code"] = 200; | ||
211 | response["str_response_string"] = reply; | ||
212 | } | ||
213 | finally | ||
214 | { | ||
215 | lock (m_lock) | ||
216 | m_ev.Set(); | ||
161 | } | 217 | } |
162 | 218 | ||
163 | // m_log.DebugFormat( | 219 | return response; |
164 | // "[WEB FETCH INV DESC MODULE]: Registered capability {0} at {1} in region {2} for {3}", | ||
165 | // capName, capUrl, m_scene.RegionInfo.RegionName, agentID); | ||
166 | } | 220 | } |
167 | } | 221 | } |
168 | } \ No newline at end of file | 222 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 8cac731..ddd8f18 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -3809,7 +3809,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3809 | if (part.ParentGroup.IsAttachment) | 3809 | if (part.ParentGroup.IsAttachment) |
3810 | { // Someone else's HUD, why are we getting these? | 3810 | { // Someone else's HUD, why are we getting these? |
3811 | if (part.ParentGroup.OwnerID != AgentId && | 3811 | if (part.ParentGroup.OwnerID != AgentId && |
3812 | part.ParentGroup.RootPart.Shape.State >= 30) | 3812 | part.ParentGroup.RootPart.Shape.State > 30) |
3813 | continue; | 3813 | continue; |
3814 | ScenePresence sp; | 3814 | ScenePresence sp; |
3815 | // Owner is not in the sim, don't update it to | 3815 | // Owner is not in the sim, don't update it to |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 88ca9db..951afd7 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -526,10 +526,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
526 | 526 | ||
527 | public void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup so) | 527 | public void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup so) |
528 | { | 528 | { |
529 | // As per Linden spec, detach (take) is disabled for temp attachs | ||
530 | if (so.FromItemID == UUID.Zero) | ||
531 | return; | ||
532 | |||
533 | lock (sp.AttachmentsSyncLock) | 529 | lock (sp.AttachmentsSyncLock) |
534 | { | 530 | { |
535 | // Save avatar attachment information | 531 | // Save avatar attachment information |
@@ -1050,7 +1046,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
1050 | ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId); | 1046 | ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId); |
1051 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); | 1047 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); |
1052 | 1048 | ||
1053 | if (sp != null && group != null) | 1049 | if (sp != null && group != null && group.FromItemID != UUID.Zero) |
1054 | DetachSingleAttachmentToInv(sp, group); | 1050 | DetachSingleAttachmentToInv(sp, group); |
1055 | } | 1051 | } |
1056 | 1052 | ||
@@ -1068,7 +1064,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
1068 | 1064 | ||
1069 | foreach (SceneObjectGroup group in attachments) | 1065 | foreach (SceneObjectGroup group in attachments) |
1070 | { | 1066 | { |
1071 | if (group.FromItemID == itemID) | 1067 | if (group.FromItemID == itemID && group.FromItemID != UUID.Zero) |
1072 | { | 1068 | { |
1073 | DetachSingleAttachmentToInv(sp, group); | 1069 | DetachSingleAttachmentToInv(sp, group); |
1074 | return; | 1070 | return; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 0b73df5..1309623 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1983,6 +1983,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1983 | 1983 | ||
1984 | SceneObjectGroup grp = part.ParentGroup; | 1984 | SceneObjectGroup grp = part.ParentGroup; |
1985 | 1985 | ||
1986 | // If child prims have invalid perms, fix them | ||
1987 | grp.AdjustChildPrimPermissions(); | ||
1988 | |||
1986 | if (remoteClient == null) | 1989 | if (remoteClient == null) |
1987 | { | 1990 | { |
1988 | // Autoreturn has a null client. Nothing else does. So | 1991 | // Autoreturn has a null client. Nothing else does. So |
@@ -2050,7 +2053,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2050 | if (Permissions.CanReturnObjects( | 2053 | if (Permissions.CanReturnObjects( |
2051 | null, | 2054 | null, |
2052 | remoteClient.AgentId, | 2055 | remoteClient.AgentId, |
2053 | deleteGroups)) | 2056 | new List<SceneObjectGroup>() {grp})) |
2054 | { | 2057 | { |
2055 | permissionToTake = true; | 2058 | permissionToTake = true; |
2056 | permissionToDelete = true; | 2059 | permissionToDelete = true; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a5f0bff..57fcf51 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -215,7 +215,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
215 | private int m_update_presences = 1; // Update scene presence movements | 215 | private int m_update_presences = 1; // Update scene presence movements |
216 | private int m_update_events = 1; | 216 | private int m_update_events = 1; |
217 | private int m_update_backup = 200; | 217 | private int m_update_backup = 200; |
218 | private int m_update_terrain = 50; | 218 | private int m_update_terrain = 1000; |
219 | private int m_update_land = 10; | 219 | private int m_update_land = 10; |
220 | private int m_update_coarse_locations = 50; | 220 | private int m_update_coarse_locations = 50; |
221 | 221 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 6104c66..eee53d7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2852,6 +2852,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2852 | // Can't do this yet since backup still makes use of the root part without any synchronization | 2852 | // Can't do this yet since backup still makes use of the root part without any synchronization |
2853 | // objectGroup.m_rootPart = null; | 2853 | // objectGroup.m_rootPart = null; |
2854 | 2854 | ||
2855 | // If linking prims with different permissions, fix them | ||
2856 | AdjustChildPrimPermissions(); | ||
2857 | |||
2855 | AttachToBackup(); | 2858 | AttachToBackup(); |
2856 | 2859 | ||
2857 | // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the | 2860 | // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the |
@@ -3306,6 +3309,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3306 | /// <param name="SetVolumeDetect"></param> | 3309 | /// <param name="SetVolumeDetect"></param> |
3307 | public void UpdatePrimFlags(uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVolumeDetect) | 3310 | public void UpdatePrimFlags(uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVolumeDetect) |
3308 | { | 3311 | { |
3312 | HasGroupChanged = true; | ||
3313 | |||
3309 | SceneObjectPart selectionPart = GetPart(localID); | 3314 | SceneObjectPart selectionPart = GetPart(localID); |
3310 | 3315 | ||
3311 | if (SetTemporary && Scene != null) | 3316 | if (SetTemporary && Scene != null) |
@@ -3389,12 +3394,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
3389 | } | 3394 | } |
3390 | } | 3395 | } |
3391 | 3396 | ||
3397 | public void AdjustChildPrimPermissions() | ||
3398 | { | ||
3399 | ForEachPart(part => | ||
3400 | { | ||
3401 | if (part != RootPart) | ||
3402 | part.ClonePermissions(RootPart); | ||
3403 | }); | ||
3404 | } | ||
3405 | |||
3392 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, | 3406 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, |
3393 | uint mask, byte addRemTF) | 3407 | uint mask, byte addRemTF) |
3394 | { | 3408 | { |
3395 | SceneObjectPart[] parts = m_parts.GetArray(); | 3409 | RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF); |
3396 | for (int i = 0; i < parts.Length; i++) | 3410 | |
3397 | parts[i].UpdatePermissions(AgentID, field, localID, mask, addRemTF); | 3411 | AdjustChildPrimPermissions(); |
3398 | 3412 | ||
3399 | HasGroupChanged = true; | 3413 | HasGroupChanged = true; |
3400 | 3414 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index ce652b4..ed626d0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4487,6 +4487,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
4487 | } | 4487 | } |
4488 | } | 4488 | } |
4489 | 4489 | ||
4490 | public void ClonePermissions(SceneObjectPart source) | ||
4491 | { | ||
4492 | bool update = false; | ||
4493 | |||
4494 | if (BaseMask != source.BaseMask || | ||
4495 | OwnerMask != source.OwnerMask || | ||
4496 | GroupMask != source.GroupMask || | ||
4497 | EveryoneMask != source.EveryoneMask || | ||
4498 | NextOwnerMask != source.NextOwnerMask) | ||
4499 | update = true; | ||
4500 | |||
4501 | BaseMask = source.BaseMask; | ||
4502 | OwnerMask = source.OwnerMask; | ||
4503 | GroupMask = source.GroupMask; | ||
4504 | EveryoneMask = source.EveryoneMask; | ||
4505 | NextOwnerMask = source.NextOwnerMask; | ||
4506 | |||
4507 | if (update) | ||
4508 | SendFullUpdateToAllClients(); | ||
4509 | } | ||
4510 | |||
4490 | public bool IsHingeJoint() | 4511 | public bool IsHingeJoint() |
4491 | { | 4512 | { |
4492 | // For now, we use the NINJA naming scheme for identifying joints. | 4513 | // For now, we use the NINJA naming scheme for identifying joints. |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 0d292e7..134bd9d 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -386,6 +386,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
386 | m_SOPXmlProcessors.Add("Friction", ProcessFriction); | 386 | m_SOPXmlProcessors.Add("Friction", ProcessFriction); |
387 | m_SOPXmlProcessors.Add("Bounce", ProcessBounce); | 387 | m_SOPXmlProcessors.Add("Bounce", ProcessBounce); |
388 | m_SOPXmlProcessors.Add("GravityModifier", ProcessGravityModifier); | 388 | m_SOPXmlProcessors.Add("GravityModifier", ProcessGravityModifier); |
389 | m_SOPXmlProcessors.Add("CameraEyeOffset", ProcessCameraEyeOffset); | ||
390 | m_SOPXmlProcessors.Add("CameraAtOffset", ProcessCameraAtOffset); | ||
389 | 391 | ||
390 | #endregion | 392 | #endregion |
391 | 393 | ||
@@ -639,6 +641,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
639 | obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty); | 641 | obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty); |
640 | } | 642 | } |
641 | 643 | ||
644 | private static void ProcessCameraEyeOffset(SceneObjectPart obj, XmlTextReader reader) | ||
645 | { | ||
646 | obj.SetCameraEyeOffset(Util.ReadVector(reader, "CameraEyeOffset")); | ||
647 | } | ||
648 | |||
649 | private static void ProcessCameraAtOffset(SceneObjectPart obj, XmlTextReader reader) | ||
650 | { | ||
651 | obj.SetCameraAtOffset(Util.ReadVector(reader, "CameraAtOffset")); | ||
652 | } | ||
653 | |||
642 | private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) | 654 | private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) |
643 | { | 655 | { |
644 | SOPVehicle vehicle = SOPVehicle.FromXml2(reader); | 656 | SOPVehicle vehicle = SOPVehicle.FromXml2(reader); |
@@ -1355,6 +1367,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1355 | writer.WriteElementString("Bounce", sop.Bounciness.ToString().ToLower()); | 1367 | writer.WriteElementString("Bounce", sop.Bounciness.ToString().ToLower()); |
1356 | if (sop.GravityModifier != 1.0f) | 1368 | if (sop.GravityModifier != 1.0f) |
1357 | writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower()); | 1369 | writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower()); |
1370 | WriteVector(writer, "CameraEyeOffset", sop.GetCameraEyeOffset()); | ||
1371 | WriteVector(writer, "CameraAtOffset", sop.GetCameraAtOffset()); | ||
1358 | 1372 | ||
1359 | writer.WriteEndElement(); | 1373 | writer.WriteEndElement(); |
1360 | } | 1374 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1433cc9..d8ef772 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6090,6 +6090,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6090 | flags |= ScriptBaseClass.AGENT_AWAY; | 6090 | flags |= ScriptBaseClass.AGENT_AWAY; |
6091 | } | 6091 | } |
6092 | 6092 | ||
6093 | UUID busy = new UUID("efcf670c-2d18-8128-973a-034ebc806b67"); | ||
6094 | UUID[] anims = agent.Animator.GetAnimationArray(); | ||
6095 | if (Array.Exists<UUID>(anims, a => { return a == busy; })) | ||
6096 | { | ||
6097 | flags |= ScriptBaseClass.AGENT_BUSY; | ||
6098 | } | ||
6099 | |||
6093 | // seems to get unset, even if in mouselook, when avatar is sitting on a prim??? | 6100 | // seems to get unset, even if in mouselook, when avatar is sitting on a prim??? |
6094 | if ((agent.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0) | 6101 | if ((agent.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0) |
6095 | { | 6102 | { |