Formatting cleanup.
parent
e25818d832
commit
65c5efe43b
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ using System.Reflection;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Region.Examples.SimpleModule")]
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Region.Modules.AvatarFactory")]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Python")]
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SvnSerialiser")]
|
||||
|
|
|
@ -51,7 +51,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
private CollisionLocker ode;
|
||||
private OdeScene _mScene;
|
||||
|
||||
|
||||
public OdePlugin()
|
||||
{
|
||||
ode = new CollisionLocker();
|
||||
|
@ -81,7 +80,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public enum StatusIndicators : int
|
||||
{
|
||||
Generic = 0,
|
||||
|
@ -89,7 +87,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
End = 2
|
||||
}
|
||||
|
||||
|
||||
public struct sCollisionData
|
||||
{
|
||||
public uint ColliderLocalId;
|
||||
|
@ -165,7 +162,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
private float mAvatarObjectContactFriction = 75f;
|
||||
private float mAvatarObjectContactBounce = 0.1f;
|
||||
|
||||
|
||||
private float avPIDD = 3200f;
|
||||
private float avPIDP = 1400f;
|
||||
private float avCapRadius = 0.37f;
|
||||
|
@ -175,7 +171,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
private float avMovementDivisorWalk = 1.3f;
|
||||
private float avMovementDivisorRun = 0.8f;
|
||||
|
||||
|
||||
private float[] _heightmap;
|
||||
|
||||
private float[] _watermap;
|
||||
|
@ -200,7 +195,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
private d.Contact AvatarMovementTerrainContact;
|
||||
private d.Contact WaterContact;
|
||||
|
||||
|
||||
//Ckrinke: Comment out until used. We declare it, initialize it, but do not use it
|
||||
//Ckrinke private int m_randomizeWater = 200;
|
||||
private int m_physicsiterations = 10;
|
||||
|
@ -233,7 +227,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
private IConfigSource m_config;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Initiailizes the scene
|
||||
/// Sets many properties that ODE requires to be stable
|
||||
|
@ -246,24 +239,16 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
triCallback = TriCallback;
|
||||
triArrayCallback = TriArrayCallback;
|
||||
|
||||
|
||||
|
||||
|
||||
lock (OdeLock)
|
||||
{
|
||||
|
||||
// Creat the world and the first space
|
||||
// Create the world and the first space
|
||||
world = d.WorldCreate();
|
||||
space = d.HashSpaceCreate(IntPtr.Zero);
|
||||
|
||||
contactgroup = d.JointGroupCreate(0);
|
||||
//contactgroup
|
||||
|
||||
|
||||
|
||||
|
||||
d.WorldSetAutoDisableFlag(world, false);
|
||||
|
||||
}
|
||||
|
||||
// zero out a heightmap array float array (single dimention [flattened]))
|
||||
|
@ -272,10 +257,8 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
// Zero out the prim spaces array (we split our space into smaller spaces so
|
||||
// we can hit test less.
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Initialize the mesh plugin
|
||||
public override void Initialise(IMesher meshmerizer, IConfigSource config)
|
||||
{
|
||||
|
@ -349,10 +332,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
avPIDP = physicsconfig.GetFloat("av_pid_proportional_win", 900.0f);
|
||||
avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_win", 550000f);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)];
|
||||
|
@ -409,7 +389,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
staticPrimspace[i, j] = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal void waitForSpaceUnlock(IntPtr space)
|
||||
|
@ -440,7 +419,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
{
|
||||
// no lock here! It's invoked from within Simulate(), which is thread-locked
|
||||
|
||||
// Test if we're collidng a geom with a space.
|
||||
// Test if we're colliding a geom with a space.
|
||||
// If so we have to drill down into the space recursively
|
||||
|
||||
if (d.GeomIsSpace(g1) || d.GeomIsSpace(g2))
|
||||
|
@ -468,7 +447,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
if (g1 == (IntPtr)0 || g2 == (IntPtr)0)
|
||||
return;
|
||||
|
||||
|
@ -499,13 +477,9 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
int count = 0;
|
||||
try
|
||||
{
|
||||
|
||||
// Colliding Geom To Geom
|
||||
// This portion of the function 'was' blatantly ripped off from BoxStack.cs
|
||||
|
||||
|
||||
|
||||
|
||||
if (g1 == g2)
|
||||
return; // Can't collide with yourself
|
||||
|
||||
|
@ -514,8 +488,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
lock (contacts)
|
||||
{
|
||||
|
||||
|
||||
count = d.Collide(g1, g2, contacts.GetLength(0), contacts, d.ContactGeom.SizeOf);
|
||||
}
|
||||
}
|
||||
|
@ -539,6 +511,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
{
|
||||
p1 = PANull;
|
||||
}
|
||||
|
||||
if (!actor_name_map.TryGetValue(g2, out p2))
|
||||
{
|
||||
p2 = PANull;
|
||||
|
@ -554,15 +527,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
// If we're colliding with terrain, use 'TerrainContact' instead of contact.
|
||||
// allows us to have different settings
|
||||
|
||||
|
||||
|
||||
// We only need to test p2 for 'jump crouch purposes'
|
||||
p2.IsColliding = true;
|
||||
|
||||
//if ((framecount % m_returncollisions) == 0)
|
||||
|
||||
|
||||
|
||||
switch (p1.PhysicsActorType)
|
||||
{
|
||||
case (int)ActorTypes.Agent:
|
||||
|
@ -600,8 +569,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
(p1.PhysicsActorType == (int) ActorTypes.Agent &&
|
||||
p2.PhysicsActorType == (int) ActorTypes.Prim))
|
||||
{
|
||||
|
||||
|
||||
# region disabled code1
|
||||
//contacts[i].depth = contacts[i].depth * 4.15f;
|
||||
/*
|
||||
|
@ -637,10 +604,8 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
*/
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
|
||||
// If you interpenetrate a prim with another prim
|
||||
if (p1.PhysicsActorType == (int) ActorTypes.Prim && p2.PhysicsActorType == (int) ActorTypes.Prim)
|
||||
{
|
||||
|
@ -650,7 +615,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
//op1.m_collisionscore++;
|
||||
//op2.m_collisionscore++;
|
||||
|
||||
|
||||
//if (op1.m_collisionscore > 8000 || op2.m_collisionscore > 8000)
|
||||
//{
|
||||
//op1.m_taintdisable = true;
|
||||
|
@ -663,7 +627,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
//{
|
||||
// Don't collide, one or both prim will expld.
|
||||
|
||||
|
||||
//op1.m_interpenetrationcount++;
|
||||
//op2.m_interpenetrationcount++;
|
||||
//interpenetrations_before_disable = 200;
|
||||
|
@ -678,7 +641,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
//AddPhysicsActorTaint(p2);
|
||||
//}
|
||||
|
||||
|
||||
//contacts[i].depth = contacts[i].depth / 8f;
|
||||
//contacts[i].normal = new d.Vector3(0, 0, 1);
|
||||
//}
|
||||
|
@ -689,6 +651,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
//}
|
||||
#endregion
|
||||
}
|
||||
|
||||
if (contacts[i].depth >= 1.00f)
|
||||
{
|
||||
//m_log.Info("[P]: " + contacts[i].depth.ToString());
|
||||
|
@ -713,6 +676,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
else
|
||||
{
|
||||
}
|
||||
|
||||
if (p1.PhysicsActorType == (int) ActorTypes.Agent)
|
||||
{
|
||||
OdeCharacter character = (OdeCharacter)p1;
|
||||
|
@ -738,7 +702,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
if (contacts[i].depth >= 0f)
|
||||
{
|
||||
// If we're collidng against terrain
|
||||
// If we're colliding against terrain
|
||||
if (name1 == "Terrain" || name2 == "Terrain")
|
||||
{
|
||||
// If we're moving
|
||||
|
@ -760,12 +724,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
{
|
||||
if ((p2.PhysicsActorType == (int)ActorTypes.Prim))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//WaterContact.surface.soft_cfm = 0.0000f;
|
||||
//WaterContact.surface.soft_erp = 0.00000f;
|
||||
if (contacts[i].depth > 0.1f)
|
||||
|
@ -814,7 +777,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
//System.Console.WriteLine(count.ToString());
|
||||
//System.Console.WriteLine("near: A collision was detected between {1} and {2}", 0, name1, name2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void collision_accounting_events(PhysicsActor p1, PhysicsActor p2, float collisiondepth)
|
||||
|
@ -870,8 +832,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
cc2.AddCollisionEvent(obj2LocalID, collisiondepth);
|
||||
break;
|
||||
case ActorTypes.Prim:
|
||||
|
@ -1030,14 +990,10 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
lock (_activeprims)
|
||||
{
|
||||
|
||||
foreach (OdePrim chr in _activeprims)
|
||||
{
|
||||
|
||||
if (d.BodyIsEnabled(chr.Body) && (!chr.m_disabled))
|
||||
{
|
||||
try
|
||||
|
@ -1049,18 +1005,14 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
else
|
||||
m_log.Debug("[PHYSICS]: unable to collide test active prim against space. The space was zero, the geom was zero or it was in the process of being removed");
|
||||
}
|
||||
|
||||
}
|
||||
catch (AccessViolationException)
|
||||
{
|
||||
m_log.Warn("[PHYSICS]: Unable to space collide");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -1077,7 +1029,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
{
|
||||
if (!_collisionEventPrim.Contains(obj))
|
||||
_collisionEventPrim.Add(obj);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1090,7 +1041,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#region Add/Remove Entities
|
||||
|
||||
public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size)
|
||||
|
@ -1131,8 +1081,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
rot.y = rotation.y;
|
||||
rot.z = rotation.z;
|
||||
|
||||
|
||||
|
||||
OdePrim newPrim;
|
||||
lock (OdeLock)
|
||||
{
|
||||
|
@ -1141,7 +1089,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
_prims.Add(newPrim);
|
||||
}
|
||||
|
||||
|
||||
return newPrim;
|
||||
}
|
||||
|
||||
|
@ -1178,11 +1125,9 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public void remActivePrim(OdePrim deactivatePrim)
|
||||
{
|
||||
lock (_activeprims)
|
||||
|
@ -1226,7 +1171,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
{
|
||||
prim.ResetTaints();
|
||||
|
||||
|
||||
if (prim.IsPhysical)
|
||||
{
|
||||
prim.disableBody();
|
||||
|
@ -1267,7 +1211,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
{
|
||||
m_log.Warn("[PHYSICS]: Unable to remove prim from physics scene");
|
||||
}
|
||||
|
||||
}
|
||||
catch (AccessViolationException)
|
||||
{
|
||||
|
@ -1297,8 +1240,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
//}
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1337,7 +1278,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
/// <returns>a pointer to the new space it's in</returns>
|
||||
public IntPtr recalculateSpaceForGeom(IntPtr geom, PhysicsVector pos, IntPtr currentspace)
|
||||
{
|
||||
|
||||
// Called from setting the Position and Size of an ODEPrim so
|
||||
// it's already in locked space.
|
||||
|
||||
|
@ -1418,7 +1358,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
{
|
||||
if (d.SpaceQuery(currentspace, geom))
|
||||
{
|
||||
|
||||
if (d.GeomIsSpace(currentspace))
|
||||
{
|
||||
waitForSpaceUnlock(currentspace);
|
||||
|
@ -1523,14 +1462,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
if (returnint[1] < 0)
|
||||
returnint[1] = 0;
|
||||
|
||||
|
||||
return returnint;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Routine to figure out if we need to mesh this prim with our mesher
|
||||
/// </summary>
|
||||
|
@ -1564,7 +1500,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Called after our prim properties are set Scale, position etc.
|
||||
/// We use this event queue like method to keep changes to the physical scene occuring in the threadlocked mutex
|
||||
|
@ -1610,7 +1545,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
// skip a few frames to catch up gracefully.
|
||||
// without shooting the physicsactors all over the place
|
||||
|
||||
|
||||
if (step_time >= m_SkipFramesAtms)
|
||||
{
|
||||
// Instead of trying to catch up, it'll do 5 physics frames only
|
||||
|
@ -1661,7 +1595,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
bool processedtaints = false;
|
||||
|
||||
lock (_taintedPrim)
|
||||
|
@ -1682,7 +1615,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
if (processedtaints)
|
||||
_taintedPrim = new List<OdePrim>();
|
||||
|
||||
}
|
||||
|
||||
lock (_activeprims)
|
||||
|
@ -1697,7 +1629,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
//if ((framecount % m_randomizeWater) == 0)
|
||||
// randomizeWater(waterlevel);
|
||||
|
||||
|
||||
collision_optimized(timeStep);
|
||||
|
||||
lock (_collisionEventPrim)
|
||||
|
@ -1718,7 +1649,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
pobj.SendCollisions();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1765,7 +1695,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return fps;
|
||||
}
|
||||
|
@ -1893,6 +1822,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
return returnarr;
|
||||
}
|
||||
|
||||
public float[] ResizeTerrain512Interpolation(float[] heightMap)
|
||||
{
|
||||
float[] returnarr = new float[262144];
|
||||
|
@ -2139,7 +2069,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
// m_log.Info((baseheight - 0.1f) + ((float)fluidRandomizer.Next(1, 9) / 10f));
|
||||
}
|
||||
|
||||
|
||||
lock (OdeLock)
|
||||
{
|
||||
if (!(WaterGeom == (IntPtr)0))
|
||||
|
@ -2183,7 +2112,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
{
|
||||
lock (OdeLock)
|
||||
{
|
||||
|
||||
foreach (OdePrim prm in _prims)
|
||||
{
|
||||
RemovePrim(prm);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -32,18 +32,14 @@ using System.Text.RegularExpressions;
|
|||
|
||||
namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||
{
|
||||
|
||||
public class LSL2CSConverter
|
||||
{
|
||||
|
||||
|
||||
// Uses regex to convert LSL code to C# code.
|
||||
|
||||
//private Regex rnw = new Regex(@"[a-zA-Z0-9_\-]", RegexOptions.Compiled);
|
||||
private Dictionary<string, string> dataTypes = new Dictionary<string, string>();
|
||||
private Dictionary<string, string> quotes = new Dictionary<string, string>();
|
||||
|
||||
|
||||
public LSL2CSConverter()
|
||||
{
|
||||
// Only the types we need to convert
|
||||
|
@ -72,7 +68,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
|||
Script = Regex.Replace(Script, @"\r\n", "\n");
|
||||
Script = Regex.Replace(Script, @"\n", "\r\n");
|
||||
|
||||
|
||||
// QUOTE REPLACEMENT
|
||||
// temporarily replace quotes so we can work our magic on the script without
|
||||
// always considering if we are inside our outside quotes's
|
||||
|
@ -86,21 +81,16 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
|||
bool last_was_escape = false;
|
||||
int quote_replaced_count = 0;
|
||||
|
||||
|
||||
|
||||
string[] blocked = new string[] {"Axiom","Db4objects","libsecondlife","log4net","Microsoft",
|
||||
"Modified","Mono","MonoXnaCompactMaths","mscorlib","MySql",
|
||||
"NHibernate","Nini","nunit","Ode","OpenSim","PhysX_Wrapper_Dotnet",
|
||||
"PumaCode","RAIL","XMLRPC","System"};
|
||||
|
||||
|
||||
for (int p = 0; p < blocked.Length;p++)
|
||||
{
|
||||
|
||||
Match SecurityM = Regex.Match(Script, "[;}][^\"']+" + blocked[p].Replace(".", "\\.") + "\\.[^\"']", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
|
||||
if (SecurityM.Success)
|
||||
throw new Exception("CS0103: 'The name '" + blocked[p] + "' does not exist in the current context'");
|
||||
|
||||
}
|
||||
|
||||
for (int p = 0; p < Script.Length; p++)
|
||||
|
@ -166,7 +156,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
|||
// END OF QUOTE REPLACEMENT
|
||||
//
|
||||
|
||||
|
||||
//
|
||||
// PROCESS STATES
|
||||
// Remove state definitions and add state names to start of each event within state
|
||||
|
@ -253,7 +242,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
|||
Script = ret;
|
||||
ret = String.Empty;
|
||||
|
||||
|
||||
foreach (string key in dataTypes.Keys)
|
||||
{
|
||||
string val;
|
||||
|
@ -291,7 +279,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
|||
Regex.Replace(Script, @"\[([^\]]*)\]", @"new LSL_Types.list($1)",
|
||||
RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
|
||||
|
||||
|
||||
// Replace (string) to .ToString() //
|
||||
Script =
|
||||
Regex.Replace(Script, @"\(string\)\s*([a-zA-Z0-9_.]+(\s*\([^\)]*\))?)", @"$1.ToString()",
|
||||
|
@ -313,13 +300,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
|||
Script = Script.Replace(key, "\"" + val + "\"");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//System.Console.WriteLine(Script);
|
||||
Return = String.Empty;// +
|
||||
//"using OpenSim.Region.ScriptEngine.Common; using System.Collections.Generic;";
|
||||
|
||||
|
||||
//Return += String.Empty +
|
||||
// "namespace SecondLife { ";
|
||||
//Return += String.Empty +
|
||||
|
@ -333,8 +317,5 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
|||
|
||||
return Return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -69,7 +69,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
fs.Close();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Parse LSO file.
|
||||
/// </summary>
|
||||
|
@ -77,7 +76,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
{
|
||||
// The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack.
|
||||
|
||||
|
||||
// HEADER BLOCK
|
||||
Common.SendToDebug("Reading HEADER BLOCK at: 0");
|
||||
fs.Seek(0, SeekOrigin.Begin);
|
||||
|
@ -156,7 +154,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
}
|
||||
Common.SendToDebug("Number of Static Blocks read: " + StaticBlockCount);
|
||||
|
||||
|
||||
// FUNCTION BLOCK
|
||||
// Always right after STATIC BLOCK
|
||||
LSO_Struct.FunctionBlock myFunctionBlock = new LSO_Struct.FunctionBlock();
|
||||
|
@ -186,7 +183,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// STATE FRAME BLOCK
|
||||
// Always right after FUNCTION BLOCK
|
||||
Common.SendToDebug("Reading STATE BLOCK at: " + myHeader.SR);
|
||||
|
@ -213,7 +209,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// STATE BLOCK
|
||||
// For each StateFrameBlock there is one StateBlock with multiple event handlers
|
||||
|
||||
|
@ -239,7 +234,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
|
||||
// We need to count number of bits flagged in EventMask?
|
||||
|
||||
|
||||
// for each bit in myStateFrameBlock.StatePointer[i].EventMask
|
||||
|
||||
// ADDING TO ALL RIGHT NOW, SHOULD LIMIT TO ONLY THE ONES IN USE
|
||||
|
@ -273,7 +267,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//// READ FUNCTION CODE CHUNKS
|
||||
//// Functions + Function start pos (GFR)
|
||||
//// TODO: Somehow be able to identify and reference this
|
||||
|
@ -320,7 +313,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (Common.IL_CreateFunctionList)
|
||||
IL_INSERT_FUNCTIONLIST();
|
||||
}
|
||||
|
@ -459,7 +451,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
Common.SendToDebug("Return type #" + myCodeChunk.ReturnType.ObjectType + ": " +
|
||||
((LSO_Enums.Variable_Type_Codes) myCodeChunk.ReturnType.ObjectType).ToString());
|
||||
|
||||
|
||||
// TODO: How to determine number of codechunks -- does this method work?
|
||||
myCodeChunk.CodeChunkArguments = new List<LSO_Struct.CodeChunkArgument>();
|
||||
byte reader = br_read(1)[0];
|
||||
|
@ -492,7 +483,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
// End marker is 0x000
|
||||
myCodeChunk.EndMarker = reader;
|
||||
|
||||
|
||||
//
|
||||
// Emit: START OF METHOD (FUNCTION)
|
||||
//
|
||||
|
@ -515,11 +505,9 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
Common.SendToDebug("CLR:" + eventname + ":ILGenerator il = methodBuilder.GetILGenerator();");
|
||||
ILGenerator il = methodBuilder.GetILGenerator();
|
||||
|
||||
|
||||
if (Common.IL_UseTryCatch)
|
||||
IL_INSERT_TRY(il, eventname);
|
||||
|
||||
|
||||
// Push Console.WriteLine command to stack ... Console.WriteLine("Hello World!");
|
||||
//Common.SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Call...");
|
||||
//il.Emit(OpCodes.Call, typeof(Console).GetMethod
|
||||
|
@ -534,7 +522,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
il.Emit(OpCodes.Ldarg, _ic);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// CALLING OPCODE PROCESSOR, one command at the time TO GENERATE IL
|
||||
//
|
||||
|
@ -544,7 +531,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
FoundRet = LSL_PROCESS_OPCODE(il);
|
||||
}
|
||||
|
||||
|
||||
if (Common.IL_UseTryCatch)
|
||||
IL_INSERT_END_TRY(il, eventname);
|
||||
|
||||
|
@ -558,17 +544,14 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
{
|
||||
Common.SendToDebug("Creating function list");
|
||||
|
||||
|
||||
string eventname = "GetFunctions";
|
||||
|
||||
Common.SendToDebug("Creating IL " + eventname);
|
||||
// Define a private String field.
|
||||
//FieldBuilder myField = myTypeBuilder.DefineField("EventList", typeof(String[]), FieldAttributes.Public);
|
||||
|
||||
|
||||
//FieldBuilder mem = typeBuilder.DefineField("mem", typeof(Array), FieldAttributes.Private);
|
||||
|
||||
|
||||
MethodBuilder methodBuilder = typeBuilder.DefineMethod(eventname,
|
||||
MethodAttributes.Public,
|
||||
typeof (string[]),
|
||||
|
@ -579,7 +562,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
|
||||
ILGenerator il = methodBuilder.GetILGenerator();
|
||||
|
||||
|
||||
// IL_INSERT_TRY(il, eventname);
|
||||
|
||||
// // Push string to stack
|
||||
|
@ -615,17 +597,14 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
//il.Emit(OpCodes.Call, typeof(LSL_BaseClass).GetMethod("AddFunction", new Type[] { typeof(string) }));
|
||||
}
|
||||
|
||||
|
||||
// IL_INSERT_END_TRY(il, eventname);
|
||||
|
||||
|
||||
il.Emit(OpCodes.Ldloc_0); // Load local variable 0 onto stack
|
||||
// il.Emit(OpCodes.Call, typeof(LSL_BaseClass).GetMethod("SetFunctionList", new Type[] { typeof(Array) }));
|
||||
|
||||
il.Emit(OpCodes.Ret); // Return
|
||||
}
|
||||
|
||||
|
||||
private void IL_INSERT_TRY(ILGenerator il, string eventname)
|
||||
{
|
||||
/*
|
||||
|
@ -687,7 +666,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
|||
{
|
||||
Common.SendToDebug("Found cached STATIC BLOCK");
|
||||
|
||||
|
||||
return StaticBlocks[pos];
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ using System.Reflection;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.DataStore.DB4o")]
|
||||
|
|
|
@ -29,7 +29,7 @@ using System.Reflection;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Inventory")]
|
||||
|
|
|
@ -29,7 +29,7 @@ using System.Reflection;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("LaunchSLClient")]
|
||||
|
|
|
@ -29,7 +29,7 @@ using System.Reflection;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.32BitLaunch")]
|
||||
|
|
|
@ -29,7 +29,7 @@ using System.Reflection;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.GUI")]
|
||||
|
|
Loading…
Reference in New Issue