diff options
Diffstat (limited to 'OpenSim')
18 files changed, 167 insertions, 111 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 854307c..15adb99 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -117,7 +117,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
117 | 117 | ||
118 | m_application = openSim; | 118 | m_application = openSim; |
119 | string bind_ip_address = m_config.GetString("bind_ip_address", "0.0.0.0"); | 119 | string bind_ip_address = m_config.GetString("bind_ip_address", "0.0.0.0"); |
120 | IPAddress ipaddr = IPAddress.Parse( bind_ip_address ); | 120 | IPAddress ipaddr = IPAddress.Parse(bind_ip_address); |
121 | m_httpServer = MainServer.GetHttpServer((uint)port,ipaddr); | 121 | m_httpServer = MainServer.GetHttpServer((uint)port,ipaddr); |
122 | 122 | ||
123 | Dictionary<string, XmlRpcMethod> availableMethods = new Dictionary<string, XmlRpcMethod>(); | 123 | Dictionary<string, XmlRpcMethod> availableMethods = new Dictionary<string, XmlRpcMethod>(); |
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index 7b14ac7..cc9fcea 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs | |||
@@ -203,7 +203,7 @@ namespace OpenSim.Framework | |||
203 | args["inventory_folder"] = OSD.FromUUID(InventoryFolder); | 203 | args["inventory_folder"] = OSD.FromUUID(InventoryFolder); |
204 | args["secure_session_id"] = OSD.FromUUID(SecureSessionID); | 204 | args["secure_session_id"] = OSD.FromUUID(SecureSessionID); |
205 | args["session_id"] = OSD.FromUUID(SessionID); | 205 | args["session_id"] = OSD.FromUUID(SessionID); |
206 | 206 | ||
207 | args["service_session_id"] = OSD.FromString(ServiceSessionID); | 207 | args["service_session_id"] = OSD.FromString(ServiceSessionID); |
208 | args["start_pos"] = OSD.FromString(startpos.ToString()); | 208 | args["start_pos"] = OSD.FromString(startpos.ToString()); |
209 | args["client_ip"] = OSD.FromString(IPAddress); | 209 | args["client_ip"] = OSD.FromString(IPAddress); |
@@ -219,7 +219,7 @@ namespace OpenSim.Framework | |||
219 | OSDMap appmap = Appearance.Pack(); | 219 | OSDMap appmap = Appearance.Pack(); |
220 | args["packed_appearance"] = appmap; | 220 | args["packed_appearance"] = appmap; |
221 | } | 221 | } |
222 | 222 | ||
223 | if (ServiceURLs != null && ServiceURLs.Count > 0) | 223 | if (ServiceURLs != null && ServiceURLs.Count > 0) |
224 | { | 224 | { |
225 | OSDArray urls = new OSDArray(ServiceURLs.Count * 2); | 225 | OSDArray urls = new OSDArray(ServiceURLs.Count * 2); |
@@ -307,7 +307,7 @@ namespace OpenSim.Framework | |||
307 | // DEBUG OFF | 307 | // DEBUG OFF |
308 | 308 | ||
309 | try { | 309 | try { |
310 | // Unpack various appearance elements | 310 | // Unpack various appearance elements |
311 | Appearance = new AvatarAppearance(AgentID); | 311 | Appearance = new AvatarAppearance(AgentID); |
312 | 312 | ||
313 | // Eventually this code should be deprecated, use full appearance | 313 | // Eventually this code should be deprecated, use full appearance |
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 69e1ae6..2906af8 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Framework | |||
46 | 46 | ||
47 | public readonly static int TEXTURE_COUNT = 21; | 47 | public readonly static int TEXTURE_COUNT = 21; |
48 | public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; | 48 | public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; |
49 | 49 | ||
50 | protected UUID m_owner; | 50 | protected UUID m_owner; |
51 | protected int m_serial = 1; | 51 | protected int m_serial = 1; |
52 | protected byte[] m_visualparams; | 52 | protected byte[] m_visualparams; |
@@ -110,10 +110,10 @@ namespace OpenSim.Framework | |||
110 | SetDefaultTexture(); | 110 | SetDefaultTexture(); |
111 | SetDefaultParams(); | 111 | SetDefaultParams(); |
112 | SetHeight(); | 112 | SetHeight(); |
113 | 113 | ||
114 | m_attachments = new Dictionary<int, List<AvatarAttachment>>(); | 114 | m_attachments = new Dictionary<int, List<AvatarAttachment>>(); |
115 | } | 115 | } |
116 | 116 | ||
117 | public AvatarAppearance(UUID avatarID, OSDMap map) | 117 | public AvatarAppearance(UUID avatarID, OSDMap map) |
118 | { | 118 | { |
119 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance for {0} from OSDMap",avatarID); | 119 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance for {0} from OSDMap",avatarID); |
@@ -122,11 +122,11 @@ namespace OpenSim.Framework | |||
122 | Unpack(map); | 122 | Unpack(map); |
123 | SetHeight(); | 123 | SetHeight(); |
124 | } | 124 | } |
125 | 125 | ||
126 | public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams) | 126 | public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams) |
127 | { | 127 | { |
128 | // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID); | 128 | // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID); |
129 | 129 | ||
130 | m_serial = 1; | 130 | m_serial = 1; |
131 | m_owner = avatarID; | 131 | m_owner = avatarID; |
132 | 132 | ||
@@ -134,7 +134,7 @@ namespace OpenSim.Framework | |||
134 | m_wearables = wearables; | 134 | m_wearables = wearables; |
135 | else | 135 | else |
136 | SetDefaultWearables(); | 136 | SetDefaultWearables(); |
137 | 137 | ||
138 | if (textureEntry != null) | 138 | if (textureEntry != null) |
139 | m_texture = textureEntry; | 139 | m_texture = textureEntry; |
140 | else | 140 | else |
@@ -172,41 +172,41 @@ namespace OpenSim.Framework | |||
172 | 172 | ||
173 | return; | 173 | return; |
174 | } | 174 | } |
175 | 175 | ||
176 | m_serial = appearance.Serial; | 176 | m_serial = appearance.Serial; |
177 | m_owner = appearance.Owner; | 177 | m_owner = appearance.Owner; |
178 | 178 | ||
179 | m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; | 179 | m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; |
180 | for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ ) | 180 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
181 | m_wearables[i] = new AvatarWearable(); | 181 | m_wearables[i] = new AvatarWearable(); |
182 | if (copyWearables && (appearance.Wearables != null)) | 182 | if (copyWearables && (appearance.Wearables != null)) |
183 | { | 183 | { |
184 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 184 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
185 | SetWearable(i,appearance.Wearables[i]); | 185 | SetWearable(i,appearance.Wearables[i]); |
186 | } | 186 | } |
187 | 187 | ||
188 | m_texture = null; | 188 | m_texture = null; |
189 | if (appearance.Texture != null) | 189 | if (appearance.Texture != null) |
190 | { | 190 | { |
191 | byte[] tbytes = appearance.Texture.GetBytes(); | 191 | byte[] tbytes = appearance.Texture.GetBytes(); |
192 | m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length); | 192 | m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length); |
193 | } | 193 | } |
194 | 194 | ||
195 | m_visualparams = null; | 195 | m_visualparams = null; |
196 | if (appearance.VisualParams != null) | 196 | if (appearance.VisualParams != null) |
197 | m_visualparams = (byte[])appearance.VisualParams.Clone(); | 197 | m_visualparams = (byte[])appearance.VisualParams.Clone(); |
198 | 198 | ||
199 | // Copy the attachment, force append mode since that ensures consistency | 199 | // Copy the attachment, force append mode since that ensures consistency |
200 | m_attachments = new Dictionary<int, List<AvatarAttachment>>(); | 200 | m_attachments = new Dictionary<int, List<AvatarAttachment>>(); |
201 | foreach (AvatarAttachment attachment in appearance.GetAttachments()) | 201 | foreach (AvatarAttachment attachment in appearance.GetAttachments()) |
202 | AppendAttachment(new AvatarAttachment(attachment)); | 202 | AppendAttachment(new AvatarAttachment(attachment)); |
203 | } | 203 | } |
204 | 204 | ||
205 | public void GetAssetsFrom(AvatarAppearance app) | 205 | public void GetAssetsFrom(AvatarAppearance app) |
206 | { | 206 | { |
207 | for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ ) | 207 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
208 | { | 208 | { |
209 | for (int j = 0 ; j < m_wearables[i].Count ; j++) | 209 | for (int j = 0; j < m_wearables[i].Count; j++) |
210 | { | 210 | { |
211 | UUID itemID = m_wearables[i][j].ItemID; | 211 | UUID itemID = m_wearables[i][j].ItemID; |
212 | UUID assetID = app.Wearables[i].GetAsset(itemID); | 212 | UUID assetID = app.Wearables[i].GetAsset(itemID); |
@@ -220,7 +220,7 @@ namespace OpenSim.Framework | |||
220 | public void ClearWearables() | 220 | public void ClearWearables() |
221 | { | 221 | { |
222 | m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; | 222 | m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; |
223 | for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ ) | 223 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
224 | m_wearables[i] = new AvatarWearable(); | 224 | m_wearables[i] = new AvatarWearable(); |
225 | } | 225 | } |
226 | 226 | ||
@@ -248,7 +248,7 @@ namespace OpenSim.Framework | |||
248 | /// <summary> | 248 | /// <summary> |
249 | /// Set up appearance textures. | 249 | /// Set up appearance textures. |
250 | /// Returns boolean that indicates whether the new entries actually change the | 250 | /// Returns boolean that indicates whether the new entries actually change the |
251 | /// existing values. | 251 | /// existing values. |
252 | /// </summary> | 252 | /// </summary> |
253 | public virtual bool SetTextureEntries(Primitive.TextureEntry textureEntry) | 253 | public virtual bool SetTextureEntries(Primitive.TextureEntry textureEntry) |
254 | { | 254 | { |
@@ -263,7 +263,7 @@ namespace OpenSim.Framework | |||
263 | { | 263 | { |
264 | Primitive.TextureEntryFace newface = textureEntry.FaceTextures[i]; | 264 | Primitive.TextureEntryFace newface = textureEntry.FaceTextures[i]; |
265 | Primitive.TextureEntryFace oldface = m_texture.FaceTextures[i]; | 265 | Primitive.TextureEntryFace oldface = m_texture.FaceTextures[i]; |
266 | 266 | ||
267 | if (newface == null) | 267 | if (newface == null) |
268 | { | 268 | { |
269 | if (oldface == null) continue; | 269 | if (oldface == null) continue; |
@@ -274,7 +274,7 @@ namespace OpenSim.Framework | |||
274 | } | 274 | } |
275 | 275 | ||
276 | changed = true; | 276 | changed = true; |
277 | 277 | ||
278 | // if (newface != null) | 278 | // if (newface != null) |
279 | // m_log.WarnFormat("[AVATAR APPEARANCE]: index {0}, new texture id {1}",i,newface.TextureID); | 279 | // m_log.WarnFormat("[AVATAR APPEARANCE]: index {0}, new texture id {1}",i,newface.TextureID); |
280 | } | 280 | } |
@@ -282,11 +282,11 @@ namespace OpenSim.Framework | |||
282 | m_texture = textureEntry; | 282 | m_texture = textureEntry; |
283 | return changed; | 283 | return changed; |
284 | } | 284 | } |
285 | 285 | ||
286 | /// <summary> | 286 | /// <summary> |
287 | /// Set up visual parameters for the avatar and refresh the avatar height | 287 | /// Set up visual parameters for the avatar and refresh the avatar height |
288 | /// Returns boolean that indicates whether the new entries actually change the | 288 | /// Returns boolean that indicates whether the new entries actually change the |
289 | /// existing values. | 289 | /// existing values. |
290 | /// </summary> | 290 | /// </summary> |
291 | public virtual bool SetVisualParams(byte[] visualParams) | 291 | public virtual bool SetVisualParams(byte[] visualParams) |
292 | { | 292 | { |
@@ -316,13 +316,13 @@ namespace OpenSim.Framework | |||
316 | 316 | ||
317 | return changed; | 317 | return changed; |
318 | } | 318 | } |
319 | 319 | ||
320 | public virtual void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams) | 320 | public virtual void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams) |
321 | { | 321 | { |
322 | SetTextureEntries(textureEntry); | 322 | SetTextureEntries(textureEntry); |
323 | SetVisualParams(visualParams); | 323 | SetVisualParams(visualParams); |
324 | } | 324 | } |
325 | 325 | ||
326 | public virtual void SetHeight() | 326 | public virtual void SetHeight() |
327 | { | 327 | { |
328 | m_avatarHeight = 1.23077f // Shortest possible avatar height | 328 | m_avatarHeight = 1.23077f // Shortest possible avatar height |
@@ -347,25 +347,24 @@ namespace OpenSim.Framework | |||
347 | // m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID); | 347 | // m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID); |
348 | // DEBUG OFF | 348 | // DEBUG OFF |
349 | m_wearables[wearableId].Clear(); | 349 | m_wearables[wearableId].Clear(); |
350 | for (int i = 0 ; i < wearable.Count ; i++) | 350 | for (int i = 0; i < wearable.Count; i++) |
351 | m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID); | 351 | m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID); |
352 | } | 352 | } |
353 | 353 | ||
354 | |||
355 | // DEBUG ON | 354 | // DEBUG ON |
356 | public override String ToString() | 355 | public override String ToString() |
357 | { | 356 | { |
358 | String s = ""; | 357 | String s = ""; |
359 | 358 | ||
360 | s += String.Format("Serial: {0}\n",m_serial); | 359 | s += String.Format("Serial: {0}\n",m_serial); |
361 | 360 | ||
362 | for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++) | 361 | for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++) |
363 | if (m_texture.FaceTextures[i] != null) | 362 | if (m_texture.FaceTextures[i] != null) |
364 | s += String.Format("Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID); | 363 | s += String.Format("Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID); |
365 | 364 | ||
366 | foreach (AvatarWearable awear in m_wearables) | 365 | foreach (AvatarWearable awear in m_wearables) |
367 | { | 366 | { |
368 | for ( int i = 0 ; i < awear.Count ; i++ ) | 367 | for (int i = 0; i < awear.Count; i++) |
369 | s += String.Format("Wearable: item={0}, asset={1}\n",awear[i].ItemID,awear[i].AssetID); | 368 | s += String.Format("Wearable: item={0}, asset={1}\n",awear[i].ItemID,awear[i].AssetID); |
370 | } | 369 | } |
371 | 370 | ||
@@ -373,13 +372,13 @@ namespace OpenSim.Framework | |||
373 | for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++) | 372 | for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++) |
374 | s += String.Format("{0},",m_visualparams[j]); | 373 | s += String.Format("{0},",m_visualparams[j]); |
375 | s += "\n"; | 374 | s += "\n"; |
376 | 375 | ||
377 | return s; | 376 | return s; |
378 | } | 377 | } |
379 | // DEBUG OFF | 378 | // DEBUG OFF |
380 | 379 | ||
381 | /// <summary> | 380 | /// <summary> |
382 | /// Get a list of the attachments, note that there may be | 381 | /// Get a list of the attachments, note that there may be |
383 | /// duplicate attachpoints | 382 | /// duplicate attachpoints |
384 | /// </summary> | 383 | /// </summary> |
385 | public List<AvatarAttachment> GetAttachments() | 384 | public List<AvatarAttachment> GetAttachments() |
@@ -390,10 +389,10 @@ namespace OpenSim.Framework | |||
390 | foreach (AvatarAttachment attach in kvp.Value) | 389 | foreach (AvatarAttachment attach in kvp.Value) |
391 | alist.Add(new AvatarAttachment(attach)); | 390 | alist.Add(new AvatarAttachment(attach)); |
392 | } | 391 | } |
393 | 392 | ||
394 | return alist; | 393 | return alist; |
395 | } | 394 | } |
396 | 395 | ||
397 | internal void AppendAttachment(AvatarAttachment attach) | 396 | internal void AppendAttachment(AvatarAttachment attach) |
398 | { | 397 | { |
399 | if (! m_attachments.ContainsKey(attach.AttachPoint)) | 398 | if (! m_attachments.ContainsKey(attach.AttachPoint)) |
@@ -406,11 +405,11 @@ namespace OpenSim.Framework | |||
406 | m_attachments[attach.AttachPoint] = new List<AvatarAttachment>(); | 405 | m_attachments[attach.AttachPoint] = new List<AvatarAttachment>(); |
407 | m_attachments[attach.AttachPoint].Add(attach); | 406 | m_attachments[attach.AttachPoint].Add(attach); |
408 | } | 407 | } |
409 | 408 | ||
410 | /// <summary> | 409 | /// <summary> |
411 | /// Add an attachment, if the attachpoint has the | 410 | /// Add an attachment, if the attachpoint has the |
412 | /// 0x80 bit set then we assume this is an append | 411 | /// 0x80 bit set then we assume this is an append |
413 | /// operation otherwise we replace whatever is | 412 | /// operation otherwise we replace whatever is |
414 | /// currently attached at the attachpoint | 413 | /// currently attached at the attachpoint |
415 | /// </summary> | 414 | /// </summary> |
416 | public void SetAttachment(int attachpoint, UUID item, UUID asset) | 415 | public void SetAttachment(int attachpoint, UUID item, UUID asset) |
@@ -485,14 +484,14 @@ namespace OpenSim.Framework | |||
485 | data["serial"] = OSD.FromInteger(m_serial); | 484 | data["serial"] = OSD.FromInteger(m_serial); |
486 | data["height"] = OSD.FromReal(m_avatarHeight); | 485 | data["height"] = OSD.FromReal(m_avatarHeight); |
487 | data["hipoffset"] = OSD.FromReal(m_hipOffset); | 486 | data["hipoffset"] = OSD.FromReal(m_hipOffset); |
488 | 487 | ||
489 | // Wearables | 488 | // Wearables |
490 | OSDArray wears = new OSDArray(AvatarWearable.MAX_WEARABLES); | 489 | OSDArray wears = new OSDArray(AvatarWearable.MAX_WEARABLES); |
491 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 490 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
492 | wears.Add(m_wearables[i].Pack()); | 491 | wears.Add(m_wearables[i].Pack()); |
493 | data["wearables"] = wears; | 492 | data["wearables"] = wears; |
494 | 493 | ||
495 | // Avatar Textures | 494 | // Avatar Textures |
496 | OSDArray textures = new OSDArray(AvatarAppearance.TEXTURE_COUNT); | 495 | OSDArray textures = new OSDArray(AvatarAppearance.TEXTURE_COUNT); |
497 | for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++) | 496 | for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++) |
498 | { | 497 | { |
@@ -506,7 +505,7 @@ namespace OpenSim.Framework | |||
506 | // Visual Parameters | 505 | // Visual Parameters |
507 | OSDBinary visualparams = new OSDBinary(m_visualparams); | 506 | OSDBinary visualparams = new OSDBinary(m_visualparams); |
508 | data["visualparams"] = visualparams; | 507 | data["visualparams"] = visualparams; |
509 | 508 | ||
510 | // Attachments | 509 | // Attachments |
511 | OSDArray attachs = new OSDArray(m_attachments.Count); | 510 | OSDArray attachs = new OSDArray(m_attachments.Count); |
512 | foreach (AvatarAttachment attach in GetAttachments()) | 511 | foreach (AvatarAttachment attach in GetAttachments()) |
@@ -529,14 +528,14 @@ namespace OpenSim.Framework | |||
529 | if ((data != null) && (data["hipoffset"] != null)) | 528 | if ((data != null) && (data["hipoffset"] != null)) |
530 | m_hipOffset = (float)data["hipoffset"].AsReal(); | 529 | m_hipOffset = (float)data["hipoffset"].AsReal(); |
531 | 530 | ||
532 | try | 531 | try |
533 | { | 532 | { |
534 | // Wearables | 533 | // Wearables |
535 | SetDefaultWearables(); | 534 | SetDefaultWearables(); |
536 | if ((data != null) && (data["wearables"] != null) && (data["wearables"]).Type == OSDType.Array) | 535 | if ((data != null) && (data["wearables"] != null) && (data["wearables"]).Type == OSDType.Array) |
537 | { | 536 | { |
538 | OSDArray wears = (OSDArray)(data["wearables"]); | 537 | OSDArray wears = (OSDArray)(data["wearables"]); |
539 | for (int i = 0; i < wears.Count; i++) | 538 | for (int i = 0; i < wears.Count; i++) |
540 | m_wearables[i] = new AvatarWearable((OSDArray)wears[i]); | 539 | m_wearables[i] = new AvatarWearable((OSDArray)wears[i]); |
541 | } | 540 | } |
542 | else | 541 | else |
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index ddfaaed..a227338 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs | |||
@@ -333,7 +333,7 @@ namespace OpenSim.Framework | |||
333 | { | 333 | { |
334 | // DEBUG ON | 334 | // DEBUG ON |
335 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Pack data"); | 335 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Pack data"); |
336 | // DEBUG OFF | 336 | // DEBUG OFF |
337 | 337 | ||
338 | OSDMap args = new OSDMap(); | 338 | OSDMap args = new OSDMap(); |
339 | args["message_type"] = OSD.FromString("AgentData"); | 339 | args["message_type"] = OSD.FromString("AgentData"); |
@@ -456,7 +456,7 @@ namespace OpenSim.Framework | |||
456 | { | 456 | { |
457 | // DEBUG ON | 457 | // DEBUG ON |
458 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Unpack data"); | 458 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Unpack data"); |
459 | // DEBUG OFF | 459 | // DEBUG OFF |
460 | 460 | ||
461 | if (args.ContainsKey("region_id")) | 461 | if (args.ContainsKey("region_id")) |
462 | UUID.TryParse(args["region_id"].AsString(), out RegionID); | 462 | UUID.TryParse(args["region_id"].AsString(), out RegionID); |
@@ -616,7 +616,7 @@ namespace OpenSim.Framework | |||
616 | // DEBUG ON | 616 | // DEBUG ON |
617 | else | 617 | else |
618 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance"); | 618 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance"); |
619 | // DEBUG OFF | 619 | // DEBUG OFF |
620 | 620 | ||
621 | if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array) | 621 | if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array) |
622 | { | 622 | { |
diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs index 8ccabec..0515b16 100644 --- a/OpenSim/Framework/MainServer.cs +++ b/OpenSim/Framework/MainServer.cs | |||
@@ -36,7 +36,7 @@ namespace OpenSim.Framework | |||
36 | public class MainServer | 36 | public class MainServer |
37 | { | 37 | { |
38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
39 | 39 | ||
40 | private static BaseHttpServer instance = null; | 40 | private static BaseHttpServer instance = null; |
41 | private static Dictionary<uint, BaseHttpServer> m_Servers = | 41 | private static Dictionary<uint, BaseHttpServer> m_Servers = |
42 | new Dictionary<uint, BaseHttpServer>(); | 42 | new Dictionary<uint, BaseHttpServer>(); |
@@ -64,8 +64,8 @@ namespace OpenSim.Framework | |||
64 | 64 | ||
65 | m_Servers[port] = new BaseHttpServer(port); | 65 | m_Servers[port] = new BaseHttpServer(port); |
66 | 66 | ||
67 | if (ipaddr != null ) | 67 | if (ipaddr != null) |
68 | m_Servers[port].ListenIPAddress = ipaddr; | 68 | m_Servers[port].ListenIPAddress = ipaddr; |
69 | 69 | ||
70 | m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port); | 70 | m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port); |
71 | m_Servers[port].Start(); | 71 | m_Servers[port].Start(); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 4aa19d1..8d85d1a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -651,8 +651,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
651 | catch (Exception e) | 651 | catch (Exception e) |
652 | { | 652 | { |
653 | // Make sure that we see any exception caused by the asynchronous operation. | 653 | // Make sure that we see any exception caused by the asynchronous operation. |
654 | m_log.Error( | 654 | m_log.ErrorFormat( |
655 | string.Format("[LLCLIENTVIEW]: Caught exception while processing {0}", packetObject.Pack), e); | 655 | "[LLCLIENTVIEW]: Caught exception while processing {0} for {1}, {2} {3}", |
656 | packetObject.Pack, Name, e.Message, e.StackTrace); | ||
656 | } | 657 | } |
657 | } | 658 | } |
658 | 659 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 45bede3..dcfe615 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -615,7 +615,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
615 | 615 | ||
616 | // UseCircuitCode handling | 616 | // UseCircuitCode handling |
617 | if (packet.Type == PacketType.UseCircuitCode) | 617 | if (packet.Type == PacketType.UseCircuitCode) |
618 | { | 618 | { |
619 | object[] array = new object[] { buffer, packet }; | 619 | object[] array = new object[] { buffer, packet }; |
620 | 620 | ||
621 | if (m_asyncPacketHandling) | 621 | if (m_asyncPacketHandling) |
@@ -843,7 +843,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
843 | 843 | ||
844 | m_log.DebugFormat( | 844 | m_log.DebugFormat( |
845 | "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", | 845 | "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", |
846 | buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); | 846 | buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); |
847 | } | 847 | } |
848 | 848 | ||
849 | private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) | 849 | private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index e89368a..348b8b9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -178,12 +178,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
178 | UUID itemID = UUID.Zero; | 178 | UUID itemID = UUID.Zero; |
179 | if (sp != null) | 179 | if (sp != null) |
180 | { | 180 | { |
181 | foreach (SceneObjectGroup grp in sp.GetAttachments(AttachmentPt)) | 181 | foreach (SceneObjectGroup grp in sp.Attachments) |
182 | { | 182 | { |
183 | itemID = grp.GetFromItemID(); | 183 | if (grp.GetAttachmentPoint() == (byte)AttachmentPt) |
184 | if (itemID != UUID.Zero) | 184 | { |
185 | DetachSingleAttachmentToInv(itemID, remoteClient); | 185 | itemID = grp.GetFromItemID(); |
186 | break; | ||
187 | } | ||
186 | } | 188 | } |
189 | if (itemID != UUID.Zero) | ||
190 | DetachSingleAttachmentToInv(itemID, remoteClient); | ||
187 | } | 191 | } |
188 | 192 | ||
189 | if (group.GetFromItemID() == UUID.Zero) | 193 | if (group.GetFromItemID() == UUID.Zero) |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 7f482cb..2dd444d 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
61 | { | 61 | { |
62 | scene.RegisterModuleInterface<IAvatarFactory>(this); | 62 | scene.RegisterModuleInterface<IAvatarFactory>(this); |
63 | scene.EventManager.OnNewClient += NewClient; | 63 | scene.EventManager.OnNewClient += NewClient; |
64 | 64 | ||
65 | if (config != null) | 65 | if (config != null) |
66 | { | 66 | { |
67 | IConfig sconfig = config.Configs["Startup"]; | 67 | IConfig sconfig = config.Configs["Startup"]; |
@@ -138,7 +138,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
138 | 138 | ||
139 | return cached; | 139 | return cached; |
140 | } | 140 | } |
141 | |||
142 | 141 | ||
143 | /// <summary> | 142 | /// <summary> |
144 | /// Set appearance data (textureentry and slider settings) received from the client | 143 | /// Set appearance data (textureentry and slider settings) received from the client |
@@ -155,9 +154,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
155 | m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance unable to find presence for {0}",client.AgentId); | 154 | m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance unable to find presence for {0}",client.AgentId); |
156 | return; | 155 | return; |
157 | } | 156 | } |
158 | 157 | ||
159 | bool changed = false; | 158 | bool changed = false; |
160 | 159 | ||
161 | // Process the texture entry | 160 | // Process the texture entry |
162 | if (textureEntry != null) | 161 | if (textureEntry != null) |
163 | { | 162 | { |
@@ -174,7 +173,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
174 | }); | 173 | }); |
175 | } | 174 | } |
176 | } | 175 | } |
177 | 176 | ||
178 | // Process the visual params, this may change height as well | 177 | // Process the visual params, this may change height as well |
179 | if (visualParams != null) | 178 | if (visualParams != null) |
180 | { | 179 | { |
@@ -185,14 +184,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
185 | sp.SetHeight(sp.Appearance.AvatarHeight); | 184 | sp.SetHeight(sp.Appearance.AvatarHeight); |
186 | } | 185 | } |
187 | } | 186 | } |
188 | 187 | ||
189 | // If something changed in the appearance then queue an appearance save | 188 | // If something changed in the appearance then queue an appearance save |
190 | if (changed) | 189 | if (changed) |
191 | QueueAppearanceSave(client.AgentId); | 190 | QueueAppearanceSave(client.AgentId); |
192 | 191 | ||
193 | // And always queue up an appearance update to send out | 192 | // And always queue up an appearance update to send out |
194 | QueueAppearanceSend(client.AgentId); | 193 | QueueAppearanceSend(client.AgentId); |
195 | 194 | ||
196 | // Send the appearance back to the avatar | 195 | // Send the appearance back to the avatar |
197 | // AvatarAppearance avp = sp.Appearance; | 196 | // AvatarAppearance avp = sp.Appearance; |
198 | // sp.ControllingClient.SendAvatarDataImmediate(sp); | 197 | // sp.ControllingClient.SendAvatarDataImmediate(sp); |
@@ -216,35 +215,35 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
216 | } | 215 | } |
217 | return true; | 216 | return true; |
218 | } | 217 | } |
219 | 218 | ||
220 | #region UpdateAppearanceTimer | 219 | #region UpdateAppearanceTimer |
221 | 220 | ||
222 | public void QueueAppearanceSend(UUID agentid) | 221 | public void QueueAppearanceSend(UUID agentid) |
223 | { | 222 | { |
224 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance send for {0}",agentid); | 223 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance send for {0}", agentid); |
225 | 224 | ||
226 | // 100 nanoseconds (ticks) we should wait | 225 | // 100 nanoseconds (ticks) we should wait |
227 | long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 10000000); | 226 | long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 10000000); |
228 | lock (m_sendqueue) | 227 | lock (m_sendqueue) |
229 | { | 228 | { |
230 | m_sendqueue[agentid] = timestamp; | 229 | m_sendqueue[agentid] = timestamp; |
231 | m_updateTimer.Start(); | 230 | m_updateTimer.Start(); |
232 | } | 231 | } |
233 | } | 232 | } |
234 | 233 | ||
235 | public void QueueAppearanceSave(UUID agentid) | 234 | public void QueueAppearanceSave(UUID agentid) |
236 | { | 235 | { |
237 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance save for {0}",agentid); | 236 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance save for {0}", agentid); |
238 | 237 | ||
239 | // 100 nanoseconds (ticks) we should wait | 238 | // 100 nanoseconds (ticks) we should wait |
240 | long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 10000000); | 239 | long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 10000000); |
241 | lock (m_savequeue) | 240 | lock (m_savequeue) |
242 | { | 241 | { |
243 | m_savequeue[agentid] = timestamp; | 242 | m_savequeue[agentid] = timestamp; |
244 | m_updateTimer.Start(); | 243 | m_updateTimer.Start(); |
245 | } | 244 | } |
246 | } | 245 | } |
247 | 246 | ||
248 | private void HandleAppearanceSend(UUID agentid) | 247 | private void HandleAppearanceSend(UUID agentid) |
249 | { | 248 | { |
250 | ScenePresence sp = m_scene.GetScenePresence(agentid); | 249 | ScenePresence sp = m_scene.GetScenePresence(agentid); |
@@ -254,7 +253,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
254 | return; | 253 | return; |
255 | } | 254 | } |
256 | 255 | ||
257 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Handle appearance send for {0}", agentid); | 256 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Handle appearance send for {0}", agentid); |
258 | 257 | ||
259 | // Send the appearance to everyone in the scene | 258 | // Send the appearance to everyone in the scene |
260 | sp.SendAppearanceToAllOtherAgents(); | 259 | sp.SendAppearanceToAllOtherAgents(); |
@@ -262,7 +261,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
262 | 261 | ||
263 | // Send the appearance back to the avatar | 262 | // Send the appearance back to the avatar |
264 | // AvatarAppearance avp = sp.Appearance; | 263 | // AvatarAppearance avp = sp.Appearance; |
265 | // sp.ControllingClient.SendAppearance(avp.Owner,avp.VisualParams,avp.Texture.GetBytes()); | 264 | // sp.ControllingClient.SendAppearance(avp.Owner, avp.VisualParams, avp.Texture.GetBytes()); |
266 | 265 | ||
267 | /* | 266 | /* |
268 | // this needs to be fixed, the flag should be on scene presence not the region module | 267 | // this needs to be fixed, the flag should be on scene presence not the region module |
@@ -290,11 +289,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
290 | private void HandleAppearanceUpdateTimer(object sender, EventArgs ea) | 289 | private void HandleAppearanceUpdateTimer(object sender, EventArgs ea) |
291 | { | 290 | { |
292 | long now = DateTime.Now.Ticks; | 291 | long now = DateTime.Now.Ticks; |
293 | 292 | ||
294 | lock (m_sendqueue) | 293 | lock (m_sendqueue) |
295 | { | 294 | { |
296 | Dictionary<UUID,long> sends = new Dictionary<UUID,long>(m_sendqueue); | 295 | Dictionary<UUID, long> sends = new Dictionary<UUID, long>(m_sendqueue); |
297 | foreach (KeyValuePair<UUID,long> kvp in sends) | 296 | foreach (KeyValuePair<UUID, long> kvp in sends) |
298 | { | 297 | { |
299 | if (kvp.Value < now) | 298 | if (kvp.Value < now) |
300 | { | 299 | { |
@@ -306,8 +305,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
306 | 305 | ||
307 | lock (m_savequeue) | 306 | lock (m_savequeue) |
308 | { | 307 | { |
309 | Dictionary<UUID,long> saves = new Dictionary<UUID,long>(m_savequeue); | 308 | Dictionary<UUID, long> saves = new Dictionary<UUID, long>(m_savequeue); |
310 | foreach (KeyValuePair<UUID,long> kvp in saves) | 309 | foreach (KeyValuePair<UUID, long> kvp in saves) |
311 | { | 310 | { |
312 | if (kvp.Value < now) | 311 | if (kvp.Value < now) |
313 | { | 312 | { |
@@ -320,7 +319,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
320 | if (m_savequeue.Count == 0 && m_sendqueue.Count == 0) | 319 | if (m_savequeue.Count == 0 && m_sendqueue.Count == 0) |
321 | m_updateTimer.Stop(); | 320 | m_updateTimer.Stop(); |
322 | } | 321 | } |
323 | 322 | ||
324 | #endregion | 323 | #endregion |
325 | 324 | ||
326 | /// <summary> | 325 | /// <summary> |
@@ -336,8 +335,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
336 | } | 335 | } |
337 | 336 | ||
338 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Received request for wearables of {0}", client.AgentId); | 337 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Received request for wearables of {0}", client.AgentId); |
339 | 338 | ||
340 | client.SendWearables(sp.Appearance.Wearables,sp.Appearance.Serial++); | 339 | client.SendWearables(sp.Appearance.Wearables, sp.Appearance.Serial++); |
341 | } | 340 | } |
342 | 341 | ||
343 | /// <summary> | 342 | /// <summary> |
@@ -353,17 +352,17 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
353 | m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing unable to find presence for {0}", client.AgentId); | 352 | m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing unable to find presence for {0}", client.AgentId); |
354 | return; | 353 | return; |
355 | } | 354 | } |
356 | 355 | ||
357 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}",client.AgentId); | 356 | // m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}", client.AgentId); |
358 | 357 | ||
359 | AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false); | 358 | AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false); |
360 | 359 | ||
361 | foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) | 360 | foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) |
362 | { | 361 | { |
363 | if (wear.Type < AvatarWearable.MAX_WEARABLES) | 362 | if (wear.Type < AvatarWearable.MAX_WEARABLES) |
364 | avatAppearance.Wearables[wear.Type].Add(wear.ItemID,UUID.Zero); | 363 | avatAppearance.Wearables[wear.Type].Add(wear.ItemID, UUID.Zero); |
365 | } | 364 | } |
366 | 365 | ||
367 | avatAppearance.GetAssetsFrom(sp.Appearance); | 366 | avatAppearance.GetAssetsFrom(sp.Appearance); |
368 | 367 | ||
369 | // This could take awhile since it needs to pull inventory | 368 | // This could take awhile since it needs to pull inventory |
@@ -381,11 +380,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
381 | { | 380 | { |
382 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 381 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
383 | { | 382 | { |
384 | for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ ) | 383 | for (int j = 0; j < appearance.Wearables[j].Count; j++) |
385 | { | 384 | { |
386 | if (appearance.Wearables[i][j].ItemID == UUID.Zero) | 385 | if (appearance.Wearables[i][j].ItemID == UUID.Zero) |
387 | continue; | 386 | continue; |
388 | 387 | ||
389 | // Ignore ruth's assets | 388 | // Ignore ruth's assets |
390 | if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID) | 389 | if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID) |
391 | continue; | 390 | continue; |
@@ -399,9 +398,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
399 | else | 398 | else |
400 | { | 399 | { |
401 | m_log.ErrorFormat( | 400 | m_log.ErrorFormat( |
402 | "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default", | 401 | "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default", |
403 | appearance.Wearables[i][j].ItemID, (WearableType)i); | 402 | appearance.Wearables[i][j].ItemID, (WearableType)i); |
404 | 403 | ||
405 | appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID); | 404 | appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID); |
406 | } | 405 | } |
407 | } | 406 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 283182c..9ba144d 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -435,6 +435,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
435 | // Now let's make it officially a child agent | 435 | // Now let's make it officially a child agent |
436 | sp.MakeChildAgent(); | 436 | sp.MakeChildAgent(); |
437 | 437 | ||
438 | sp.Scene.CleanDroppedAttachments(); | ||
439 | |||
438 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone | 440 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone |
439 | 441 | ||
440 | if (NeedsClosing(oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) | 442 | if (NeedsClosing(oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 1bf0d67..6844c60 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -1098,12 +1098,14 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1098 | if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide) | 1098 | if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide) |
1099 | flags |= RegionFlags.AllowParcelChanges; | 1099 | flags |= RegionFlags.AllowParcelChanges; |
1100 | if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch) | 1100 | if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch) |
1101 | flags |= (RegionFlags)(1 << 29); | 1101 | flags |= RegionFlags.BlockParcelSearch; |
1102 | 1102 | ||
1103 | if (m_scene.RegionInfo.RegionSettings.FixedSun) | 1103 | if (m_scene.RegionInfo.RegionSettings.FixedSun) |
1104 | flags |= RegionFlags.SunFixed; | 1104 | flags |= RegionFlags.SunFixed; |
1105 | if (m_scene.RegionInfo.RegionSettings.Sandbox) | 1105 | if (m_scene.RegionInfo.RegionSettings.Sandbox) |
1106 | flags |= RegionFlags.Sandbox; | 1106 | flags |= RegionFlags.Sandbox; |
1107 | if (m_scene.RegionInfo.EstateSettings.AllowVoice) | ||
1108 | flags |= RegionFlags.AllowVoice; | ||
1107 | 1109 | ||
1108 | // Fudge these to always on, so the menu options activate | 1110 | // Fudge these to always on, so the menu options activate |
1109 | // | 1111 | // |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 634685a..695202f 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -88,7 +88,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
88 | 88 | ||
89 | // caches ExtendedLandData | 89 | // caches ExtendedLandData |
90 | private Cache parcelInfoCache; | 90 | private Cache parcelInfoCache; |
91 | private Vector3? forcedPosition = null; | 91 | private Dictionary<UUID, Vector3> forcedPosition = |
92 | new Dictionary<UUID, Vector3>(); | ||
92 | 93 | ||
93 | #region INonSharedRegionModule Members | 94 | #region INonSharedRegionModule Members |
94 | 95 | ||
@@ -177,7 +178,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
177 | void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) | 178 | void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) |
178 | { | 179 | { |
179 | //If we are forcing a position for them to go | 180 | //If we are forcing a position for them to go |
180 | if (forcedPosition != null) | 181 | if (forcedPosition.ContainsKey(remoteClient.AgentId)) |
181 | { | 182 | { |
182 | ScenePresence clientAvatar = m_scene.GetScenePresence(remoteClient.AgentId); | 183 | ScenePresence clientAvatar = m_scene.GetScenePresence(remoteClient.AgentId); |
183 | 184 | ||
@@ -187,23 +188,23 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
187 | 188 | ||
188 | 189 | ||
189 | //Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines | 190 | //Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines |
190 | if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) < .2) | 191 | if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) < .2) |
191 | { | 192 | { |
192 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); | 193 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition)); |
193 | forcedPosition = null; | 194 | forcedPosition.Remove(remoteClient.AgentId); |
194 | } | 195 | } |
195 | //if we are far away, teleport | 196 | //if we are far away, teleport |
196 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) | 197 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) > 3) |
197 | { | 198 | { |
198 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); | 199 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition)); |
199 | clientAvatar.Teleport(forcedPosition.Value); | 200 | clientAvatar.Teleport(forcedPosition[remoteClient.AgentId]); |
200 | forcedPosition = null; | 201 | forcedPosition.Remove(remoteClient.AgentId); |
201 | } | 202 | } |
202 | else | 203 | else |
203 | { | 204 | { |
204 | //Forces them toward the forced position we want if they aren't there yet | 205 | //Forces them toward the forced position we want if they aren't there yet |
205 | agentData.UseClientAgentPosition = true; | 206 | agentData.UseClientAgentPosition = true; |
206 | agentData.ClientAgentPosition = forcedPosition.Value; | 207 | agentData.ClientAgentPosition = forcedPosition[remoteClient.AgentId]; |
207 | } | 208 | } |
208 | } | 209 | } |
209 | } | 210 | } |
@@ -326,7 +327,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
326 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; | 327 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; |
327 | if (position.HasValue) | 328 | if (position.HasValue) |
328 | { | 329 | { |
329 | forcedPosition = position; | 330 | forcedPosition[avatar.ControllingClient.AgentId] = (Vector3)position; |
330 | } | 331 | } |
331 | } | 332 | } |
332 | 333 | ||
@@ -457,7 +458,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
457 | parcel.IsBannedFromLand(clientAvatar.UUID)) | 458 | parcel.IsBannedFromLand(clientAvatar.UUID)) |
458 | { | 459 | { |
459 | //once we've sent the message once, keep going toward the target until we are done | 460 | //once we've sent the message once, keep going toward the target until we are done |
460 | if (forcedPosition == null) | 461 | if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) |
461 | { | 462 | { |
462 | SendYouAreBannedNotice(clientAvatar); | 463 | SendYouAreBannedNotice(clientAvatar); |
463 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); | 464 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); |
@@ -466,7 +467,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
466 | else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) | 467 | else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) |
467 | { | 468 | { |
468 | //once we've sent the message once, keep going toward the target until we are done | 469 | //once we've sent the message once, keep going toward the target until we are done |
469 | if (forcedPosition == null) | 470 | if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) |
470 | { | 471 | { |
471 | SendYouAreRestrictedNotice(clientAvatar); | 472 | SendYouAreRestrictedNotice(clientAvatar); |
472 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); | 473 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); |
@@ -475,7 +476,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
475 | else | 476 | else |
476 | { | 477 | { |
477 | //when we are finally in a safe place, lets release the forced position lock | 478 | //when we are finally in a safe place, lets release the forced position lock |
478 | forcedPosition = null; | 479 | forcedPosition.Remove(clientAvatar.ControllingClient.AgentId); |
479 | } | 480 | } |
480 | } | 481 | } |
481 | } | 482 | } |
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index 8df645d..abd28c8 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | |||
@@ -97,7 +97,6 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
97 | else | 97 | else |
98 | gain = (float)((double)gain * ((radius - dis) / radius)); | 98 | gain = (float)((double)gain * ((radius - dis) / radius)); |
99 | 99 | ||
100 | m_log.DebugFormat("Play sound, gain {0}", gain); | ||
101 | sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags); | 100 | sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags); |
102 | }); | 101 | }); |
103 | } | 102 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3c6bab8..3eb4f3e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -174,6 +174,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
174 | private bool m_firstHeartbeat = true; | 174 | private bool m_firstHeartbeat = true; |
175 | 175 | ||
176 | private object m_deleting_scene_object = new object(); | 176 | private object m_deleting_scene_object = new object(); |
177 | private object m_cleaningAttachments = new object(); | ||
177 | 178 | ||
178 | private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; | 179 | private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; |
179 | private bool m_reprioritizationEnabled = true; | 180 | private bool m_reprioritizationEnabled = true; |
@@ -3162,6 +3163,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3162 | } | 3163 | } |
3163 | 3164 | ||
3164 | m_eventManager.TriggerOnRemovePresence(agentID); | 3165 | m_eventManager.TriggerOnRemovePresence(agentID); |
3166 | |||
3165 | ForEachClient( | 3167 | ForEachClient( |
3166 | delegate(IClientAPI client) | 3168 | delegate(IClientAPI client) |
3167 | { | 3169 | { |
@@ -3194,6 +3196,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3194 | } | 3196 | } |
3195 | 3197 | ||
3196 | m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode); | 3198 | m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode); |
3199 | CleanDroppedAttachments(); | ||
3197 | //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); | 3200 | //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); |
3198 | //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); | 3201 | //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); |
3199 | } | 3202 | } |
@@ -3408,6 +3411,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3408 | 3411 | ||
3409 | if (vialogin) | 3412 | if (vialogin) |
3410 | { | 3413 | { |
3414 | CleanDroppedAttachments(); | ||
3415 | |||
3411 | if (TestBorderCross(agent.startpos, Cardinals.E)) | 3416 | if (TestBorderCross(agent.startpos, Cardinals.E)) |
3412 | { | 3417 | { |
3413 | Border crossedBorder = GetCrossedBorder(agent.startpos, Cardinals.E); | 3418 | Border crossedBorder = GetCrossedBorder(agent.startpos, Cardinals.E); |
@@ -3756,7 +3761,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
3756 | 3761 | ||
3757 | // We have to wait until the viewer contacts this region after receiving EAC. | 3762 | // We have to wait until the viewer contacts this region after receiving EAC. |
3758 | // That calls AddNewClient, which finally creates the ScenePresence | 3763 | // That calls AddNewClient, which finally creates the ScenePresence |
3759 | m_log.Debug("ICADU -> pre wait"); | 3764 | ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2); |
3765 | if (nearestParcel == null) | ||
3766 | { | ||
3767 | m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: no allowed parcel", cAgentData.AgentID); | ||
3768 | return false; | ||
3769 | } | ||
3770 | |||
3760 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); | 3771 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); |
3761 | m_log.Debug("ICADU -> post wait"); | 3772 | m_log.Debug("ICADU -> post wait"); |
3762 | if (childAgentUpdate != null) | 3773 | if (childAgentUpdate != null) |
@@ -4738,7 +4749,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4738 | Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); | 4749 | Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); |
4739 | //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); | 4750 | //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); |
4740 | return nearestRegionEdgePoint; | 4751 | return nearestRegionEdgePoint; |
4741 | return null; | ||
4742 | } | 4752 | } |
4743 | 4753 | ||
4744 | private Vector3 GetParcelCenterAtGround(ILandObject parcel) | 4754 | private Vector3 GetParcelCenterAtGround(ILandObject parcel) |
@@ -4987,5 +4997,40 @@ namespace OpenSim.Region.Framework.Scenes | |||
4987 | throw new Exception(error); | 4997 | throw new Exception(error); |
4988 | } | 4998 | } |
4989 | } | 4999 | } |
5000 | |||
5001 | public void CleanDroppedAttachments() | ||
5002 | { | ||
5003 | List<SceneObjectGroup> objectsToDelete = | ||
5004 | new List<SceneObjectGroup>(); | ||
5005 | |||
5006 | lock (m_cleaningAttachments) | ||
5007 | { | ||
5008 | ForEachSOG(delegate (SceneObjectGroup grp) | ||
5009 | { | ||
5010 | if (grp.RootPart.Shape.PCode == 0 && grp.RootPart.Shape.State != 0 && (!objectsToDelete.Contains(grp))) | ||
5011 | { | ||
5012 | UUID agentID = grp.OwnerID; | ||
5013 | if (agentID == UUID.Zero) | ||
5014 | { | ||
5015 | objectsToDelete.Add(grp); | ||
5016 | return; | ||
5017 | } | ||
5018 | |||
5019 | ScenePresence sp = GetScenePresence(agentID); | ||
5020 | if (sp == null) | ||
5021 | { | ||
5022 | objectsToDelete.Add(grp); | ||
5023 | return; | ||
5024 | } | ||
5025 | } | ||
5026 | }); | ||
5027 | } | ||
5028 | |||
5029 | foreach (SceneObjectGroup grp in objectsToDelete) | ||
5030 | { | ||
5031 | m_log.InfoFormat("[SCENE]: Deleting dropped attachment {0} of user {1}", grp.UUID, grp.OwnerID); | ||
5032 | DeleteSceneObject(grp, true); | ||
5033 | } | ||
5034 | } | ||
4990 | } | 5035 | } |
4991 | } | 5036 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fe9dc56..2e58a46 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1133,7 +1133,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1133 | 1133 | ||
1134 | m_log.DebugFormat( | 1134 | m_log.DebugFormat( |
1135 | "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", | 1135 | "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", |
1136 | client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); | 1136 | client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); |
1137 | } | 1137 | } |
1138 | 1138 | ||
1139 | /// <summary> | 1139 | /// <summary> |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1a13dea..c251a49 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -9882,6 +9882,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9882 | case "4": | 9882 | case "4": |
9883 | ret = ret + new LSL_List(land.Area); | 9883 | ret = ret + new LSL_List(land.Area); |
9884 | break; | 9884 | break; |
9885 | case "5": | ||
9886 | ret = ret + new LSL_List(land.GlobalID); | ||
9887 | break; | ||
9885 | default: | 9888 | default: |
9886 | ret = ret + new LSL_List(0); | 9889 | ret = ret + new LSL_List(0); |
9887 | break; | 9890 | break; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index b96e977..b3c4d95 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | |||
@@ -507,6 +507,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
507 | public const int PARCEL_DETAILS_OWNER = 2; | 507 | public const int PARCEL_DETAILS_OWNER = 2; |
508 | public const int PARCEL_DETAILS_GROUP = 3; | 508 | public const int PARCEL_DETAILS_GROUP = 3; |
509 | public const int PARCEL_DETAILS_AREA = 4; | 509 | public const int PARCEL_DETAILS_AREA = 4; |
510 | public const int PARCEL_DETAILS_ID = 5; | ||
510 | 511 | ||
511 | // constants for llSetClickAction | 512 | // constants for llSetClickAction |
512 | public const int CLICK_ACTION_NONE = 0; | 513 | public const int CLICK_ACTION_NONE = 0; |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index 7a28c2b..65a02df 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs | |||
@@ -125,7 +125,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
125 | OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); | 125 | OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); |
126 | if (response["Success"].AsBoolean()) | 126 | if (response["Success"].AsBoolean()) |
127 | { | 127 | { |
128 | OSDMap map = null; | 128 | OSDMap map = null; |
129 | try { map = OSDParser.DeserializeJson(response["LLPackedAppearance"].AsString()) as OSDMap; } | 129 | try { map = OSDParser.DeserializeJson(response["LLPackedAppearance"].AsString()) as OSDMap; } |
130 | catch { } | 130 | catch { } |
131 | 131 | ||
@@ -134,7 +134,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
134 | AvatarAppearance appearance = new AvatarAppearance(map); | 134 | AvatarAppearance appearance = new AvatarAppearance(map); |
135 | // DEBUG ON | 135 | // DEBUG ON |
136 | m_log.WarnFormat("[SIMIAN AVATAR CONNECTOR] retrieved appearance for {0}:\n{1}",userID,appearance.ToString()); | 136 | m_log.WarnFormat("[SIMIAN AVATAR CONNECTOR] retrieved appearance for {0}:\n{1}",userID,appearance.ToString()); |
137 | // DEBUG OFF | 137 | // DEBUG OFF |
138 | return appearance; | 138 | return appearance; |
139 | } | 139 | } |
140 | 140 | ||
@@ -161,7 +161,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
161 | 161 | ||
162 | // DEBUG ON | 162 | // DEBUG ON |
163 | m_log.WarnFormat("[SIMIAN AVATAR CONNECTOR] save appearance for {0}",userID); | 163 | m_log.WarnFormat("[SIMIAN AVATAR CONNECTOR] save appearance for {0}",userID); |
164 | // DEBUG OFF | 164 | // DEBUG OFF |
165 | 165 | ||
166 | NameValueCollection requestArgs = new NameValueCollection | 166 | NameValueCollection requestArgs = new NameValueCollection |
167 | { | 167 | { |