Merge branch 'master' of /home/opensim/var/repo/opensim

integration
BlueWall 2012-04-20 22:45:56 -04:00
commit 05b369965e
2 changed files with 132 additions and 120 deletions

View File

@ -1042,21 +1042,23 @@ Console.WriteLine("ZProcessTaints for " + Name);
/// <param name="prim">Child prim</param>
private void AddChildPrim(OdePrim prim)
{
//Console.WriteLine("AddChildPrim " + Name);
if (LocalID != prim.LocalID)
{
if (LocalID == prim.LocalID)
return;
if (Body == IntPtr.Zero)
{
Body = d.BodyCreate(_parent_scene.world);
setMass();
}
if (Body != IntPtr.Zero)
{
lock (childrenPrim)
{
if (!childrenPrim.Contains(prim))
{
//Console.WriteLine("childrenPrim.Add " + prim);
if (childrenPrim.Contains(prim))
return;
// m_log.DebugFormat(
// "[ODE PRIM]: Linking prim {0} {1} to {2} {3}", prim.Name, prim.LocalID, Name, LocalID);
childrenPrim.Add(prim);
foreach (OdePrim prm in childrenPrim)
@ -1165,19 +1167,21 @@ Console.WriteLine("ZProcessTaints for " + Name);
{
createAMotor(m_angularlock);
}
d.BodySetPosition(Body, Position.X, Position.Y, Position.Z);
if (m_vehicle.Type != Vehicle.TYPE_NONE)
m_vehicle.Enable(Body, _parent_scene);
_parent_scene.ActivatePrim(this);
}
}
}
}
}
private void ChildSetGeom(OdePrim odePrim)
{
// m_log.DebugFormat(
// "[ODE PRIM]: ChildSetGeom {0} {1} for {2} {3}", odePrim.Name, odePrim.LocalID, Name, LocalID);
//if (IsPhysical && Body != IntPtr.Zero)
lock (childrenPrim)
{
@ -1192,12 +1196,14 @@ Console.WriteLine("ZProcessTaints for " + Name);
//prm.childPrim = false;
}
}
disableBody();
if (Body != IntPtr.Zero)
{
_parent_scene.DeactivatePrim(this);
}
// Spurious - Body == IntPtr.Zero after disableBody()
// if (Body != IntPtr.Zero)
// {
// _parent_scene.DeactivatePrim(this);
// }
lock (childrenPrim)
{
@ -1211,6 +1217,9 @@ Console.WriteLine("ZProcessTaints for " + Name);
private void ChildDelink(OdePrim odePrim)
{
// m_log.DebugFormat(
// "[ODE PRIM]: Delinking prim {0} {1} from {2} {3}", odePrim.Name, odePrim.LocalID, Name, LocalID);
// Okay, we have a delinked child.. need to rebuild the body.
lock (childrenPrim)
{
@ -1225,6 +1234,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
//prm.childPrim = false;
}
}
disableBody();
lock (childrenPrim)
@ -1233,10 +1243,11 @@ Console.WriteLine("ZProcessTaints for " + Name);
childrenPrim.Remove(odePrim);
}
if (Body != IntPtr.Zero)
{
_parent_scene.DeactivatePrim(this);
}
// Spurious - Body == IntPtr.Zero after disableBody()
// if (Body != IntPtr.Zero)
// {
// _parent_scene.DeactivatePrim(this);
// }
lock (childrenPrim)
{

View File

@ -2226,7 +2226,8 @@ namespace OpenSim.Region.Physics.OdePlugin
/// <param name="prim"></param>
internal void RemovePrimThreadLocked(OdePrim prim)
{
//Console.WriteLine("RemovePrimThreadLocked " + prim.m_primName);
// m_log.DebugFormat("[ODE SCENE]: Removing physical prim {0} {1}", prim.Name, prim.LocalID);
lock (prim)
{
RemoveCollisionEventReporting(prim);