aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs25
1 files changed, 14 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 44eafb7..9c323a4 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -778,6 +778,7 @@ namespace OpenSim.Region.Physics.OdePlugin
778 Body = IntPtr.Zero; 778 Body = IntPtr.Zero;
779 } 779 }
780 } 780 }
781
781 m_disabled = true; 782 m_disabled = true;
782 m_collisionscore = 0; 783 m_collisionscore = 0;
783 } 784 }
@@ -968,7 +969,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
968 OdePrim obj = (OdePrim)m_taintparent; 969 OdePrim obj = (OdePrim)m_taintparent;
969 //obj.disableBody(); 970 //obj.disableBody();
970//Console.WriteLine("changelink calls ParentPrim"); 971//Console.WriteLine("changelink calls ParentPrim");
971 obj.ParentPrim(this); 972 obj.AddChildPrim(this);
972 973
973 /* 974 /*
974 if (obj.Body != (IntPtr)0 && Body != (IntPtr)0 && obj.Body != Body) 975 if (obj.Body != (IntPtr)0 && Body != (IntPtr)0 && obj.Body != Body)
@@ -1008,11 +1009,13 @@ Console.WriteLine("ZProcessTaints for " + Name);
1008 m_taintPhysics = m_isphysical; 1009 m_taintPhysics = m_isphysical;
1009 } 1010 }
1010 1011
1011 // I'm the parent 1012 /// <summary>
1012 // prim is the child 1013 /// Add a child prim to this parent prim.
1013 public void ParentPrim(OdePrim prim) 1014 /// </summary>
1015 /// <param name="prim">Child prim</param>
1016 public void AddChildPrim(OdePrim prim)
1014 { 1017 {
1015//Console.WriteLine("ParentPrim " + Name); 1018//Console.WriteLine("AddChildPrim " + Name);
1016 if (this.m_localID != prim.m_localID) 1019 if (this.m_localID != prim.m_localID)
1017 { 1020 {
1018 if (Body == IntPtr.Zero) 1021 if (Body == IntPtr.Zero)
@@ -1035,7 +1038,6 @@ Console.WriteLine("ZProcessTaints for " + Name);
1035 d.MassSetZero(out m2); 1038 d.MassSetZero(out m2);
1036 d.MassSetBoxTotal(out m2, prim.CalculateMass(), prm._size.X, prm._size.Y, prm._size.Z); 1039 d.MassSetBoxTotal(out m2, prim.CalculateMass(), prm._size.X, prm._size.Y, prm._size.Z);
1037 1040
1038
1039 d.Quaternion quat = new d.Quaternion(); 1041 d.Quaternion quat = new d.Quaternion();
1040 quat.W = prm._orientation.W; 1042 quat.W = prm._orientation.W;
1041 quat.X = prm._orientation.X; 1043 quat.X = prm._orientation.X;
@@ -1105,6 +1107,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1105 prm.Body = Body; 1107 prm.Body = Body;
1106 _parent_scene.addActivePrim(prm); 1108 _parent_scene.addActivePrim(prm);
1107 } 1109 }
1110
1108 m_collisionCategories |= CollisionCategories.Body; 1111 m_collisionCategories |= CollisionCategories.Body;
1109 m_collisionFlags |= (CollisionCategories.Land | CollisionCategories.Wind); 1112 m_collisionFlags |= (CollisionCategories.Land | CollisionCategories.Wind);
1110 1113
@@ -1113,7 +1116,6 @@ Console.WriteLine("ZProcessTaints for " + Name);
1113//Console.WriteLine(" Post GeomSetCategoryBits 2"); 1116//Console.WriteLine(" Post GeomSetCategoryBits 2");
1114 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); 1117 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
1115 1118
1116
1117 d.Quaternion quat2 = new d.Quaternion(); 1119 d.Quaternion quat2 = new d.Quaternion();
1118 quat2.W = _orientation.W; 1120 quat2.W = _orientation.W;
1119 quat2.X = _orientation.X; 1121 quat2.X = _orientation.X;
@@ -1135,7 +1137,6 @@ Console.WriteLine("ZProcessTaints for " + Name);
1135 d.BodySetAutoDisableFlag(Body, true); 1137 d.BodySetAutoDisableFlag(Body, true);
1136 d.BodySetAutoDisableSteps(Body, body_autodisable_frames); 1138 d.BodySetAutoDisableSteps(Body, body_autodisable_frames);
1137 1139
1138
1139 m_interpenetrationcount = 0; 1140 m_interpenetrationcount = 0;
1140 m_collisionscore = 0; 1141 m_collisionscore = 0;
1141 m_disabled = false; 1142 m_disabled = false;
@@ -1146,7 +1147,9 @@ Console.WriteLine("ZProcessTaints for " + Name);
1146 createAMotor(m_angularlock); 1147 createAMotor(m_angularlock);
1147 } 1148 }
1148 d.BodySetPosition(Body, Position.X, Position.Y, Position.Z); 1149 d.BodySetPosition(Body, Position.X, Position.Y, Position.Z);
1149 if (m_vehicle.Type != Vehicle.TYPE_NONE) m_vehicle.Enable(Body, _parent_scene); 1150 if (m_vehicle.Type != Vehicle.TYPE_NONE)
1151 m_vehicle.Enable(Body, _parent_scene);
1152
1150 _parent_scene.addActivePrim(this); 1153 _parent_scene.addActivePrim(this);
1151 } 1154 }
1152 } 1155 }
@@ -1183,7 +1186,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1183 foreach (OdePrim prm in childrenPrim) 1186 foreach (OdePrim prm in childrenPrim)
1184 { 1187 {
1185//Console.WriteLine("ChildSetGeom calls ParentPrim"); 1188//Console.WriteLine("ChildSetGeom calls ParentPrim");
1186 ParentPrim(prm); 1189 AddChildPrim(prm);
1187 } 1190 }
1188 } 1191 }
1189 1192
@@ -1223,7 +1226,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1223 foreach (OdePrim prm in childrenPrim) 1226 foreach (OdePrim prm in childrenPrim)
1224 { 1227 {
1225//Console.WriteLine("ChildDelink calls ParentPrim"); 1228//Console.WriteLine("ChildDelink calls ParentPrim");
1226 ParentPrim(prm); 1229 AddChildPrim(prm);
1227 } 1230 }
1228 } 1231 }
1229 } 1232 }