diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
index bb4c7885f5..bfe1e8dc33 100644
--- a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
+++ b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
@@ -26,12 +26,12 @@
*/
using System;
+using System.Reflection;
using OpenMetaverse;
namespace OpenSim.Region.Framework.Interfaces
{
public delegate void ScriptCommand(UUID script, string id, string module, string command, string k);
- public delegate object ScriptInvocation(UUID script, object[] parms);
///
/// Interface for communication between OpenSim modules and in-world scripts
@@ -46,14 +46,17 @@ namespace OpenSim.Region.Framework.Interfaces
///
event ScriptCommand OnScriptCommand;
- void RegisterScriptInvocation(string name, ScriptInvocation fn, Type[] csig, Type rsig);
+ void RegisterScriptInvocation(object target, string method);
+ void RegisterScriptInvocation(object target, MethodInfo method);
+ void RegisterScriptInvocation(object target, string[] methods);
+ Delegate[] GetScriptInvocationList();
- ScriptInvocation LookupScriptInvocation(string fname);
+ Delegate LookupScriptInvocation(string fname);
string LookupModInvocation(string fname);
Type[] LookupTypeSignature(string fname);
Type LookupReturnType(string fname);
- object InvokeOperation(UUID scriptId, string fname, params object[] parms);
+ object InvokeOperation(UUID hostId, UUID scriptId, string fname, params object[] parms);
///
/// Send a link_message event to an in-world script
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
index a90362e974..cab30dec25 100644
--- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
@@ -35,6 +35,8 @@ using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using Mono.Addins;
using OpenMetaverse;
+using System.Linq;
+using System.Linq.Expressions;
namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
{
@@ -47,15 +49,15 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
#region ScriptInvocation
protected class ScriptInvocationData
{
- public ScriptInvocation ScriptInvocationFn { get; private set; }
+ public Delegate ScriptInvocationDelegate { get; private set; }
public string FunctionName { get; private set; }
public Type[] TypeSignature { get; private set; }
public Type ReturnType { get; private set; }
- public ScriptInvocationData(string fname, ScriptInvocation fn, Type[] callsig, Type returnsig)
+ public ScriptInvocationData(string fname, Delegate fn, Type[] callsig, Type returnsig)
{
FunctionName = fname;
- ScriptInvocationFn = fn;
+ ScriptInvocationDelegate = fn;
TypeSignature = callsig;
ReturnType = returnsig;
}
@@ -126,14 +128,72 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
m_scriptModule.PostScriptEvent(script, "link_message", args);
}
- public void RegisterScriptInvocation(string fname, ScriptInvocation fcall, Type[] csig, Type rsig)
+ public void RegisterScriptInvocation(object target, string meth)
{
+ MethodInfo mi = target.GetType().GetMethod(meth,
+ BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
+ if (mi == null)
+ {
+ m_log.WarnFormat("[MODULE COMMANDS] Failed to register method {0}",meth);
+ return;
+ }
+
+ RegisterScriptInvocation(target, mi);
+ }
+
+ public void RegisterScriptInvocation(object target, string[] meth)
+ {
+ foreach (string m in meth)
+ RegisterScriptInvocation(target, m);
+ }
+
+ public void RegisterScriptInvocation(object target, MethodInfo mi)
+ {
+ m_log.DebugFormat("[MODULE COMMANDS] Register method {0} from type {1}", mi.Name, target.GetType().Name);
+
+ Type delegateType;
+ var typeArgs = mi.GetParameters()
+ .Select(p => p.ParameterType)
+ .ToList();
+
+ if (mi.ReturnType == typeof(void))
+ {
+ delegateType = Expression.GetActionType(typeArgs.ToArray());
+ }
+ else
+ {
+ typeArgs.Add(mi.ReturnType);
+ delegateType = Expression.GetFuncType(typeArgs.ToArray());
+ }
+
+ Delegate fcall = Delegate.CreateDelegate(delegateType, target, mi);
+
lock (m_scriptInvocation)
{
- m_scriptInvocation[fname] = new ScriptInvocationData(fname,fcall,csig,rsig);
+ ParameterInfo[] parameters = fcall.Method.GetParameters ();
+ if (parameters.Length < 2) // Must have two UUID params
+ return;
+
+ // Hide the first two parameters
+ Type[] parmTypes = new Type[parameters.Length - 2];
+ for (int i = 2 ; i < parameters.Length ; i++)
+ parmTypes[i - 2] = parameters[i].ParameterType;
+ m_scriptInvocation[fcall.Method.Name] = new ScriptInvocationData(fcall.Method.Name, fcall, parmTypes, fcall.Method.ReturnType);
}
}
+ public Delegate[] GetScriptInvocationList()
+ {
+ List ret = new List();
+
+ lock (m_scriptInvocation)
+ {
+ foreach (ScriptInvocationData d in m_scriptInvocation.Values)
+ ret.Add(d.ScriptInvocationDelegate);
+ }
+ return ret.ToArray();
+ }
+
public string LookupModInvocation(string fname)
{
lock (m_scriptInvocation)
@@ -147,19 +207,29 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
return "modInvokeI";
else if (sid.ReturnType == typeof(float))
return "modInvokeF";
+ else if (sid.ReturnType == typeof(UUID))
+ return "modInvokeK";
+ else if (sid.ReturnType == typeof(OpenMetaverse.Vector3))
+ return "modInvokeV";
+ else if (sid.ReturnType == typeof(OpenMetaverse.Quaternion))
+ return "modInvokeR";
+ else if (sid.ReturnType == typeof(object[]))
+ return "modInvokeL";
+
+ m_log.WarnFormat("[MODULE COMMANDS] failed to find match for {0} with return type {1}",fname,sid.ReturnType.Name);
}
}
return null;
}
- public ScriptInvocation LookupScriptInvocation(string fname)
+ public Delegate LookupScriptInvocation(string fname)
{
lock (m_scriptInvocation)
{
ScriptInvocationData sid;
if (m_scriptInvocation.TryGetValue(fname,out sid))
- return sid.ScriptInvocationFn;
+ return sid.ScriptInvocationDelegate;
}
return null;
@@ -189,10 +259,15 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
return null;
}
- public object InvokeOperation(UUID scriptid, string fname, params object[] parms)
+ public object InvokeOperation(UUID hostid, UUID scriptid, string fname, params object[] parms)
{
- ScriptInvocation fn = LookupScriptInvocation(fname);
- return fn(scriptid,parms);
+ List
/// The name of the function to invoke
- /// List of parameters
+ /// List of parameters
/// string result of the invocation
- public string modInvokeS(string fname, params object[] parms)
+ public void modInvokeN(string fname, params object[] parms)
{
Type returntype = m_comms.LookupReturnType(fname);
if (returntype != typeof(string))
MODError(String.Format("return type mismatch for {0}",fname));
- return (string)modInvoke(fname,parms);
+ modInvoke(fname,parms);
}
- public int modInvokeI(string fname, params object[] parms)
+ public LSL_String modInvokeS(string fname, params object[] parms)
+ {
+ Type returntype = m_comms.LookupReturnType(fname);
+ if (returntype != typeof(string))
+ MODError(String.Format("return type mismatch for {0}",fname));
+
+ string result = (string)modInvoke(fname,parms);
+ return new LSL_String(result);
+ }
+
+ public LSL_Integer modInvokeI(string fname, params object[] parms)
{
Type returntype = m_comms.LookupReturnType(fname);
if (returntype != typeof(int))
MODError(String.Format("return type mismatch for {0}",fname));
- return (int)modInvoke(fname,parms);
+ int result = (int)modInvoke(fname,parms);
+ return new LSL_Integer(result);
}
- public float modInvokeF(string fname, params object[] parms)
+ public LSL_Float modInvokeF(string fname, params object[] parms)
{
Type returntype = m_comms.LookupReturnType(fname);
if (returntype != typeof(float))
MODError(String.Format("return type mismatch for {0}",fname));
- return (float)modInvoke(fname,parms);
+ float result = (float)modInvoke(fname,parms);
+ return new LSL_Float(result);
+ }
+
+ public LSL_Key modInvokeK(string fname, params object[] parms)
+ {
+ Type returntype = m_comms.LookupReturnType(fname);
+ if (returntype != typeof(UUID))
+ MODError(String.Format("return type mismatch for {0}",fname));
+
+ UUID result = (UUID)modInvoke(fname,parms);
+ return new LSL_Key(result.ToString());
+ }
+
+ public LSL_Vector modInvokeV(string fname, params object[] parms)
+ {
+ Type returntype = m_comms.LookupReturnType(fname);
+ if (returntype != typeof(OpenMetaverse.Vector3))
+ MODError(String.Format("return type mismatch for {0}",fname));
+
+ OpenMetaverse.Vector3 result = (OpenMetaverse.Vector3)modInvoke(fname,parms);
+ return new LSL_Vector(result.X,result.Y,result.Z);
+ }
+
+ public LSL_Rotation modInvokeR(string fname, params object[] parms)
+ {
+ Type returntype = m_comms.LookupReturnType(fname);
+ if (returntype != typeof(OpenMetaverse.Quaternion))
+ MODError(String.Format("return type mismatch for {0}",fname));
+
+ OpenMetaverse.Quaternion result = (OpenMetaverse.Quaternion)modInvoke(fname,parms);
+ return new LSL_Rotation(result.X,result.Y,result.Z,result.W);
+ }
+
+ public LSL_List modInvokeL(string fname, params object[] parms)
+ {
+ Type returntype = m_comms.LookupReturnType(fname);
+ if (returntype != typeof(object[]))
+ MODError(String.Format("return type mismatch for {0}",fname));
+
+ object[] result = (object[])modInvoke(fname,parms);
+ object[] llist = new object[result.Length];
+ for (int i = 0; i < result.Length; i++)
+ {
+ if (result[i] is string)
+ llist[i] = new LSL_String((string)result[i]);
+ else if (result[i] is int)
+ llist[i] = new LSL_Integer((int)result[i]);
+ else if (result[i] is float)
+ llist[i] = new LSL_Float((float)result[i]);
+ else if (result[i] is OpenMetaverse.Vector3)
+ {
+ OpenMetaverse.Vector3 vresult = (OpenMetaverse.Vector3)result[i];
+ llist[i] = new LSL_Vector(vresult.X,vresult.Y,vresult.Z);
+ }
+ else if (result[i] is OpenMetaverse.Quaternion)
+ {
+ OpenMetaverse.Quaternion qresult = (OpenMetaverse.Quaternion)result[i];
+ llist[i] = new LSL_Rotation(qresult.X,qresult.Y,qresult.Z,qresult.W);
+ }
+ else
+ {
+ MODError(String.Format("unknown list element returned by {0}",fname));
+ }
+ }
+
+ return new LSL_List(llist);
}
///
@@ -168,63 +245,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
MODError(String.Format("wrong number of parameters to function {0}",fname));
object[] convertedParms = new object[parms.Length];
-
for (int i = 0; i < parms.Length; i++)
+ convertedParms[i] = ConvertFromLSL(parms[i],signature[i]);
+
+ // now call the function, the contract with the function is that it will always return
+ // non-null but don't trust it completely
+ try
{
- if (parms[i] is LSL_String)
- {
- if (signature[i] != typeof(string))
- MODError(String.Format("parameter type mismatch in {0}; expecting {1}",fname,signature[i].Name));
+ object result = m_comms.InvokeOperation(m_host.UUID, m_itemID, fname, convertedParms);
+ if (result != null)
+ return result;
- convertedParms[i] = (string)(LSL_String)parms[i];
- }
- else if (parms[i] is LSL_Integer)
- {
- if (signature[i] != typeof(int))
- MODError(String.Format("parameter type mismatch in {0}; expecting {1}",fname,signature[i].Name));
-
- convertedParms[i] = (int)(LSL_Integer)parms[i];
- }
- else if (parms[i] is LSL_Float)
- {
- if (signature[i] != typeof(float))
- MODError(String.Format("parameter type mismatch in {0}; expecting {1}",fname,signature[i].Name));
-
- convertedParms[i] = (float)(LSL_Float)parms[i];
- }
- else if (parms[i] is LSL_Key)
- {
- if (signature[i] != typeof(string))
- MODError(String.Format("parameter type mismatch in {0}; expecting {1}",fname,signature[i].Name));
-
- convertedParms[i] = (string)(LSL_Key)parms[i];
- }
- else if (parms[i] is LSL_Rotation)
- {
- if (signature[i] != typeof(string))
- MODError(String.Format("parameter type mismatch in {0}; expecting {1}",fname,signature[i].Name));
-
- convertedParms[i] = (string)(LSL_Rotation)parms[i];
- }
- else if (parms[i] is LSL_Vector)
- {
- if (signature[i] != typeof(string))
- MODError(String.Format("parameter type mismatch in {0}; expecting {1}",fname,signature[i].Name));
-
- convertedParms[i] = (string)(LSL_Vector)parms[i];
- }
- else
- {
- if (signature[i] != parms[i].GetType())
- MODError(String.Format("parameter type mismatch in {0}; expecting {1}",fname,signature[i].Name));
-
- convertedParms[i] = parms[i];
- }
+ MODError(String.Format("Invocation of {0} failed; null return value",fname));
+ }
+ catch (Exception e)
+ {
+ MODError(String.Format("Invocation of {0} failed; {1}",fname,e.Message));
}
- return m_comms.InvokeOperation(m_itemID,fname,convertedParms);
+ return null;
}
+ ///
+ /// Send a command to functions registered on an event
+ ///
public string modSendCommand(string module, string command, string k)
{
if (!m_MODFunctionsEnabled)
@@ -239,5 +283,101 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return req.ToString();
}
+
+ ///
+ ///
+ protected object ConvertFromLSL(object lslparm, Type type)
+ {
+ // ---------- String ----------
+ if (lslparm is LSL_String)
+ {
+ if (type == typeof(string))
+ return (string)(LSL_String)lslparm;
+
+ // Need to check for UUID since keys are often treated as strings
+ if (type == typeof(UUID))
+ return new UUID((string)(LSL_String)lslparm);
+ }
+
+ // ---------- Integer ----------
+ else if (lslparm is LSL_Integer)
+ {
+ if (type == typeof(int))
+ return (int)(LSL_Integer)lslparm;
+ }
+
+ // ---------- Float ----------
+ else if (lslparm is LSL_Float)
+ {
+ if (type == typeof(float))
+ return (float)(LSL_Float)lslparm;
+ }
+
+ // ---------- Key ----------
+ else if (lslparm is LSL_Key)
+ {
+ if (type == typeof(UUID))
+ return new UUID((LSL_Key)lslparm);
+ }
+
+ // ---------- Rotation ----------
+ else if (lslparm is LSL_Rotation)
+ {
+ if (type == typeof(OpenMetaverse.Quaternion))
+ {
+ LSL_Rotation rot = (LSL_Rotation)lslparm;
+ return new OpenMetaverse.Quaternion((float)rot.x,(float)rot.y,(float)rot.z,(float)rot.s);
+ }
+ }
+
+ // ---------- Vector ----------
+ else if (lslparm is LSL_Vector)
+ {
+ if (type == typeof(OpenMetaverse.Vector3))
+ {
+ LSL_Vector vect = (LSL_Vector)lslparm;
+ return new OpenMetaverse.Vector3((float)vect.x,(float)vect.y,(float)vect.z);
+ }
+ }
+
+ // ---------- List ----------
+ else if (lslparm is LSL_List)
+ {
+ if (type == typeof(object[]))
+ {
+ object[] plist = (lslparm as LSL_List).Data;
+ object[] result = new object[plist.Length];
+ for (int i = 0; i < plist.Length; i++)
+ {
+ if (plist[i] is LSL_String)
+ result[i] = (string)(LSL_String)plist[i];
+ else if (plist[i] is LSL_Integer)
+ result[i] = (int)(LSL_Integer)plist[i];
+ else if (plist[i] is LSL_Float)
+ result[i] = (float)(LSL_Float)plist[i];
+ else if (plist[i] is LSL_Key)
+ result[i] = new UUID((LSL_Key)plist[i]);
+ else if (plist[i] is LSL_Rotation)
+ {
+ LSL_Rotation rot = (LSL_Rotation)plist[i];
+ result[i] = new OpenMetaverse.Quaternion((float)rot.x,(float)rot.y,(float)rot.z,(float)rot.s);
+ }
+ else if (plist[i] is LSL_Vector)
+ {
+ LSL_Vector vect = (LSL_Vector)plist[i];
+ result[i] = new OpenMetaverse.Vector3((float)vect.x,(float)vect.y,(float)vect.z);
+ }
+ else
+ MODError("unknown LSL list element type");
+ }
+
+ return result;
+ }
+ }
+
+ MODError(String.Format("parameter type mismatch; expecting {0}",type.Name));
+ return null;
+ }
+
}
}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs
index 756a59f3e7..aa78aaa6bb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs
@@ -28,26 +28,27 @@
using System.Collections;
using OpenSim.Region.ScriptEngine.Interfaces;
-using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
-using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
-using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
-using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
-using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
-using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
+using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
+using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
+using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
+using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
+using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
+using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
{
public interface IMOD_Api
{
// Invocation functions
- string modInvokeS(string fname, params object[] parms);
- int modInvokeI(string fname, params object[] parms);
- float modInvokeF(string fname, params object[] parms);
- // vector modInvokeV(string fname, params object[] parms);
- // rotation modInvokeV(string fname, params object[] parms);
- // key modInvokeK(string fname, params object[] parms);
- // list modInvokeL(string fname, params object[] parms);
+ void modInvokeN(string fname, params object[] parms);
+ LSL_String modInvokeS(string fname, params object[] parms);
+ LSL_Integer modInvokeI(string fname, params object[] parms);
+ LSL_Float modInvokeF(string fname, params object[] parms);
+ LSL_Key modInvokeK(string fname, params object[] parms);
+ LSL_Vector modInvokeV(string fname, params object[] parms);
+ LSL_Rotation modInvokeR(string fname, params object[] parms);
+ LSL_List modInvokeL(string fname, params object[] parms);
//Module functions
string modSendCommand(string modules, string command, string k);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/MOD_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/MOD_Stub.cs
index 04b7f14b4e..1c47138922 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/MOD_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/MOD_Stub.cs
@@ -39,10 +39,14 @@ using integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
-using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
-using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
+
using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
+using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
+using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
+using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
+using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
+using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{
@@ -58,21 +62,46 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
m_MOD_Functions = (IMOD_Api)api;
}
- public string modInvokeS(string fname, params object[] parms)
+ public void modInvokeN(string fname, params object[] parms)
+ {
+ m_MOD_Functions.modInvokeN(fname, parms);
+ }
+
+ public LSL_String modInvokeS(string fname, params object[] parms)
{
return m_MOD_Functions.modInvokeS(fname, parms);
}
- public int modInvokeI(string fname, params object[] parms)
+ public LSL_Integer modInvokeI(string fname, params object[] parms)
{
return m_MOD_Functions.modInvokeI(fname, parms);
}
- public float modInvokeF(string fname, params object[] parms)
+ public LSL_Float modInvokeF(string fname, params object[] parms)
{
return m_MOD_Functions.modInvokeF(fname, parms);
}
+ public LSL_Key modInvokeK(string fname, params object[] parms)
+ {
+ return m_MOD_Functions.modInvokeK(fname, parms);
+ }
+
+ public LSL_Vector modInvokeV(string fname, params object[] parms)
+ {
+ return m_MOD_Functions.modInvokeV(fname, parms);
+ }
+
+ public LSL_Rotation modInvokeR(string fname, params object[] parms)
+ {
+ return m_MOD_Functions.modInvokeR(fname, parms);
+ }
+
+ public LSL_List modInvokeL(string fname, params object[] parms)
+ {
+ return m_MOD_Functions.modInvokeL(fname, parms);
+ }
+
public string modSendCommand(string module, string command, string k)
{
return m_MOD_Functions.modSendCommand(module, command, k);
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 6986046a26..28c5587ad7 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -846,10 +846,12 @@
TerrainFriction = 0.50
TerrainHitFriction = 0.8
TerrainRestitution = 0
- AvatarFriction = 0
+ AvatarFriction = 0.2
+ AvatarRestitution = 0.0
AvatarDensity = 60.0
AvatarCapsuleRadius = 0.37
AvatarCapsuleHeight = 1.5
+ AvatarContactProcessingThreshold = 0.1;
MaxObjectMass = 10000.01
@@ -862,6 +864,15 @@
CcdMotionThreshold = 0.0
CcdSweptSphereRadius = 0.0
ContactProcessingThreshold = 0.1
+ ; If setting a pool size, also disable dynamic allocation (default pool size is 4096 with dynamic alloc)
+ MaxPersistantManifoldPoolSize = 0;
+ ShouldDisableContactPoolDynamicAllocation = False;
+ ShouldForceUpdateAllAabbs = False;
+ ShouldRandomizeSolverOrder = False;
+ ShouldSplitSimulationIslands = False;
+ ShouldEnableFrictionCaching = False;
+ NumberOfSolverIterations = 0;
+
; Whether to mesh sculpties
MeshSculptedPrim = true
diff --git a/bin/lib32/BulletSim.dll b/bin/lib32/BulletSim.dll
index d1571cf751..5bef6e9a22 100755
Binary files a/bin/lib32/BulletSim.dll and b/bin/lib32/BulletSim.dll differ
diff --git a/bin/lib32/libBulletSim.so b/bin/lib32/libBulletSim.so
new file mode 100755
index 0000000000..9882f5b8b1
Binary files /dev/null and b/bin/lib32/libBulletSim.so differ
diff --git a/bin/lib64/BulletSim.dll b/bin/lib64/BulletSim.dll
index ec21dfedcf..9f09ef8bf5 100755
Binary files a/bin/lib64/BulletSim.dll and b/bin/lib64/BulletSim.dll differ
diff --git a/bin/lib64/libBulletSim.so b/bin/lib64/libBulletSim.so
new file mode 100755
index 0000000000..fa47bf1830
Binary files /dev/null and b/bin/lib64/libBulletSim.so differ