diff options
Diffstat (limited to 'OpenSim')
11 files changed, 159 insertions, 81 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs index afbe56b..a168bfe 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs | |||
@@ -426,7 +426,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
426 | if (!assetServerURL.EndsWith("/") && !assetServerURL.EndsWith("=")) | 426 | if (!assetServerURL.EndsWith("/") && !assetServerURL.EndsWith("=")) |
427 | assetServerURL = assetServerURL + "/"; | 427 | assetServerURL = assetServerURL + "/"; |
428 | 428 | ||
429 | m_log.DebugFormat("[J2KIMAGE]: texture {0} not found in local asset storage. Trying user's storage.", assetServerURL + id); | 429 | // m_log.DebugFormat("[J2KIMAGE]: texture {0} not found in local asset storage. Trying user's storage.", assetServerURL + id); |
430 | AssetService.Get(assetServerURL + id, InventoryAccessModule, AssetReceived); | 430 | AssetService.Get(assetServerURL + id, InventoryAccessModule, AssetReceived); |
431 | return; | 431 | return; |
432 | } | 432 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index eac0da7..f58a24f 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -937,6 +937,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
937 | EnableChildAgents(sp); | 937 | EnableChildAgents(sp); |
938 | 938 | ||
939 | // Finally, kill the agent we just created at the destination. | 939 | // Finally, kill the agent we just created at the destination. |
940 | // XXX: Possibly this should be done asynchronously. | ||
940 | Scene.SimulationService.CloseAgent(finalDestination, sp.UUID); | 941 | Scene.SimulationService.CloseAgent(finalDestination, sp.UUID); |
941 | } | 942 | } |
942 | 943 | ||
@@ -1481,9 +1482,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1481 | return agent; | 1482 | return agent; |
1482 | } | 1483 | } |
1483 | 1484 | ||
1484 | //AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo(); | ||
1485 | agent.ControllingClient.RequestClientInfo(); | ||
1486 | |||
1487 | //m_log.Debug("BEFORE CROSS"); | 1485 | //m_log.Debug("BEFORE CROSS"); |
1488 | //Scene.DumpChildrenSeeds(UUID); | 1486 | //Scene.DumpChildrenSeeds(UUID); |
1489 | //DumpKnownRegions(); | 1487 | //DumpKnownRegions(); |
@@ -1543,15 +1541,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1543 | agent.CloseChildAgents(neighbourx, neighboury); | 1541 | agent.CloseChildAgents(neighbourx, neighboury); |
1544 | 1542 | ||
1545 | AgentHasMovedAway(agent, false); | 1543 | AgentHasMovedAway(agent, false); |
1546 | |||
1547 | // // the user may change their profile information in other region, | ||
1548 | // // so the userinfo in UserProfileCache is not reliable any more, delete it | ||
1549 | // // REFACTORING PROBLEM. Well, not a problem, but this method is HORRIBLE! | ||
1550 | // if (agent.Scene.NeedSceneCacheClear(agent.UUID)) | ||
1551 | // { | ||
1552 | // m_log.DebugFormat( | ||
1553 | // "[ENTITY TRANSFER MODULE]: User {0} is going to another region", agent.UUID); | ||
1554 | // } | ||
1555 | 1544 | ||
1556 | //m_log.Debug("AFTER CROSS"); | 1545 | //m_log.Debug("AFTER CROSS"); |
1557 | //Scene.DumpChildrenSeeds(UUID); | 1546 | //Scene.DumpChildrenSeeds(UUID); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index a413546..9427961 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -317,7 +317,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
317 | // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", | 317 | // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", |
318 | // s.RegionInfo.RegionName, destination.RegionHandle); | 318 | // s.RegionInfo.RegionName, destination.RegionHandle); |
319 | 319 | ||
320 | Util.FireAndForget(delegate { m_scenes[destination.RegionID].IncomingCloseAgent(id, false); }); | 320 | m_scenes[destination.RegionID].IncomingCloseAgent(id, false); |
321 | return true; | 321 | return true; |
322 | } | 322 | } |
323 | 323 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 80581dc..6c79b13 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -422,13 +422,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
422 | // is not allowed to change the export flag. | 422 | // is not allowed to change the export flag. |
423 | bool denyExportChange = false; | 423 | bool denyExportChange = false; |
424 | 424 | ||
425 | m_log.InfoFormat("[XXX]: B: {0} O: {1} E: {2}", itemUpd.BasePermissions, itemUpd.CurrentPermissions, itemUpd.EveryOnePermissions); | 425 | // m_log.DebugFormat("[XXX]: B: {0} O: {1} E: {2}", itemUpd.BasePermissions, itemUpd.CurrentPermissions, itemUpd.EveryOnePermissions); |
426 | 426 | ||
427 | // If the user is not the creator or doesn't have "E" in both "B" and "O", deny setting export | 427 | // If the user is not the creator or doesn't have "E" in both "B" and "O", deny setting export |
428 | if ((item.BasePermissions & (uint)(PermissionMask.All | PermissionMask.Export)) != (uint)(PermissionMask.All | PermissionMask.Export) || (item.CurrentPermissions & (uint)PermissionMask.Export) == 0 || item.CreatorIdAsUuid != item.Owner) | 428 | if ((item.BasePermissions & (uint)(PermissionMask.All | PermissionMask.Export)) != (uint)(PermissionMask.All | PermissionMask.Export) || (item.CurrentPermissions & (uint)PermissionMask.Export) == 0 || item.CreatorIdAsUuid != item.Owner) |
429 | denyExportChange = true; | 429 | denyExportChange = true; |
430 | 430 | ||
431 | m_log.InfoFormat("[XXX]: Deny Export Update {0}", denyExportChange); | 431 | // m_log.DebugFormat("[XXX]: Deny Export Update {0}", denyExportChange); |
432 | 432 | ||
433 | // If it is already set, force it set and also force full perm | 433 | // If it is already set, force it set and also force full perm |
434 | // else prevent setting it. It can and should never be set unless | 434 | // else prevent setting it. It can and should never be set unless |
@@ -452,7 +452,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
452 | // If the new state is exportable, force full perm | 452 | // If the new state is exportable, force full perm |
453 | if ((itemUpd.EveryOnePermissions & (uint)PermissionMask.Export) != 0) | 453 | if ((itemUpd.EveryOnePermissions & (uint)PermissionMask.Export) != 0) |
454 | { | 454 | { |
455 | m_log.InfoFormat("[XXX]: Force full perm"); | 455 | // m_log.DebugFormat("[XXX]: Force full perm"); |
456 | itemUpd.NextPermissions = (uint)(PermissionMask.All); | 456 | itemUpd.NextPermissions = (uint)(PermissionMask.All); |
457 | } | 457 | } |
458 | } | 458 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 6bbcbd7..8fe9b66 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3435,15 +3435,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3435 | if (closeChildAgents && CapsModule != null) | 3435 | if (closeChildAgents && CapsModule != null) |
3436 | CapsModule.RemoveCaps(agentID); | 3436 | CapsModule.RemoveCaps(agentID); |
3437 | 3437 | ||
3438 | // // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever | ||
3439 | // // this method is doing is HORRIBLE!!! | ||
3440 | // Commented pending deletion since this method no longer appears to do anything at all | ||
3441 | // avatar.Scene.NeedSceneCacheClear(avatar.UUID); | ||
3442 | |||
3443 | if (closeChildAgents && !isChildAgent) | 3438 | if (closeChildAgents && !isChildAgent) |
3444 | { | 3439 | { |
3445 | List<ulong> regions = avatar.KnownRegionHandles; | 3440 | List<ulong> regions = avatar.KnownRegionHandles; |
3446 | regions.Remove(RegionInfo.RegionHandle); | 3441 | regions.Remove(RegionInfo.RegionHandle); |
3442 | |||
3443 | // This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours. | ||
3447 | m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); | 3444 | m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); |
3448 | } | 3445 | } |
3449 | 3446 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 305f8a4..8c84c98 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -222,9 +222,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
222 | public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst) | 222 | public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst) |
223 | { | 223 | { |
224 | foreach (ulong handle in regionslst) | 224 | foreach (ulong handle in regionslst) |
225 | { | 225 | Util.FireAndForget(delegate { SendCloseChildAgent(agentID, handle); }); |
226 | SendCloseChildAgent(agentID, handle); | ||
227 | } | ||
228 | } | 226 | } |
229 | 227 | ||
230 | public List<GridRegion> RequestNamedRegions(string name, int maxNumber) | 228 | public List<GridRegion> RequestNamedRegions(string name, int maxNumber) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 1b81985..0c91e13 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3137,10 +3137,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3137 | if (byebyeRegions.Count > 0) | 3137 | if (byebyeRegions.Count > 0) |
3138 | { | 3138 | { |
3139 | m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents"); | 3139 | m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents"); |
3140 | Util.FireAndForget(delegate | 3140 | |
3141 | { | 3141 | m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions); |
3142 | m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions); | ||
3143 | }); | ||
3144 | } | 3142 | } |
3145 | 3143 | ||
3146 | foreach (ulong handle in byebyeRegions) | 3144 | foreach (ulong handle in byebyeRegions) |
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index b9d615e..95f9caf 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |||
@@ -289,6 +289,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
289 | 289 | ||
290 | private void statsHeartBeat(object sender, EventArgs e) | 290 | private void statsHeartBeat(object sender, EventArgs e) |
291 | { | 291 | { |
292 | if (!m_scene.Active) | ||
293 | return; | ||
294 | |||
292 | SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[22]; | 295 | SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[22]; |
293 | SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock(); | 296 | SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock(); |
294 | 297 | ||
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 8145d61..79edc12 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -79,6 +79,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
79 | 79 | ||
80 | private float minSizeForComplexMesh = 0.2f; // prims with all dimensions smaller than this will have a bounding box mesh | 80 | private float minSizeForComplexMesh = 0.2f; // prims with all dimensions smaller than this will have a bounding box mesh |
81 | 81 | ||
82 | private List<List<Vector3>> mConvexHulls = null; | ||
83 | |||
82 | private Dictionary<ulong, Mesh> m_uniqueMeshes = new Dictionary<ulong, Mesh>(); | 84 | private Dictionary<ulong, Mesh> m_uniqueMeshes = new Dictionary<ulong, Mesh>(); |
83 | 85 | ||
84 | public Meshmerizer(IConfigSource config) | 86 | public Meshmerizer(IConfigSource config) |
@@ -358,6 +360,61 @@ namespace OpenSim.Region.Physics.Meshing | |||
358 | physicsParms = (OSDMap)map["physics_shape"]; // old asset format | 360 | physicsParms = (OSDMap)map["physics_shape"]; // old asset format |
359 | else if (map.ContainsKey("physics_mesh")) | 361 | else if (map.ContainsKey("physics_mesh")) |
360 | physicsParms = (OSDMap)map["physics_mesh"]; // new asset format | 362 | physicsParms = (OSDMap)map["physics_mesh"]; // new asset format |
363 | else if (map.ContainsKey("medium_lod")) | ||
364 | physicsParms = (OSDMap)map["medium_lod"]; // if no physics mesh, try to fall back to medium LOD display mesh | ||
365 | else if (map.ContainsKey("high_lod")) | ||
366 | physicsParms = (OSDMap)map["high_lod"]; // if all else fails, use highest LOD display mesh and hope it works :) | ||
367 | |||
368 | if (map.ContainsKey("physics_convex")) | ||
369 | { // pull this out also in case physics engine can use it | ||
370 | try | ||
371 | { | ||
372 | OSDMap convexBlock = (OSDMap)map["physics_convex"]; | ||
373 | if (convexBlock.ContainsKey("HullList")) | ||
374 | { | ||
375 | byte[] hullList = convexBlock["HullList"].AsBinary(); | ||
376 | Vector3 min = new Vector3(-0.5f, -0.5f, -0.5f); | ||
377 | if (convexBlock.ContainsKey("Min")) min = convexBlock["Min"].AsVector3(); | ||
378 | Vector3 max = new Vector3(0.5f, 0.5f, 0.5f); | ||
379 | if (convexBlock.ContainsKey("Max")) max = convexBlock["Max"].AsVector3(); | ||
380 | |||
381 | // decompress and decode hull points | ||
382 | byte[] posBytes = DecompressOsd(convexBlock["Positions"].AsBinary()).AsBinary(); | ||
383 | |||
384 | List<List<Vector3>> hulls = new List<List<Vector3>>(); | ||
385 | int posNdx = 0; | ||
386 | |||
387 | foreach (byte cnt in hullList) | ||
388 | { | ||
389 | int count = cnt == 0 ? 256 : cnt; | ||
390 | List<Vector3> hull = new List<Vector3>(); | ||
391 | |||
392 | for (int i = 0; i < count; i++) | ||
393 | { | ||
394 | ushort uX = Utils.BytesToUInt16(posBytes, posNdx); posNdx += 2; | ||
395 | ushort uY = Utils.BytesToUInt16(posBytes, posNdx); posNdx += 2; | ||
396 | ushort uZ = Utils.BytesToUInt16(posBytes, posNdx); posNdx += 2; | ||
397 | |||
398 | Vector3 pos = new Vector3( | ||
399 | Utils.UInt16ToFloat(uX, min.X, max.X), | ||
400 | Utils.UInt16ToFloat(uY, min.Y, max.Y), | ||
401 | Utils.UInt16ToFloat(uZ, min.Z, max.Z) | ||
402 | ); | ||
403 | |||
404 | hull.Add(pos); | ||
405 | } | ||
406 | |||
407 | hulls.Add(hull); | ||
408 | } | ||
409 | |||
410 | mConvexHulls = hulls; | ||
411 | } | ||
412 | } | ||
413 | catch (Exception e) | ||
414 | { | ||
415 | m_log.WarnFormat("[MESH]: exception decoding convex block: {0}", e.Message); | ||
416 | } | ||
417 | } | ||
361 | 418 | ||
362 | if (physicsParms == null) | 419 | if (physicsParms == null) |
363 | { | 420 | { |
@@ -377,27 +434,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
377 | // byte[] decompressed = new byte[physSize * 5]; | 434 | // byte[] decompressed = new byte[physSize * 5]; |
378 | try | 435 | try |
379 | { | 436 | { |
380 | using (MemoryStream inMs = new MemoryStream(meshBytes)) | 437 | decodedMeshOsd = DecompressOsd(meshBytes); |
381 | { | ||
382 | using (MemoryStream outMs = new MemoryStream()) | ||
383 | { | ||
384 | using (ZOutputStream zOut = new ZOutputStream(outMs)) | ||
385 | { | ||
386 | byte[] readBuffer = new byte[2048]; | ||
387 | int readLen = 0; | ||
388 | while ((readLen = inMs.Read(readBuffer, 0, readBuffer.Length)) > 0) | ||
389 | { | ||
390 | zOut.Write(readBuffer, 0, readLen); | ||
391 | } | ||
392 | zOut.Flush(); | ||
393 | outMs.Seek(0, SeekOrigin.Begin); | ||
394 | |||
395 | byte[] decompressedBuf = outMs.GetBuffer(); | ||
396 | |||
397 | decodedMeshOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf); | ||
398 | } | ||
399 | } | ||
400 | } | ||
401 | } | 438 | } |
402 | catch (Exception e) | 439 | catch (Exception e) |
403 | { | 440 | { |
@@ -424,6 +461,41 @@ namespace OpenSim.Region.Physics.Meshing | |||
424 | return true; | 461 | return true; |
425 | } | 462 | } |
426 | 463 | ||
464 | |||
465 | /// <summary> | ||
466 | /// decompresses a gzipped OSD object | ||
467 | /// </summary> | ||
468 | /// <param name="decodedOsd"></param> the OSD object | ||
469 | /// <param name="meshBytes"></param> | ||
470 | /// <returns></returns> | ||
471 | private static OSD DecompressOsd(byte[] meshBytes) | ||
472 | { | ||
473 | OSD decodedOsd = null; | ||
474 | |||
475 | using (MemoryStream inMs = new MemoryStream(meshBytes)) | ||
476 | { | ||
477 | using (MemoryStream outMs = new MemoryStream()) | ||
478 | { | ||
479 | using (ZOutputStream zOut = new ZOutputStream(outMs)) | ||
480 | { | ||
481 | byte[] readBuffer = new byte[2048]; | ||
482 | int readLen = 0; | ||
483 | while ((readLen = inMs.Read(readBuffer, 0, readBuffer.Length)) > 0) | ||
484 | { | ||
485 | zOut.Write(readBuffer, 0, readLen); | ||
486 | } | ||
487 | zOut.Flush(); | ||
488 | outMs.Seek(0, SeekOrigin.Begin); | ||
489 | |||
490 | byte[] decompressedBuf = outMs.GetBuffer(); | ||
491 | |||
492 | decodedOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf); | ||
493 | } | ||
494 | } | ||
495 | } | ||
496 | return decodedOsd; | ||
497 | } | ||
498 | |||
427 | /// <summary> | 499 | /// <summary> |
428 | /// Generate the co-ords and faces necessary to construct a mesh from the sculpt data the accompanies a prim. | 500 | /// Generate the co-ords and faces necessary to construct a mesh from the sculpt data the accompanies a prim. |
429 | /// </summary> | 501 | /// </summary> |
@@ -700,6 +772,27 @@ namespace OpenSim.Region.Physics.Meshing | |||
700 | return true; | 772 | return true; |
701 | } | 773 | } |
702 | 774 | ||
775 | /// <summary> | ||
776 | /// temporary prototype code - please do not use until the interface has been finalized! | ||
777 | /// </summary> | ||
778 | /// <param name="size">value to scale the hull points by</param> | ||
779 | /// <returns>a list of hulls if they exist and have been successfully decoded, otherwise null</returns> | ||
780 | public List<List<Vector3>> GetConvexHulls(Vector3 size) | ||
781 | { | ||
782 | if (mConvexHulls == null) | ||
783 | return null; | ||
784 | |||
785 | List<List<Vector3>> hulls = new List<List<Vector3>>(); | ||
786 | foreach (var hull in mConvexHulls) | ||
787 | { | ||
788 | List<Vector3> verts = new List<Vector3>(); | ||
789 | foreach (var vert in hull) | ||
790 | verts.Add(vert * size); | ||
791 | } | ||
792 | |||
793 | return hulls; | ||
794 | } | ||
795 | |||
703 | public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod) | 796 | public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod) |
704 | { | 797 | { |
705 | return CreateMesh(primName, primShape, size, lod, false, true); | 798 | return CreateMesh(primName, primShape, size, lod, false, true); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 44fdd1a..9ca5ca9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -544,21 +544,33 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
544 | 544 | ||
545 | set {m_data = value; } | 545 | set {m_data = value; } |
546 | } | 546 | } |
547 | // Function to obtain LSL type from an index. This is needed | 547 | |
548 | // because LSL lists allow for multiple types, and safely | 548 | /// <summary> |
549 | // iterating in them requires a type check. | 549 | /// Obtain LSL type from an index. |
550 | /// </summary> | ||
551 | /// <remarks> | ||
552 | /// This is needed because LSL lists allow for multiple types, and safely | ||
553 | /// iterating in them requires a type check. | ||
554 | /// </remarks> | ||
555 | /// <returns></returns> | ||
556 | /// <param name='itemIndex'></param> | ||
550 | public Type GetLSLListItemType(int itemIndex) | 557 | public Type GetLSLListItemType(int itemIndex) |
551 | { | 558 | { |
552 | return m_data[itemIndex].GetType(); | 559 | return m_data[itemIndex].GetType(); |
553 | } | 560 | } |
554 | 561 | ||
555 | // Member functions to obtain item as specific types. | 562 | /// <summary> |
556 | // For cases where implicit conversions would apply if items | 563 | /// Obtain float from an index. |
557 | // were not in a list (e.g. integer to float, but not float | 564 | /// </summary> |
558 | // to integer) functions check for alternate types so as to | 565 | /// <remarks> |
559 | // down-cast from Object to the correct type. | 566 | /// For cases where implicit conversions would apply if items |
560 | // Note: no checks for item index being valid are performed | 567 | /// were not in a list (e.g. integer to float, but not float |
561 | 568 | /// to integer) functions check for alternate types so as to | |
569 | /// down-cast from Object to the correct type. | ||
570 | /// Note: no checks for item index being valid are performed | ||
571 | /// </remarks> | ||
572 | /// <returns></returns> | ||
573 | /// <param name='itemIndex'></param> | ||
562 | public LSL_Types.LSLFloat GetLSLFloatItem(int itemIndex) | 574 | public LSL_Types.LSLFloat GetLSLFloatItem(int itemIndex) |
563 | { | 575 | { |
564 | if (m_data[itemIndex] is LSL_Types.LSLInteger) | 576 | if (m_data[itemIndex] is LSL_Types.LSLInteger) |
@@ -589,26 +601,14 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
589 | 601 | ||
590 | public LSL_Types.LSLString GetLSLStringItem(int itemIndex) | 602 | public LSL_Types.LSLString GetLSLStringItem(int itemIndex) |
591 | { | 603 | { |
592 | if (m_data[itemIndex] is LSL_Types.key) | 604 | if (m_data[itemIndex] is LSL_Types.key) |
593 | { | 605 | { |
594 | return (LSL_Types.key)m_data[itemIndex]; | 606 | return (LSL_Types.key)m_data[itemIndex]; |
595 | } | 607 | } |
596 | else if (m_data[itemIndex] is String) | 608 | else |
597 | { | 609 | { |
598 | return new LSL_Types.LSLString((string)m_data[itemIndex]); | 610 | return new LSL_Types.LSLString(m_data[itemIndex].ToString()); |
599 | } | 611 | } |
600 | else if (m_data[itemIndex] is LSL_Types.LSLFloat) | ||
601 | { | ||
602 | return new LSL_Types.LSLString((LSLFloat)m_data[itemIndex]); | ||
603 | } | ||
604 | else if (m_data[itemIndex] is LSL_Types.LSLInteger) | ||
605 | { | ||
606 | return new LSL_Types.LSLString((LSLInteger)m_data[itemIndex]); | ||
607 | } | ||
608 | else | ||
609 | { | ||
610 | return (LSL_Types.LSLString)m_data[itemIndex]; | ||
611 | } | ||
612 | } | 612 | } |
613 | 613 | ||
614 | public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex) | 614 | public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex) |
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 012b14e..ae37ca7 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |||
@@ -218,7 +218,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
218 | if (action.Equals("release")) | 218 | if (action.Equals("release")) |
219 | ReleaseAgent(regionID, id); | 219 | ReleaseAgent(regionID, id); |
220 | else | 220 | else |
221 | m_SimulationService.CloseAgent(destination, id); | 221 | Util.FireAndForget(delegate { m_SimulationService.CloseAgent(destination, id); }); |
222 | 222 | ||
223 | responsedata["int_response_code"] = HttpStatusCode.OK; | 223 | responsedata["int_response_code"] = HttpStatusCode.OK; |
224 | responsedata["str_response_string"] = "OpenSim agent " + id.ToString(); | 224 | responsedata["str_response_string"] = "OpenSim agent " + id.ToString(); |