aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorRobert Adams2013-10-28 09:30:26 -0700
committerRobert Adams2013-10-28 09:30:26 -0700
commit2be0347f5044ec723748c53db9290f3cf8bc431a (patch)
treeb52812ac7fcdcd8a7a985094e14ca3d461a39673 /OpenSim
parentvarregion: update PGSQL driver for storing variable terrain size blobs. (diff)
parentBulletSim: restore collision flags when clear collision cache. (diff)
downloadopensim-SC_OLD-2be0347f5044ec723748c53db9290f3cf8bc431a.zip
opensim-SC_OLD-2be0347f5044ec723748c53db9290f3cf8bc431a.tar.gz
opensim-SC_OLD-2be0347f5044ec723748c53db9290f3cf8bc431a.tar.bz2
opensim-SC_OLD-2be0347f5044ec723748c53db9290f3cf8bc431a.tar.xz
Merge branch 'master' into varregion
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/PGSQL/PGSQLEstateData.cs2
-rw-r--r--OpenSim/Data/PGSQL/PGSQLFramework.cs29
-rw-r--r--OpenSim/Data/PGSQL/PGSQLManager.cs29
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs26
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs97
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs17
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs3
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs14
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSParam.cs5
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs5
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs7
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
14 files changed, 181 insertions, 67 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLEstateData.cs b/OpenSim/Data/PGSQL/PGSQLEstateData.cs
index 141b8ed..5ad0eaa 100644
--- a/OpenSim/Data/PGSQL/PGSQLEstateData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLEstateData.cs
@@ -452,7 +452,7 @@ namespace OpenSim.Data.PGSQL
452 public List<int> GetEstates(string search) 452 public List<int> GetEstates(string search)
453 { 453 {
454 List<int> result = new List<int>(); 454 List<int> result = new List<int>();
455 string sql = "select \"estateID\" from estate_settings where lower(\"EstateName\") = lower(:EstateName)"; 455 string sql = "select \"EstateID\" from estate_settings where lower(\"EstateName\") = lower(:EstateName)";
456 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 456 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
457 { 457 {
458 conn.Open(); 458 conn.Open();
diff --git a/OpenSim/Data/PGSQL/PGSQLFramework.cs b/OpenSim/Data/PGSQL/PGSQLFramework.cs
index 494b0aa..1028e4e 100644
--- a/OpenSim/Data/PGSQL/PGSQLFramework.cs
+++ b/OpenSim/Data/PGSQL/PGSQLFramework.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Data; 31using System.Data;
32using System.Reflection;
32using OpenMetaverse; 33using OpenMetaverse;
33using OpenSim.Framework; 34using OpenSim.Framework;
34using Npgsql; 35using Npgsql;
@@ -50,8 +51,36 @@ namespace OpenSim.Data.PGSQL
50 protected PGSqlFramework(string connectionString) 51 protected PGSqlFramework(string connectionString)
51 { 52 {
52 m_connectionString = connectionString; 53 m_connectionString = connectionString;
54 InitializeMonoSecurity();
53 } 55 }
54 56
57 public void InitializeMonoSecurity()
58 {
59 if (!Util.IsPlatformMono)
60 {
61
62 if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null)
63 {
64 AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true");
65
66 AppDomain currentDomain = AppDomain.CurrentDomain;
67 currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
68 }
69 }
70 }
71
72 private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args)
73 {
74 Assembly MyAssembly = null;
75
76 if (args.Name.Substring(0, args.Name.IndexOf(",")) == "Mono.Security")
77 {
78 MyAssembly = Assembly.LoadFrom("lib/NET/Mono.Security.dll");
79 }
80
81 //Return the loaded assembly.
82 return MyAssembly;
83 }
55 ////////////////////////////////////////////////////////////// 84 //////////////////////////////////////////////////////////////
56 // 85 //
57 // All non queries are funneled through one connection 86 // All non queries are funneled through one connection
diff --git a/OpenSim/Data/PGSQL/PGSQLManager.cs b/OpenSim/Data/PGSQL/PGSQLManager.cs
index 3ddaf38..97f40b2 100644
--- a/OpenSim/Data/PGSQL/PGSQLManager.cs
+++ b/OpenSim/Data/PGSQL/PGSQLManager.cs
@@ -30,6 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.IO; 31using System.IO;
32using System.Reflection; 32using System.Reflection;
33using OpenSim.Framework;
33using log4net; 34using log4net;
34using OpenMetaverse; 35using OpenMetaverse;
35using Npgsql; 36using Npgsql;
@@ -56,6 +57,34 @@ namespace OpenSim.Data.PGSQL
56 public PGSQLManager(string connection) 57 public PGSQLManager(string connection)
57 { 58 {
58 connectionString = connection; 59 connectionString = connection;
60 InitializeMonoSecurity();
61 }
62
63 public void InitializeMonoSecurity()
64 {
65 if (!Util.IsPlatformMono)
66 {
67 if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null)
68 {
69 AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true");
70
71 AppDomain currentDomain = AppDomain.CurrentDomain;
72 currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
73 }
74 }
75 }
76
77 private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args)
78 {
79 Assembly MyAssembly = null;
80
81 if (args.Name.Substring(0, args.Name.IndexOf(",")) == "Mono.Security")
82 {
83 MyAssembly = Assembly.LoadFrom("lib/NET/Mono.Security.dll");
84 }
85
86 //Return the loaded assembly.
87 return MyAssembly;
59 } 88 }
60 89
61 /// <summary> 90 /// <summary>
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 7984acc..2b8a04f 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -4515,6 +4515,32 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4515 SceneObjectPart root = sop.ParentGroup.RootPart; 4515 SceneObjectPart root = sop.ParentGroup.RootPart;
4516 4516
4517 block.TouchName = Util.StringToBytes256(root.TouchName); 4517 block.TouchName = Util.StringToBytes256(root.TouchName);
4518
4519 // SL 3.3.4, at least, appears to read this information as a concatenated byte[] stream of UUIDs but
4520 // it's not yet clear whether this is actually used. If this is done in the future then a pre-cached
4521 // copy is really needed since it's less efficient to be constantly recreating this byte array.
4522// using (MemoryStream memStream = new MemoryStream())
4523// {
4524// using (BinaryWriter binWriter = new BinaryWriter(memStream))
4525// {
4526// for (int i = 0; i < sop.GetNumberOfSides(); i++)
4527// {
4528// Primitive.TextureEntryFace teFace = sop.Shape.Textures.FaceTextures[i];
4529//
4530// UUID textureID;
4531//
4532// if (teFace != null)
4533// textureID = teFace.TextureID;
4534// else
4535// textureID = sop.Shape.Textures.DefaultTexture.TextureID;
4536//
4537// binWriter.Write(textureID.GetBytes());
4538// }
4539//
4540// block.TextureID = memStream.ToArray();
4541// }
4542// }
4543
4518 block.TextureID = new byte[0]; // TextureID ??? 4544 block.TextureID = new byte[0]; // TextureID ???
4519 block.SitName = Util.StringToBytes256(root.SitName); 4545 block.SitName = Util.StringToBytes256(root.SitName);
4520 block.OwnerMask = root.OwnerMask; 4546 block.OwnerMask = root.OwnerMask;
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 8d957dc..218c2b2 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -862,44 +862,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP
862 return x == m_location; 862 return x == m_location;
863 } 863 }
864 864
865 public void BroadcastPacket(Packet packet, ThrottleOutPacketType category, bool sendToPausedAgents, bool allowSplitting) 865// public void BroadcastPacket(Packet packet, ThrottleOutPacketType category, bool sendToPausedAgents, bool allowSplitting)
866 { 866// {
867 // CoarseLocationUpdate and AvatarGroupsReply packets cannot be split in an automated way 867// // CoarseLocationUpdate and AvatarGroupsReply packets cannot be split in an automated way
868 if ((packet.Type == PacketType.CoarseLocationUpdate || packet.Type == PacketType.AvatarGroupsReply) && allowSplitting) 868// if ((packet.Type == PacketType.CoarseLocationUpdate || packet.Type == PacketType.AvatarGroupsReply) && allowSplitting)
869 allowSplitting = false; 869// allowSplitting = false;
870 870//
871 if (allowSplitting && packet.HasVariableBlocks) 871// if (allowSplitting && packet.HasVariableBlocks)
872 { 872// {
873 byte[][] datas = packet.ToBytesMultiple(); 873// byte[][] datas = packet.ToBytesMultiple();
874 int packetCount = datas.Length; 874// int packetCount = datas.Length;
875 875//
876 if (packetCount < 1) 876// if (packetCount < 1)
877 m_log.Error("[LLUDPSERVER]: Failed to split " + packet.Type + " with estimated length " + packet.Length); 877// m_log.Error("[LLUDPSERVER]: Failed to split " + packet.Type + " with estimated length " + packet.Length);
878 878//
879 for (int i = 0; i < packetCount; i++) 879// for (int i = 0; i < packetCount; i++)
880 { 880// {
881 byte[] data = datas[i]; 881// byte[] data = datas[i];
882 m_scene.ForEachClient( 882// m_scene.ForEachClient(
883 delegate(IClientAPI client) 883// delegate(IClientAPI client)
884 { 884// {
885 if (client is LLClientView) 885// if (client is LLClientView)
886 SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null); 886// SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null);
887 } 887// }
888 ); 888// );
889 } 889// }
890 } 890// }
891 else 891// else
892 { 892// {
893 byte[] data = packet.ToBytes(); 893// byte[] data = packet.ToBytes();
894 m_scene.ForEachClient( 894// m_scene.ForEachClient(
895 delegate(IClientAPI client) 895// delegate(IClientAPI client)
896 { 896// {
897 if (client is LLClientView) 897// if (client is LLClientView)
898 SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null); 898// SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null);
899 } 899// }
900 ); 900// );
901 } 901// }
902 } 902// }
903 903
904 /// <summary> 904 /// <summary>
905 /// Start the process of sending a packet to the client. 905 /// Start the process of sending a packet to the client.
@@ -919,6 +919,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
919 if (packet.Type == PacketType.CoarseLocationUpdate && allowSplitting) 919 if (packet.Type == PacketType.CoarseLocationUpdate && allowSplitting)
920 allowSplitting = false; 920 allowSplitting = false;
921 921
922 bool packetQueued = false;
923
922 if (allowSplitting && packet.HasVariableBlocks) 924 if (allowSplitting && packet.HasVariableBlocks)
923 { 925 {
924 byte[][] datas = packet.ToBytesMultiple(); 926 byte[][] datas = packet.ToBytesMultiple();
@@ -930,18 +932,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
930 for (int i = 0; i < packetCount; i++) 932 for (int i = 0; i < packetCount; i++)
931 { 933 {
932 byte[] data = datas[i]; 934 byte[] data = datas[i];
933 SendPacketData(udpClient, data, packet.Type, category, method); 935
936 if (!SendPacketData(udpClient, data, packet.Type, category, method))
937 packetQueued = true;
934 } 938 }
935 } 939 }
936 else 940 else
937 { 941 {
938 byte[] data = packet.ToBytes(); 942 byte[] data = packet.ToBytes();
939 SendPacketData(udpClient, data, packet.Type, category, method); 943 packetQueued = SendPacketData(udpClient, data, packet.Type, category, method);
940 } 944 }
941 945
942 PacketPool.Instance.ReturnPacket(packet); 946 PacketPool.Instance.ReturnPacket(packet);
943 947
944 m_dataPresentEvent.Set(); 948 if (packetQueued)
949 m_dataPresentEvent.Set();
945 } 950 }
946 951
947 /// <summary> 952 /// <summary>
@@ -955,7 +960,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
955 /// The method to call if the packet is not acked by the client. If null, then a standard 960 /// The method to call if the packet is not acked by the client. If null, then a standard
956 /// resend of the packet is done. 961 /// resend of the packet is done.
957 /// </param> 962 /// </param>
958 public void SendPacketData( 963 /// <returns>true if the data was sent immediately, false if it was queued for sending</returns>
964 public bool SendPacketData(
959 LLUDPClient udpClient, byte[] data, PacketType type, ThrottleOutPacketType category, UnackedPacketMethod method) 965 LLUDPClient udpClient, byte[] data, PacketType type, ThrottleOutPacketType category, UnackedPacketMethod method)
960 { 966 {
961 int dataLength = data.Length; 967 int dataLength = data.Length;
@@ -1020,7 +1026,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1020 // packet so that it isn't sent before a queued update packet. 1026 // packet so that it isn't sent before a queued update packet.
1021 bool requestQueue = type == PacketType.KillObject; 1027 bool requestQueue = type == PacketType.KillObject;
1022 if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, requestQueue)) 1028 if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, requestQueue))
1029 {
1023 SendPacketFinal(outgoingPacket); 1030 SendPacketFinal(outgoingPacket);
1031 return true;
1032 }
1033 else
1034 {
1035 return false;
1036 }
1024 1037
1025 #endregion Queue or Send 1038 #endregion Queue or Send
1026 } 1039 }
diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
index 0e79733..e77f0aa 100644
--- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
@@ -631,7 +631,22 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
631 cdl.AddRow("SculptType", s.SculptType); 631 cdl.AddRow("SculptType", s.SculptType);
632 cdl.AddRow("State", s.State); 632 cdl.AddRow("State", s.State);
633 633
634 // TODO, unpack and display texture entries 634 // TODO, need to display more information about textures but in a compact format
635 // to stop output becoming huge.
636 for (int i = 0; i < sop.GetNumberOfSides(); i++)
637 {
638 Primitive.TextureEntryFace teFace = s.Textures.FaceTextures[i];
639
640 UUID textureID;
641
642 if (teFace != null)
643 textureID = teFace.TextureID;
644 else
645 textureID = s.Textures.DefaultTexture.TextureID;
646
647 cdl.AddRow(string.Format("Face {0} texture ID", i), textureID);
648 }
649
635 //cdl.AddRow("Textures", string.Format("{0} entries", s.Textures. 650 //cdl.AddRow("Textures", string.Format("{0} entries", s.Textures.
636 } 651 }
637 652
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 998c19e..cddf818 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -244,25 +244,20 @@ namespace OpenSim.Region.Framework.Scenes
244 if (part.ParentGroup.RootPart.LocalId != part.LocalId) 244 if (part.ParentGroup.RootPart.LocalId != part.LocalId)
245 return; 245 return;
246 246
247 bool isAttachment = false;
248
249 // This is wrong, wrong, wrong. Selection should not be 247 // This is wrong, wrong, wrong. Selection should not be
250 // handled by group, but by prim. Legacy cruft. 248 // handled by group, but by prim. Legacy cruft.
251 // TODO: Make selection flagging per prim! 249 // TODO: Make selection flagging per prim!
252 // 250 //
253 part.ParentGroup.IsSelected = false; 251 part.ParentGroup.IsSelected = false;
254 252
255 if (part.ParentGroup.IsAttachment) 253 part.ParentGroup.ScheduleGroupForFullUpdate();
256 isAttachment = true;
257 else
258 part.ParentGroup.ScheduleGroupForFullUpdate();
259 254
260 // If it's not an attachment, and we are allowed to move it, 255 // If it's not an attachment, and we are allowed to move it,
261 // then we might have done so. If we moved across a parcel 256 // then we might have done so. If we moved across a parcel
262 // boundary, we will need to recount prims on the parcels. 257 // boundary, we will need to recount prims on the parcels.
263 // For attachments, that makes no sense. 258 // For attachments, that makes no sense.
264 // 259 //
265 if (!isAttachment) 260 if (!part.ParentGroup.IsAttachment)
266 { 261 {
267 if (Permissions.CanEditObject( 262 if (Permissions.CanEditObject(
268 part.UUID, remoteClient.AgentId) 263 part.UUID, remoteClient.AgentId)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b3e6b67..9e6c25d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2700,7 +2700,8 @@ namespace OpenSim.Region.Framework.Scenes
2700 return; 2700 return;
2701 2701
2702 // This was pulled from SceneViewer. Attachments always receive full updates. 2702 // This was pulled from SceneViewer. Attachments always receive full updates.
2703 // I could not verify if this is a requirement but this maintains existing behavior 2703 // This is needed because otherwise if only the root prim changes position, then
2704 // it looks as if the entire object has moved (including the other prims).
2704 if (ParentGroup.IsAttachment) 2705 if (ParentGroup.IsAttachment)
2705 { 2706 {
2706 ScheduleFullUpdate(); 2707 ScheduleFullUpdate();
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs
index f7dd158..be6f152 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs
@@ -249,7 +249,7 @@ public enum CollisionFlags : uint
249 BS_VEHICLE_COLLISIONS = 1 << 12, // return collisions for vehicle ground checking 249 BS_VEHICLE_COLLISIONS = 1 << 12, // return collisions for vehicle ground checking
250 BS_RETURN_ROOT_COMPOUND_SHAPE = 1 << 13, // return the pos/rot of the root shape in a compound shape 250 BS_RETURN_ROOT_COMPOUND_SHAPE = 1 << 13, // return the pos/rot of the root shape in a compound shape
251 BS_NONE = 0, 251 BS_NONE = 0,
252 BS_ALL = 0xFFFFFFFF 252 BS_ALL = 0x7FFF // collision flags are a signed short
253}; 253};
254 254
255// Values f collisions groups and masks 255// Values f collisions groups and masks
@@ -265,14 +265,14 @@ public enum CollisionFilterGroups : uint
265 BDebrisGroup = 1 << 3, // 0008 265 BDebrisGroup = 1 << 3, // 0008
266 BSensorTrigger = 1 << 4, // 0010 266 BSensorTrigger = 1 << 4, // 0010
267 BCharacterGroup = 1 << 5, // 0020 267 BCharacterGroup = 1 << 5, // 0020
268 BAllGroup = 0x000FFFFF, 268 BAllGroup = 0x0007FFF, // collision flags are a signed short
269 // Filter groups defined by BulletSim 269 // Filter groups defined by BulletSim
270 BGroundPlaneGroup = 1 << 10, // 0400 270 BGroundPlaneGroup = 1 << 8, // 0400
271 BTerrainGroup = 1 << 11, // 0800 271 BTerrainGroup = 1 << 9, // 0800
272 BRaycastGroup = 1 << 12, // 1000 272 BRaycastGroup = 1 << 10, // 1000
273 BSolidGroup = 1 << 13, // 2000 273 BSolidGroup = 1 << 11, // 2000
274 // BLinksetGroup = xx // a linkset proper is either static or dynamic 274 // BLinksetGroup = xx // a linkset proper is either static or dynamic
275 BLinksetChildGroup = 1 << 14, // 4000 275 BLinksetChildGroup = 1 << 12, // 4000
276}; 276};
277 277
278// CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0 278// CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
index 43aa63e..834228e 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
@@ -120,6 +120,7 @@ public static class BSParam
120 public static float NumberOfSolverIterations { get; private set; } 120 public static float NumberOfSolverIterations { get; private set; }
121 public static bool UseSingleSidedMeshes { get; private set; } 121 public static bool UseSingleSidedMeshes { get; private set; }
122 public static float GlobalContactBreakingThreshold { get; private set; } 122 public static float GlobalContactBreakingThreshold { get; private set; }
123 public static float PhysicsUnmanLoggingFrames { get; private set; }
123 124
124 // Avatar parameters 125 // Avatar parameters
125 public static float AvatarFriction { get; private set; } 126 public static float AvatarFriction { get; private set; }
@@ -671,6 +672,10 @@ public static class BSParam
671 0f, 672 0f,
672 (s) => { return GlobalContactBreakingThreshold; }, 673 (s) => { return GlobalContactBreakingThreshold; },
673 (s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ), 674 (s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ),
675 new ParameterDefn<float>("PhysicsUnmanLoggingFrames", "If non-zero, frames between output of detailed unmanaged physics statistics",
676 0f,
677 (s) => { return PhysicsUnmanLoggingFrames; },
678 (s,v) => { PhysicsUnmanLoggingFrames = v; s.UnmanagedParams[0].physicsLoggingFrames = v; } ),
674 679
675 new ParameterDefn<int>("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy", 680 new ParameterDefn<int>("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy",
676 7 ), 681 7 ),
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
index c7deb4e..8888d6d 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
@@ -112,15 +112,14 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys
112 m_physicsScene.PE.SetRestitution(m_mapInfo.terrainBody, BSParam.TerrainRestitution); 112 m_physicsScene.PE.SetRestitution(m_mapInfo.terrainBody, BSParam.TerrainRestitution);
113 m_physicsScene.PE.SetCollisionFlags(m_mapInfo.terrainBody, CollisionFlags.CF_STATIC_OBJECT); 113 m_physicsScene.PE.SetCollisionFlags(m_mapInfo.terrainBody, CollisionFlags.CF_STATIC_OBJECT);
114 114
115 m_mapInfo.terrainBody.collisionType = CollisionType.Terrain;
116
115 // Return the new terrain to the world of physical objects 117 // Return the new terrain to the world of physical objects
116 m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_mapInfo.terrainBody); 118 m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_mapInfo.terrainBody);
117 119
118 // redo its bounding box now that it is in the world 120 // redo its bounding box now that it is in the world
119 m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_mapInfo.terrainBody); 121 m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_mapInfo.terrainBody);
120 122
121 m_mapInfo.terrainBody.collisionType = CollisionType.Terrain;
122 m_mapInfo.terrainBody.ApplyCollisionMask(m_physicsScene);
123
124 // Make it so the terrain will not move or be considered for movement. 123 // Make it so the terrain will not move or be considered for movement.
125 m_physicsScene.PE.ForceActivationState(m_mapInfo.terrainBody, ActivationState.DISABLE_SIMULATION); 124 m_physicsScene.PE.ForceActivationState(m_mapInfo.terrainBody, ActivationState.DISABLE_SIMULATION);
126 125
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
index c016eed..441d2d3 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
@@ -138,13 +138,14 @@ public sealed class BSTerrainManager : IDisposable
138 m_groundPlane = m_physicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape, 138 m_groundPlane = m_physicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape,
139 BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity); 139 BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity);
140 140
141 // Everything collides with the ground plane.
142 m_groundPlane.collisionType = CollisionType.Groundplane;
143
141 m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_groundPlane); 144 m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_groundPlane);
142 m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_groundPlane); 145 m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_groundPlane);
146
143 // Ground plane does not move 147 // Ground plane does not move
144 m_physicsScene.PE.ForceActivationState(m_groundPlane, ActivationState.DISABLE_SIMULATION); 148 m_physicsScene.PE.ForceActivationState(m_groundPlane, ActivationState.DISABLE_SIMULATION);
145 // Everything collides with the ground plane.
146 m_groundPlane.collisionType = CollisionType.Groundplane;
147 m_groundPlane.ApplyCollisionMask(m_physicsScene);
148 149
149 BSTerrainPhys initialTerrain = new BSTerrainHeightmap(m_physicsScene, Vector3.Zero, BSScene.TERRAIN_ID, DefaultRegionSize); 150 BSTerrainPhys initialTerrain = new BSTerrainHeightmap(m_physicsScene, Vector3.Zero, BSScene.TERRAIN_ID, DefaultRegionSize);
150 lock (m_terrains) 151 lock (m_terrains)
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs
index d5060e3..971ff9f 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs
@@ -235,7 +235,8 @@ public static Dictionary<CollisionType, CollisionTypeFilterGroup> CollisionTypeM
235 { CollisionType.Groundplane, 235 { CollisionType.Groundplane,
236 new CollisionTypeFilterGroup(CollisionType.Groundplane, 236 new CollisionTypeFilterGroup(CollisionType.Groundplane,
237 (uint)CollisionFilterGroups.BGroundPlaneGroup, 237 (uint)CollisionFilterGroups.BGroundPlaneGroup,
238 (uint)CollisionFilterGroups.BAllGroup) 238 // (uint)CollisionFilterGroups.BAllGroup)
239 (uint)(CollisionFilterGroups.BCharacterGroup | CollisionFilterGroups.BSolidGroup))
239 }, 240 },
240 { CollisionType.Terrain, 241 { CollisionType.Terrain,
241 new CollisionTypeFilterGroup(CollisionType.Terrain, 242 new CollisionTypeFilterGroup(CollisionType.Terrain,
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e03cf17..61017b8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3325,7 +3325,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3325 } 3325 }
3326 3326
3327 emailModule.SendEmail(m_host.UUID, address, subject, message); 3327 emailModule.SendEmail(m_host.UUID, address, subject, message);
3328 llSleep(EMAIL_PAUSE_TIME); 3328 ScriptSleep(EMAIL_PAUSE_TIME * 1000);
3329 } 3329 }
3330 3330
3331 public void llGetNextEmail(string address, string subject) 3331 public void llGetNextEmail(string address, string subject)