aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2013-05-16 21:59:14 +0100
committerMelanie2013-05-16 21:59:14 +0100
commit42c82b564ea0fe58376bffae2731bcedf4b842c7 (patch)
tree7ed5d564f320c1dcf6b709a1436b584a59e74a5e /OpenSim
parentMerge branch 'master' into careminster (diff)
parentminor: remove long commented out scene cache clearing code in EntityTransferM... (diff)
downloadopensim-SC-42c82b564ea0fe58376bffae2731bcedf4b842c7.zip
opensim-SC-42c82b564ea0fe58376bffae2731bcedf4b842c7.tar.gz
opensim-SC-42c82b564ea0fe58376bffae2731bcedf4b842c7.tar.bz2
opensim-SC-42c82b564ea0fe58376bffae2731bcedf4b842c7.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs OpenSim/Region/Framework/Scenes/ScenePresence.cs OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs1
-rw-r--r--OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs13
-rw-r--r--OpenSim/Addons/Groups/Service/GroupsService.cs7
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs7
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs1
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs3
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs34
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSParam.cs11
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs4
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapes.cs9
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs60
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs2
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs8
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs7
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs7
-rw-r--r--OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs9
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs2
23 files changed, 146 insertions, 67 deletions
diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
index f670272..7e0b112 100644
--- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
+++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
@@ -186,7 +186,6 @@ namespace OpenSim.Groups
186 public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, 186 public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment,
187 bool allowPublish, bool maturePublish, UUID founderID, out string reason) 187 bool allowPublish, bool maturePublish, UUID founderID, out string reason)
188 { 188 {
189 m_log.DebugFormat("[Groups]: Creating group {0}", name);
190 reason = string.Empty; 189 reason = string.Empty;
191 if (m_UserManagement.IsLocalGridUser(RequestingAgentID)) 190 if (m_UserManagement.IsLocalGridUser(RequestingAgentID))
192 return m_LocalGroupsConnector.CreateGroup(RequestingAgentID, name, charter, showInList, insigniaID, 191 return m_LocalGroupsConnector.CreateGroup(RequestingAgentID, name, charter, showInList, insigniaID,
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
index f991d01..28f7acc 100644
--- a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
+++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
@@ -170,11 +170,16 @@ namespace OpenSim.Groups
170 170
171 } 171 }
172 172
173 grec = m_GroupsService.GetGroupRecord(RequestingAgentID, grec.GroupID); 173 if (grec.GroupID != UUID.Zero)
174 if (grec == null) 174 {
175 NullResult(result, "Internal Error"); 175 grec = m_GroupsService.GetGroupRecord(RequestingAgentID, grec.GroupID);
176 if (grec == null)
177 NullResult(result, "Internal Error");
178 else
179 result["RESULT"] = GroupsDataUtils.GroupRecord(grec);
180 }
176 else 181 else
177 result["RESULT"] = GroupsDataUtils.GroupRecord(grec); 182 NullResult(result, reason);
178 } 183 }
179 184
180 string xmlString = ServerUtils.BuildXmlResponse(result); 185 string xmlString = ServerUtils.BuildXmlResponse(result);
diff --git a/OpenSim/Addons/Groups/Service/GroupsService.cs b/OpenSim/Addons/Groups/Service/GroupsService.cs
index 6a4348b..a2ef13a 100644
--- a/OpenSim/Addons/Groups/Service/GroupsService.cs
+++ b/OpenSim/Addons/Groups/Service/GroupsService.cs
@@ -130,6 +130,13 @@ namespace OpenSim.Groups
130 { 130 {
131 reason = string.Empty; 131 reason = string.Empty;
132 132
133 // Check if the group already exists
134 if (m_Database.RetrieveGroup(name) != null)
135 {
136 reason = "A group with that name already exists";
137 return UUID.Zero;
138 }
139
133 // Create the group 140 // Create the group
134 GroupData data = new GroupData(); 141 GroupData data = new GroupData();
135 data.GroupID = UUID.Random(); 142 data.GroupID = UUID.Random();
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
index 3995620..dfc4419 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
@@ -429,7 +429,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
429 if (!assetServerURL.EndsWith("/") && !assetServerURL.EndsWith("=")) 429 if (!assetServerURL.EndsWith("/") && !assetServerURL.EndsWith("="))
430 assetServerURL = assetServerURL + "/"; 430 assetServerURL = assetServerURL + "/";
431 431
432 m_log.DebugFormat("[J2KIMAGE]: texture {0} not found in local asset storage. Trying user's storage.", assetServerURL + id); 432// m_log.DebugFormat("[J2KIMAGE]: texture {0} not found in local asset storage. Trying user's storage.", assetServerURL + id);
433 AssetService.Get(assetServerURL + id, InventoryAccessModule, AssetReceived); 433 AssetService.Get(assetServerURL + id, InventoryAccessModule, AssetReceived);
434 return; 434 return;
435 } 435 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 33ca08c..fab66ce 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1416,7 +1416,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1416 1416
1417 // We only want to send initial data to new clients, not ones which are being converted from child to root. 1417 // We only want to send initial data to new clients, not ones which are being converted from child to root.
1418 if (client != null) 1418 if (client != null)
1419 client.SceneAgent.SendInitialDataToMe(); 1419 {
1420 AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code);
1421 bool tp = (aCircuit.teleportFlags > 0);
1422 if (!tp)
1423 client.SceneAgent.SendInitialDataToMe();
1424 }
1420 1425
1421 // Now we know we can handle more data 1426 // Now we know we can handle more data
1422 Thread.Sleep(200); 1427 Thread.Sleep(200);
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 6e19805..6b90097 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -942,6 +942,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
942 EnableChildAgents(sp); 942 EnableChildAgents(sp);
943 943
944 // Finally, kill the agent we just created at the destination. 944 // Finally, kill the agent we just created at the destination.
945 // XXX: Possibly this should be done asynchronously.
945 Scene.SimulationService.CloseAgent(finalDestination, sp.UUID); 946 Scene.SimulationService.CloseAgent(finalDestination, sp.UUID);
946 } 947 }
947 948
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 8b8bb37..e4aa7bc 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -322,7 +322,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
322// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", 322// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
323// s.RegionInfo.RegionName, destination.RegionHandle); 323// s.RegionInfo.RegionName, destination.RegionHandle);
324 324
325 Util.FireAndForget(delegate { m_scenes[destination.RegionID].IncomingCloseAgent(id, false); }); 325 m_scenes[destination.RegionID].IncomingCloseAgent(id, false);
326 return true; 326 return true;
327 } 327 }
328 //m_log.Debug("[LOCAL COMMS]: region not found in SendCloseAgent"); 328 //m_log.Debug("[LOCAL COMMS]: region not found in SendCloseAgent");
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 257e070..70018c8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -417,13 +417,13 @@ namespace OpenSim.Region.Framework.Scenes
417 // is not allowed to change the export flag. 417 // is not allowed to change the export flag.
418 bool denyExportChange = false; 418 bool denyExportChange = false;
419 419
420 m_log.InfoFormat("[XXX]: B: {0} O: {1} E: {2}", itemUpd.BasePermissions, itemUpd.CurrentPermissions, itemUpd.EveryOnePermissions); 420// m_log.DebugFormat("[XXX]: B: {0} O: {1} E: {2}", itemUpd.BasePermissions, itemUpd.CurrentPermissions, itemUpd.EveryOnePermissions);
421 421
422 // If the user is not the creator or doesn't have "E" in both "B" and "O", deny setting export 422 // If the user is not the creator or doesn't have "E" in both "B" and "O", deny setting export
423 if ((item.BasePermissions & (uint)(PermissionMask.All | PermissionMask.Export)) != (uint)(PermissionMask.All | PermissionMask.Export) || (item.CurrentPermissions & (uint)PermissionMask.Export) == 0 || item.CreatorIdAsUuid != item.Owner) 423 if ((item.BasePermissions & (uint)(PermissionMask.All | PermissionMask.Export)) != (uint)(PermissionMask.All | PermissionMask.Export) || (item.CurrentPermissions & (uint)PermissionMask.Export) == 0 || item.CreatorIdAsUuid != item.Owner)
424 denyExportChange = true; 424 denyExportChange = true;
425 425
426 m_log.InfoFormat("[XXX]: Deny Export Update {0}", denyExportChange); 426// m_log.DebugFormat("[XXX]: Deny Export Update {0}", denyExportChange);
427 427
428 // If it is already set, force it set and also force full perm 428 // If it is already set, force it set and also force full perm
429 // else prevent setting it. It can and should never be set unless 429 // else prevent setting it. It can and should never be set unless
@@ -447,7 +447,7 @@ namespace OpenSim.Region.Framework.Scenes
447 // If the new state is exportable, force full perm 447 // If the new state is exportable, force full perm
448 if ((itemUpd.EveryOnePermissions & (uint)PermissionMask.Export) != 0) 448 if ((itemUpd.EveryOnePermissions & (uint)PermissionMask.Export) != 0)
449 { 449 {
450 m_log.InfoFormat("[XXX]: Force full perm"); 450// m_log.DebugFormat("[XXX]: Force full perm");
451 itemUpd.NextPermissions = (uint)(PermissionMask.All); 451 itemUpd.NextPermissions = (uint)(PermissionMask.All);
452 } 452 }
453 } 453 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3aabd14..f561d97 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3593,15 +3593,12 @@ namespace OpenSim.Region.Framework.Scenes
3593 if (closeChildAgents && CapsModule != null) 3593 if (closeChildAgents && CapsModule != null)
3594 CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode); 3594 CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode);
3595 3595
3596// // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever
3597// // this method is doing is HORRIBLE!!!
3598 // Commented pending deletion since this method no longer appears to do anything at all
3599// avatar.Scene.NeedSceneCacheClear(avatar.UUID);
3600
3601 if (closeChildAgents && !isChildAgent) 3596 if (closeChildAgents && !isChildAgent)
3602 { 3597 {
3603 List<ulong> regions = avatar.KnownRegionHandles; 3598 List<ulong> regions = avatar.KnownRegionHandles;
3604 regions.Remove(RegionInfo.RegionHandle); 3599 regions.Remove(RegionInfo.RegionHandle);
3600
3601 // This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours.
3605 m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); 3602 m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
3606 } 3603 }
3607 3604
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 0ab267a..5184585 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1550,6 +1550,7 @@ namespace OpenSim.Region.Framework.Scenes
1550 // Create child agents in neighbouring regions 1550 // Create child agents in neighbouring regions
1551 if (openChildAgents && !IsChildAgent) 1551 if (openChildAgents && !IsChildAgent)
1552 { 1552 {
1553 SendInitialDataToMe();
1553 1554
1554 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); 1555 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
1555 if (m_agentTransfer != null) 1556 if (m_agentTransfer != null)
@@ -3347,10 +3348,8 @@ namespace OpenSim.Region.Framework.Scenes
3347 if (byebyeRegions.Count > 0) 3348 if (byebyeRegions.Count > 0)
3348 { 3349 {
3349 m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents"); 3350 m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents");
3350 Util.FireAndForget(delegate 3351
3351 { 3352 m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions);
3352 m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions);
3353 });
3354 } 3353 }
3355 3354
3356 foreach (ulong handle in byebyeRegions) 3355 foreach (ulong handle in byebyeRegions)
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index 5398ab9..bf32251 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -290,6 +290,9 @@ namespace OpenSim.Region.Framework.Scenes
290 290
291 private void statsHeartBeat(object sender, EventArgs e) 291 private void statsHeartBeat(object sender, EventArgs e)
292 { 292 {
293 if (!m_scene.Active)
294 return;
295
293 SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[23]; 296 SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[23];
294 SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock(); 297 SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock();
295 298
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index 542f732..ff5b6ab 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -419,7 +419,7 @@ public sealed class BSCharacter : BSPhysObject
419 DetailLog("{0},BSCharacter.setTargetVelocity,call,vel={1}", LocalID, value); 419 DetailLog("{0},BSCharacter.setTargetVelocity,call,vel={1}", LocalID, value);
420 m_targetVelocity = value; 420 m_targetVelocity = value;
421 OMV.Vector3 targetVel = value; 421 OMV.Vector3 targetVel = value;
422 if (_setAlwaysRun) 422 if (_setAlwaysRun && !_flying)
423 targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 0f); 423 targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 0f);
424 424
425 if (m_moveActor != null) 425 if (m_moveActor != null)
@@ -481,7 +481,10 @@ public sealed class BSCharacter : BSPhysObject
481 _orientation = value; 481 _orientation = value;
482 PhysScene.TaintedObject("BSCharacter.setOrientation", delegate() 482 PhysScene.TaintedObject("BSCharacter.setOrientation", delegate()
483 { 483 {
484 ForceOrientation = _orientation; 484 // Bullet assumes we know what we are doing when forcing orientation
485 // so it lets us go against all the rules and just compensates for them later.
486 // This keeps us from flipping the capsule over which the veiwer does not understand.
487 ForceOrientation = new OMV.Quaternion(0, 0, _orientation.Z,0);
485 }); 488 });
486 } 489 }
487 } 490 }
@@ -649,12 +652,12 @@ public sealed class BSCharacter : BSPhysObject
649 OMV.Vector3 newScale; 652 OMV.Vector3 newScale;
650 653
651 // Bullet's capsule total height is the "passed height + radius * 2"; 654 // Bullet's capsule total height is the "passed height + radius * 2";
652 // The base capsule is 1 diameter and 2 height (passed radius=0.5, passed height = 1) 655 // The base capsule is 1 unit in diameter and 2 units in height (passed radius=0.5, passed height = 1)
653 // The number we pass in for 'scaling' is the multiplier to get that base 656 // The number we pass in for 'scaling' is the multiplier to get that base
654 // shape to be the size desired. 657 // shape to be the size desired.
655 // So, when creating the scale for the avatar height, we take the passed height 658 // So, when creating the scale for the avatar height, we take the passed height
656 // (size.Z) and remove the caps. 659 // (size.Z) and remove the caps.
657 // Another oddity of the Bullet capsule implementation is that it presumes the Y 660 // An oddity of the Bullet capsule implementation is that it presumes the Y
658 // dimension is the radius of the capsule. Even though some of the code allows 661 // dimension is the radius of the capsule. Even though some of the code allows
659 // for a asymmetrical capsule, other parts of the code presume it is cylindrical. 662 // for a asymmetrical capsule, other parts of the code presume it is cylindrical.
660 663
@@ -662,8 +665,27 @@ public sealed class BSCharacter : BSPhysObject
662 newScale.X = size.X / 2f; 665 newScale.X = size.X / 2f;
663 newScale.Y = size.Y / 2f; 666 newScale.Y = size.Y / 2f;
664 667
668 float heightAdjust = BSParam.AvatarHeightMidFudge;
669 if (BSParam.AvatarHeightLowFudge != 0f || BSParam.AvatarHeightHighFudge != 0f)
670 {
671 // An avatar is between 1.61 and 2.12 meters. Midpoint is 1.87m.
672 // The "times 4" relies on the fact that the difference from the midpoint to the extremes is exactly 0.25
673 float midHeightOffset = size.Z - 1.87f;
674 if (midHeightOffset < 0f)
675 {
676 // Small avatar. Add the adjustment based on the distance from midheight
677 heightAdjust += -1f * midHeightOffset * 4f * BSParam.AvatarHeightLowFudge;
678 }
679 else
680 {
681 // Large avatar. Add the adjustment based on the distance from midheight
682 heightAdjust += midHeightOffset * 4f * BSParam.AvatarHeightHighFudge;
683 }
684 }
665 // The total scale height is the central cylindar plus the caps on the two ends. 685 // The total scale height is the central cylindar plus the caps on the two ends.
666 newScale.Z = (size.Z + (Math.Min(size.X, size.Y) * 2)) / 2f; 686 newScale.Z = (size.Z + (Math.Min(size.X, size.Y) * 2) + heightAdjust) / 2f;
687 // m_log.DebugFormat("{0} ComputeAvatarScale: size={1},adj={2},scale={3}", LogHeader, size, heightAdjust, newScale);
688
667 // If smaller than the endcaps, just fake like we're almost that small 689 // If smaller than the endcaps, just fake like we're almost that small
668 if (newScale.Z < 0) 690 if (newScale.Z < 0)
669 newScale.Z = 0.1f; 691 newScale.Z = 0.1f;
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
index 3ca7e16..d33292f 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
@@ -90,7 +90,7 @@ public static class BSParam
90 public static bool ShouldUseBulletHACD { get; set; } 90 public static bool ShouldUseBulletHACD { get; set; }
91 public static bool ShouldUseSingleConvexHullForPrims { get; set; } 91 public static bool ShouldUseSingleConvexHullForPrims { get; set; }
92 92
93 public static float TerrainImplementation { get; private set; } 93 public static float TerrainImplementation { get; set; }
94 public static int TerrainMeshMagnification { get; private set; } 94 public static int TerrainMeshMagnification { get; private set; }
95 public static float TerrainFriction { get; private set; } 95 public static float TerrainFriction { get; private set; }
96 public static float TerrainHitFraction { get; private set; } 96 public static float TerrainHitFraction { get; private set; }
@@ -125,6 +125,9 @@ public static class BSParam
125 public static float AvatarCapsuleWidth { get; private set; } 125 public static float AvatarCapsuleWidth { get; private set; }
126 public static float AvatarCapsuleDepth { get; private set; } 126 public static float AvatarCapsuleDepth { get; private set; }
127 public static float AvatarCapsuleHeight { get; private set; } 127 public static float AvatarCapsuleHeight { get; private set; }
128 public static float AvatarHeightLowFudge { get; private set; }
129 public static float AvatarHeightMidFudge { get; private set; }
130 public static float AvatarHeightHighFudge { get; private set; }
128 public static float AvatarContactProcessingThreshold { get; private set; } 131 public static float AvatarContactProcessingThreshold { get; private set; }
129 public static float AvatarBelowGroundUpCorrectionMeters { get; private set; } 132 public static float AvatarBelowGroundUpCorrectionMeters { get; private set; }
130 public static float AvatarStepHeight { get; private set; } 133 public static float AvatarStepHeight { get; private set; }
@@ -539,6 +542,12 @@ public static class BSParam
539 0.45f ), 542 0.45f ),
540 new ParameterDefn<float>("AvatarCapsuleHeight", "Default height of space around avatar", 543 new ParameterDefn<float>("AvatarCapsuleHeight", "Default height of space around avatar",
541 1.5f ), 544 1.5f ),
545 new ParameterDefn<float>("AvatarHeightLowFudge", "A fudge factor to make small avatars stand on the ground",
546 -0.2f ),
547 new ParameterDefn<float>("AvatarHeightMidFudge", "A fudge distance to adjust average sized avatars to be standing on ground",
548 0.1f ),
549 new ParameterDefn<float>("AvatarHeightHighFudge", "A fudge factor to make tall avatars stand on the ground",
550 0.1f ),
542 new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions", 551 new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions",
543 0.1f ), 552 0.1f ),
544 new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground", 553 new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground",
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index a4a8794..3f407ce 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -318,8 +318,12 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
318 ret = new BSAPIXNA(engineName, this); 318 ret = new BSAPIXNA(engineName, this);
319 // Disable some features that are not implemented in BulletXNA 319 // Disable some features that are not implemented in BulletXNA
320 m_log.InfoFormat("{0} Disabling some physics features not implemented by BulletXNA", LogHeader); 320 m_log.InfoFormat("{0} Disabling some physics features not implemented by BulletXNA", LogHeader);
321 m_log.InfoFormat("{0} Disabling ShouldUseBulletHACD", LogHeader);
321 BSParam.ShouldUseBulletHACD = false; 322 BSParam.ShouldUseBulletHACD = false;
323 m_log.InfoFormat("{0} Disabling ShouldUseSingleConvexHullForPrims", LogHeader);
322 BSParam.ShouldUseSingleConvexHullForPrims = false; 324 BSParam.ShouldUseSingleConvexHullForPrims = false;
325 m_log.InfoFormat("{0} Setting terrain implimentation to Heightmap", LogHeader);
326 BSParam.TerrainImplementation = (float)BSTerrainPhys.TerrainImplementation.Heightmap;
323 break; 327 break;
324 } 328 }
325 329
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
index 2dc029e..6b09468 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
@@ -283,8 +283,13 @@ public class BSShapeNative : BSShape
283 public override BSShape GetReference(BSScene pPhysicsScene, BSPhysObject pPrim) 283 public override BSShape GetReference(BSScene pPhysicsScene, BSPhysObject pPrim)
284 { 284 {
285 // Native shapes are not shared so we return a new shape. 285 // Native shapes are not shared so we return a new shape.
286 return new BSShapeNative(CreatePhysicalNativeShape(pPhysicsScene, pPrim, 286 BSShape ret = null;
287 physShapeInfo.shapeType, (FixedShapeKey)physShapeInfo.shapeKey) ); 287 lock (physShapeInfo)
288 {
289 ret = new BSShapeNative(CreatePhysicalNativeShape(pPhysicsScene, pPrim,
290 physShapeInfo.shapeType, (FixedShapeKey)physShapeInfo.shapeKey));
291 }
292 return ret;
288 } 293 }
289 294
290 // Make this reference to the physical shape go away since native shapes are not shared. 295 // Make this reference to the physical shape go away since native shapes are not shared.
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index d181b78..42929ec 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -358,6 +358,10 @@ namespace OpenSim.Region.Physics.Meshing
358 physicsParms = (OSDMap)map["physics_shape"]; // old asset format 358 physicsParms = (OSDMap)map["physics_shape"]; // old asset format
359 else if (map.ContainsKey("physics_mesh")) 359 else if (map.ContainsKey("physics_mesh"))
360 physicsParms = (OSDMap)map["physics_mesh"]; // new asset format 360 physicsParms = (OSDMap)map["physics_mesh"]; // new asset format
361 else if (map.ContainsKey("medium_lod"))
362 physicsParms = (OSDMap)map["medium_lod"]; // if no physics mesh, try to fall back to medium LOD display mesh
363 else if (map.ContainsKey("high_lod"))
364 physicsParms = (OSDMap)map["high_lod"]; // if all else fails, use highest LOD display mesh and hope it works :)
361 365
362 if (physicsParms == null) 366 if (physicsParms == null)
363 { 367 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index b524a18..3e69ab9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -546,21 +546,33 @@ namespace OpenSim.Region.ScriptEngine.Shared
546 546
547 set {m_data = value; } 547 set {m_data = value; }
548 } 548 }
549 // Function to obtain LSL type from an index. This is needed 549
550 // because LSL lists allow for multiple types, and safely 550 /// <summary>
551 // iterating in them requires a type check. 551 /// Obtain LSL type from an index.
552 /// </summary>
553 /// <remarks>
554 /// This is needed because LSL lists allow for multiple types, and safely
555 /// iterating in them requires a type check.
556 /// </remarks>
557 /// <returns></returns>
558 /// <param name='itemIndex'></param>
552 public Type GetLSLListItemType(int itemIndex) 559 public Type GetLSLListItemType(int itemIndex)
553 { 560 {
554 return m_data[itemIndex].GetType(); 561 return m_data[itemIndex].GetType();
555 } 562 }
556 563
557 // Member functions to obtain item as specific types. 564 /// <summary>
558 // For cases where implicit conversions would apply if items 565 /// Obtain float from an index.
559 // were not in a list (e.g. integer to float, but not float 566 /// </summary>
560 // to integer) functions check for alternate types so as to 567 /// <remarks>
561 // down-cast from Object to the correct type. 568 /// For cases where implicit conversions would apply if items
562 // Note: no checks for item index being valid are performed 569 /// were not in a list (e.g. integer to float, but not float
563 570 /// to integer) functions check for alternate types so as to
571 /// down-cast from Object to the correct type.
572 /// Note: no checks for item index being valid are performed
573 /// </remarks>
574 /// <returns></returns>
575 /// <param name='itemIndex'></param>
564 public LSL_Types.LSLFloat GetLSLFloatItem(int itemIndex) 576 public LSL_Types.LSLFloat GetLSLFloatItem(int itemIndex)
565 { 577 {
566 if (m_data[itemIndex] is LSL_Types.LSLInteger) 578 if (m_data[itemIndex] is LSL_Types.LSLInteger)
@@ -591,26 +603,14 @@ namespace OpenSim.Region.ScriptEngine.Shared
591 603
592 public LSL_Types.LSLString GetLSLStringItem(int itemIndex) 604 public LSL_Types.LSLString GetLSLStringItem(int itemIndex)
593 { 605 {
594 if (m_data[itemIndex] is LSL_Types.key) 606 if (m_data[itemIndex] is LSL_Types.key)
595 { 607 {
596 return (LSL_Types.key)m_data[itemIndex]; 608 return (LSL_Types.key)m_data[itemIndex];
597 } 609 }
598 else if (m_data[itemIndex] is String) 610 else
599 { 611 {
600 return new LSL_Types.LSLString((string)m_data[itemIndex]); 612 return new LSL_Types.LSLString(m_data[itemIndex].ToString());
601 } 613 }
602 else if (m_data[itemIndex] is LSL_Types.LSLFloat)
603 {
604 return new LSL_Types.LSLString((LSLFloat)m_data[itemIndex]);
605 }
606 else if (m_data[itemIndex] is LSL_Types.LSLInteger)
607 {
608 return new LSL_Types.LSLString((LSLInteger)m_data[itemIndex]);
609 }
610 else
611 {
612 return (LSL_Types.LSLString)m_data[itemIndex];
613 }
614 } 614 }
615 615
616 public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex) 616 public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex)
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index 25957d3..08ba50d 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -286,7 +286,7 @@ namespace OpenSim.Server.Base
286 e.InnerException == null ? e.Message : e.InnerException.Message, 286 e.InnerException == null ? e.Message : e.InnerException.Message,
287 e.StackTrace); 287 e.StackTrace);
288 } 288 }
289 m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0}: {1}", dllName, e.Message); 289 m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0}: {1} args.Length {2}", dllName, e.Message, args.Length);
290 return null; 290 return null;
291 } 291 }
292 292
diff --git a/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs
index 0d4990a..ffe2f36 100644
--- a/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs
@@ -76,10 +76,14 @@ namespace OpenSim.Server.Handlers.Hypergrid
76 server.AddStreamHandler(new GatekeeperAgentHandler(m_GatekeeperService, m_Proxy)); 76 server.AddStreamHandler(new GatekeeperAgentHandler(m_GatekeeperService, m_Proxy));
77 } 77 }
78 78
79 public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server) 79 public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server, string configName)
80 : this(config, server, null) 80 : this(config, server, (ISimulationService)null)
81 { 81 {
82 } 82 }
83 83
84 public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server)
85 : this(config, server, String.Empty)
86 {
87 }
84 } 88 }
85} 89}
diff --git a/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs
index 80eb5d2..8145a21 100644
--- a/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs
@@ -54,10 +54,15 @@ namespace OpenSim.Server.Handlers.Hypergrid
54 private IInstantMessage m_IMService; 54 private IInstantMessage m_IMService;
55 55
56 public InstantMessageServerConnector(IConfigSource config, IHttpServer server) : 56 public InstantMessageServerConnector(IConfigSource config, IHttpServer server) :
57 this(config, server, null) 57 this(config, server, (IInstantMessageSimConnector)null)
58 { 58 {
59 } 59 }
60 60
61 public InstantMessageServerConnector(IConfigSource config, IHttpServer server, string configName) :
62 this(config, server)
63 {
64 }
65
61 public InstantMessageServerConnector(IConfigSource config, IHttpServer server, IInstantMessageSimConnector simConnector) : 66 public InstantMessageServerConnector(IConfigSource config, IHttpServer server, IInstantMessageSimConnector simConnector) :
62 base(config, server, String.Empty) 67 base(config, server, String.Empty)
63 { 68 {
diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
index db62aaa..b20f467 100644
--- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
@@ -62,10 +62,15 @@ namespace OpenSim.Server.Handlers.Hypergrid
62 private bool m_VerifyCallers = false; 62 private bool m_VerifyCallers = false;
63 63
64 public UserAgentServerConnector(IConfigSource config, IHttpServer server) : 64 public UserAgentServerConnector(IConfigSource config, IHttpServer server) :
65 this(config, server, null) 65 this(config, server, (IFriendsSimConnector)null)
66 { 66 {
67 } 67 }
68 68
69 public UserAgentServerConnector(IConfigSource config, IHttpServer server, string configName) :
70 this(config, server)
71 {
72 }
73
69 public UserAgentServerConnector(IConfigSource config, IHttpServer server, IFriendsSimConnector friendsConnector) : 74 public UserAgentServerConnector(IConfigSource config, IHttpServer server, IFriendsSimConnector friendsConnector) :
70 base(config, server, String.Empty) 75 base(config, server, String.Empty)
71 { 76 {
diff --git a/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs b/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs
index 9a7ad34..1fb0dbc 100644
--- a/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs
+++ b/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs
@@ -60,8 +60,8 @@ namespace OpenSim.Server.Handlers.Login
60 InitializeHandlers(server); 60 InitializeHandlers(server);
61 } 61 }
62 62
63 public LLLoginServiceInConnector(IConfigSource config, IHttpServer server) : 63 public LLLoginServiceInConnector(IConfigSource config, IHttpServer server, string configName) :
64 base(config, server, String.Empty) 64 base(config, server, configName)
65 { 65 {
66 string loginService = ReadLocalServiceFromConfig(config); 66 string loginService = ReadLocalServiceFromConfig(config);
67 67
@@ -72,6 +72,11 @@ namespace OpenSim.Server.Handlers.Login
72 InitializeHandlers(server); 72 InitializeHandlers(server);
73 } 73 }
74 74
75 public LLLoginServiceInConnector(IConfigSource config, IHttpServer server) :
76 this(config, server, String.Empty)
77 {
78 }
79
75 private string ReadLocalServiceFromConfig(IConfigSource config) 80 private string ReadLocalServiceFromConfig(IConfigSource config)
76 { 81 {
77 IConfig serverConfig = config.Configs["LoginService"]; 82 IConfig serverConfig = config.Configs["LoginService"];
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 0bd8269..9b34298 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -241,7 +241,7 @@ namespace OpenSim.Server.Handlers.Simulation
241 if (action.Equals("release")) 241 if (action.Equals("release"))
242 ReleaseAgent(regionID, id); 242 ReleaseAgent(regionID, id);
243 else 243 else
244 m_SimulationService.CloseAgent(destination, id); 244 Util.FireAndForget(delegate { m_SimulationService.CloseAgent(destination, id); });
245 245
246 responsedata["int_response_code"] = HttpStatusCode.OK; 246 responsedata["int_response_code"] = HttpStatusCode.OK;
247 responsedata["str_response_string"] = "OpenSim agent " + id.ToString(); 247 responsedata["str_response_string"] = "OpenSim agent " + id.ToString();