aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-09-25 01:07:37 +0100
committerJustin Clark-Casey (justincc)2010-09-25 01:07:37 +0100
commit30d3e8a13ef501c83c63a4cea07ee476df5e82f4 (patch)
tree6e5a92027eda915a84a7ba29ec4328fcc5ee09fc /OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
parentAdd UUID to physics prim name parameter so that diagnostic messages can be ma... (diff)
downloadopensim-SC_OLD-30d3e8a13ef501c83c63a4cea07ee476df5e82f4.zip
opensim-SC_OLD-30d3e8a13ef501c83c63a4cea07ee476df5e82f4.tar.gz
opensim-SC_OLD-30d3e8a13ef501c83c63a4cea07ee476df5e82f4.tar.bz2
opensim-SC_OLD-30d3e8a13ef501c83c63a4cea07ee476df5e82f4.tar.xz
Add prim name to OdePrim Error and Warning messages.
This aims to make it easier to identify and remove rogue prims that are causing ODE to fall over.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs87
1 files changed, 45 insertions, 42 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 3cf4501..87cccad 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -170,7 +170,7 @@ namespace OpenSim.Region.Physics.OdePlugin
170 private bool m_lastUpdateSent; 170 private bool m_lastUpdateSent;
171 171
172 public IntPtr Body = IntPtr.Zero; 172 public IntPtr Body = IntPtr.Zero;
173 public String m_primName; 173 public String Name { get; private set; }
174 private Vector3 _target_velocity; 174 private Vector3 _target_velocity;
175 public d.Mass pMass; 175 public d.Mass pMass;
176 176
@@ -188,6 +188,7 @@ namespace OpenSim.Region.Physics.OdePlugin
188 public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size, 188 public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size,
189 Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode) 189 Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode)
190 { 190 {
191 Name = primName;
191 m_vehicle = new ODEDynamics(); 192 m_vehicle = new ODEDynamics();
192 //gc = GCHandle.Alloc(prim_geom, GCHandleType.Pinned); 193 //gc = GCHandle.Alloc(prim_geom, GCHandleType.Pinned);
193 ode = dode; 194 ode = dode;
@@ -195,7 +196,7 @@ namespace OpenSim.Region.Physics.OdePlugin
195 { 196 {
196 pos = new Vector3(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f), 197 pos = new Vector3(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f),
197 parent_scene.GetTerrainHeightAtXY(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f)) + 0.5f); 198 parent_scene.GetTerrainHeightAtXY(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f)) + 0.5f);
198 m_log.Warn("[PHYSICS]: Got nonFinite Object create Position"); 199 m_log.WarnFormat("[PHYSICS]: Got nonFinite Object create Position for {0}", Name);
199 } 200 }
200 _position = pos; 201 _position = pos;
201 m_taintposition = pos; 202 m_taintposition = pos;
@@ -212,7 +213,7 @@ namespace OpenSim.Region.Physics.OdePlugin
212 if (!pos.IsFinite()) 213 if (!pos.IsFinite())
213 { 214 {
214 size = new Vector3(0.5f, 0.5f, 0.5f); 215 size = new Vector3(0.5f, 0.5f, 0.5f);
215 m_log.Warn("[PHYSICS]: Got nonFinite Object create Size"); 216 m_log.WarnFormat("[PHYSICS]: Got nonFinite Object create Size for {0}", Name);
216 } 217 }
217 218
218 if (size.X <= 0) size.X = 0.01f; 219 if (size.X <= 0) size.X = 0.01f;
@@ -225,7 +226,7 @@ namespace OpenSim.Region.Physics.OdePlugin
225 if (!QuaternionIsFinite(rotation)) 226 if (!QuaternionIsFinite(rotation))
226 { 227 {
227 rotation = Quaternion.Identity; 228 rotation = Quaternion.Identity;
228 m_log.Warn("[PHYSICS]: Got nonFinite Object create Rotation"); 229 m_log.WarnFormat("[PHYSICS]: Got nonFinite Object create Rotation for {0}", Name);
229 } 230 }
230 231
231 _orientation = rotation; 232 _orientation = rotation;
@@ -246,7 +247,7 @@ namespace OpenSim.Region.Physics.OdePlugin
246 if (m_isphysical) 247 if (m_isphysical)
247 m_targetSpace = _parent_scene.space; 248 m_targetSpace = _parent_scene.space;
248 } 249 }
249 m_primName = primName; 250
250 m_taintadd = true; 251 m_taintadd = true;
251 _parent_scene.AddPhysicsActorTaint(this); 252 _parent_scene.AddPhysicsActorTaint(this);
252 // don't do .add() here; old geoms get recycled with the same hash 253 // don't do .add() here; old geoms get recycled with the same hash
@@ -304,7 +305,7 @@ namespace OpenSim.Region.Physics.OdePlugin
304 { 305 {
305 prev_geom = prim_geom; 306 prev_geom = prim_geom;
306 prim_geom = geom; 307 prim_geom = geom;
307//Console.WriteLine("SetGeom to " + prim_geom + " for " + m_primName); 308//Console.WriteLine("SetGeom to " + prim_geom + " for " + Name);
308 if (prim_geom != IntPtr.Zero) 309 if (prim_geom != IntPtr.Zero)
309 { 310 {
310 d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories); 311 d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories);
@@ -857,7 +858,7 @@ namespace OpenSim.Region.Physics.OdePlugin
857 } 858 }
858 catch (AccessViolationException) 859 catch (AccessViolationException)
859 { 860 {
860 m_log.Error("[PHYSICS]: MESH LOCKED"); 861 m_log.ErrorFormat("[PHYSICS]: MESH LOCKED FOR {0}", Name);
861 return; 862 return;
862 } 863 }
863 864
@@ -874,7 +875,7 @@ namespace OpenSim.Region.Physics.OdePlugin
874 875
875 public void ProcessTaints(float timestep) 876 public void ProcessTaints(float timestep)
876 { 877 {
877//Console.WriteLine("ProcessTaints for " + m_primName); 878//Console.WriteLine("ProcessTaints for " + Name);
878 if (m_taintadd) 879 if (m_taintadd)
879 { 880 {
880 changeadd(timestep); 881 changeadd(timestep);
@@ -945,7 +946,7 @@ namespace OpenSim.Region.Physics.OdePlugin
945 } 946 }
946 else 947 else
947 { 948 {
948 m_log.Error("[PHYSICS]: The scene reused a disposed PhysActor! *waves finger*, Don't be evil. A couple of things can cause this. An improper prim breakdown(be sure to set prim_geom to zero after d.GeomDestroy! An improper buildup (creating the geom failed). Or, the Scene Reused a physics actor after disposing it.)"); 949 m_log.ErrorFormat("[PHYSICS]: The scene reused a disposed PhysActor for {0}! *waves finger*, Don't be evil. A couple of things can cause this. An improper prim breakdown(be sure to set prim_geom to zero after d.GeomDestroy! An improper buildup (creating the geom failed). Or, the Scene Reused a physics actor after disposing it.)", Name);
949 } 950 }
950 } 951 }
951 952
@@ -1035,7 +1036,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1035 // prim is the child 1036 // prim is the child
1036 public void ParentPrim(OdePrim prim) 1037 public void ParentPrim(OdePrim prim)
1037 { 1038 {
1038//Console.WriteLine("ParentPrim " + m_primName); 1039//Console.WriteLine("ParentPrim " + Name);
1039 if (this.m_localID != prim.m_localID) 1040 if (this.m_localID != prim.m_localID)
1040 { 1041 {
1041 if (Body == IntPtr.Zero) 1042 if (Body == IntPtr.Zero)
@@ -1071,18 +1072,20 @@ namespace OpenSim.Region.Physics.OdePlugin
1071 d.MassTranslate(ref m2, Position.X - prm.Position.X, Position.Y - prm.Position.Y, Position.Z - prm.Position.Z); 1072 d.MassTranslate(ref m2, Position.X - prm.Position.X, Position.Y - prm.Position.Y, Position.Z - prm.Position.Z);
1072 d.MassAdd(ref pMass, ref m2); 1073 d.MassAdd(ref pMass, ref m2);
1073 } 1074 }
1075
1074 foreach (OdePrim prm in childrenPrim) 1076 foreach (OdePrim prm in childrenPrim)
1075 { 1077 {
1076
1077 prm.m_collisionCategories |= CollisionCategories.Body; 1078 prm.m_collisionCategories |= CollisionCategories.Body;
1078 prm.m_collisionFlags |= (CollisionCategories.Land | CollisionCategories.Wind); 1079 prm.m_collisionFlags |= (CollisionCategories.Land | CollisionCategories.Wind);
1079 1080
1080 if (prm.prim_geom == IntPtr.Zero) 1081 if (prm.prim_geom == IntPtr.Zero)
1081 { 1082 {
1082 m_log.Warn("[PHYSICS]: Unable to link one of the linkset elements. No geom yet"); 1083 m_log.WarnFormat(
1084 "[PHYSICS]: Unable to link one of the linkset elements {0} for parent {1}. No geom yet",
1085 prm.Name, prim.Name);
1083 continue; 1086 continue;
1084 } 1087 }
1085//Console.WriteLine(" GeomSetCategoryBits 1: " + prm.prim_geom + " - " + (int)prm.m_collisionCategories + " for " + m_primName); 1088//Console.WriteLine(" GeomSetCategoryBits 1: " + prm.prim_geom + " - " + (int)prm.m_collisionCategories + " for " + Name);
1086 d.GeomSetCategoryBits(prm.prim_geom, (int)prm.m_collisionCategories); 1089 d.GeomSetCategoryBits(prm.prim_geom, (int)prm.m_collisionCategories);
1087 d.GeomSetCollideBits(prm.prim_geom, (int)prm.m_collisionFlags); 1090 d.GeomSetCollideBits(prm.prim_geom, (int)prm.m_collisionFlags);
1088 1091
@@ -1111,7 +1114,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1111 } 1114 }
1112 else 1115 else
1113 { 1116 {
1114 m_log.Debug("[PHYSICS]:I ain't got no boooooooooddy, no body"); 1117 m_log.DebugFormat("[PHYSICS]: {0} ain't got no boooooooooddy, no body", Name);
1115 } 1118 }
1116 1119
1117 1120
@@ -1130,7 +1133,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1130 m_collisionCategories |= CollisionCategories.Body; 1133 m_collisionCategories |= CollisionCategories.Body;
1131 m_collisionFlags |= (CollisionCategories.Land | CollisionCategories.Wind); 1134 m_collisionFlags |= (CollisionCategories.Land | CollisionCategories.Wind);
1132 1135
1133//Console.WriteLine("GeomSetCategoryBits 2: " + prim_geom + " - " + (int)m_collisionCategories + " for " + m_primName); 1136//Console.WriteLine("GeomSetCategoryBits 2: " + prim_geom + " - " + (int)m_collisionCategories + " for " + Name);
1134 d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories); 1137 d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories);
1135//Console.WriteLine(" Post GeomSetCategoryBits 2"); 1138//Console.WriteLine(" Post GeomSetCategoryBits 2");
1136 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); 1139 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
@@ -1373,7 +1376,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1373 } 1376 }
1374 catch (AccessViolationException) 1377 catch (AccessViolationException)
1375 { 1378 {
1376 m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); 1379 m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name);
1377 ode.dunlock(_parent_scene.world); 1380 ode.dunlock(_parent_scene.world);
1378 return; 1381 return;
1379 } 1382 }
@@ -1388,7 +1391,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1388 } 1391 }
1389 catch (AccessViolationException) 1392 catch (AccessViolationException)
1390 { 1393 {
1391 m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); 1394 m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name);
1392 ode.dunlock(_parent_scene.world); 1395 ode.dunlock(_parent_scene.world);
1393 return; 1396 return;
1394 } 1397 }
@@ -1404,7 +1407,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1404 } 1407 }
1405 catch (AccessViolationException) 1408 catch (AccessViolationException)
1406 { 1409 {
1407 m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); 1410 m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name);
1408 ode.dunlock(_parent_scene.world); 1411 ode.dunlock(_parent_scene.world);
1409 return; 1412 return;
1410 } 1413 }
@@ -1421,7 +1424,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1421 } 1424 }
1422 catch (AccessViolationException) 1425 catch (AccessViolationException)
1423 { 1426 {
1424 m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); 1427 m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name);
1425 ode.dunlock(_parent_scene.world); 1428 ode.dunlock(_parent_scene.world);
1426 return; 1429 return;
1427 } 1430 }
@@ -1444,7 +1447,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1444 if (_parent_scene.needsMeshing(_pbs)) 1447 if (_parent_scene.needsMeshing(_pbs))
1445 { 1448 {
1446 // Don't need to re-enable body.. it's done in SetMesh 1449 // Don't need to re-enable body.. it's done in SetMesh
1447 _mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical); 1450 _mesh = _parent_scene.mesher.CreateMesh(Name, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical);
1448 // createmesh returns null when it's a shape that isn't a cube. 1451 // createmesh returns null when it's a shape that isn't a cube.
1449 // m_log.Debug(m_localID); 1452 // m_log.Debug(m_localID);
1450 } 1453 }
@@ -1473,7 +1476,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1473 } 1476 }
1474 } 1477 }
1475 1478
1476 _parent_scene.geom_name_map[prim_geom] = this.m_primName; 1479 _parent_scene.geom_name_map[prim_geom] = this.Name;
1477 _parent_scene.actor_name_map[prim_geom] = (PhysicsActor)this; 1480 _parent_scene.actor_name_map[prim_geom] = (PhysicsActor)this;
1478 1481
1479 changeSelectedStatus(timestep); 1482 changeSelectedStatus(timestep);
@@ -1524,7 +1527,7 @@ Console.WriteLine(" JointCreateFixed");
1524 } 1527 }
1525 else 1528 else
1526 { 1529 {
1527 m_log.Warn("[PHYSICS]: Body Still null after enableBody(). This is a crash scenario."); 1530 m_log.WarnFormat("[PHYSICS]: Body for {0} still null after enableBody(). This is a crash scenario.", Name);
1528 } 1531 }
1529 } 1532 }
1530 //else 1533 //else
@@ -1573,7 +1576,7 @@ Console.WriteLine(" JointCreateFixed");
1573 } 1576 }
1574 else 1577 else
1575 { 1578 {
1576//Console.WriteLine("Move " + m_primName); 1579//Console.WriteLine("Move " + Name);
1577 if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009 1580 if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009
1578 // NON-'VEHICLES' are dealt with here 1581 // NON-'VEHICLES' are dealt with here
1579// if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f)) 1582// if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f))
@@ -1605,7 +1608,7 @@ Console.WriteLine(" JointCreateFixed");
1605 1608
1606 if (m_usePID) 1609 if (m_usePID)
1607 { 1610 {
1608//Console.WriteLine("PID " + m_primName); 1611//Console.WriteLine("PID " + Name);
1609 // KF - this is for object move? eg. llSetPos() ? 1612 // KF - this is for object move? eg. llSetPos() ?
1610 //if (!d.BodyIsEnabled(Body)) 1613 //if (!d.BodyIsEnabled(Body))
1611 //d.BodySetForce(Body, 0f, 0f, 0f); 1614 //d.BodySetForce(Body, 0f, 0f, 0f);
@@ -1677,7 +1680,7 @@ Console.WriteLine(" JointCreateFixed");
1677 // Hover PID Controller needs to be mutually exlusive to MoveTo PID controller 1680 // Hover PID Controller needs to be mutually exlusive to MoveTo PID controller
1678 if (m_useHoverPID && !m_usePID) 1681 if (m_useHoverPID && !m_usePID)
1679 { 1682 {
1680//Console.WriteLine("Hover " + m_primName); 1683//Console.WriteLine("Hover " + Name);
1681 1684
1682 // If we're using the PID controller, then we have no gravity 1685 // If we're using the PID controller, then we have no gravity
1683 fz = (-1 * _parent_scene.gravityz) * m_mass; 1686 fz = (-1 * _parent_scene.gravityz) * m_mass;
@@ -1803,7 +1806,7 @@ Console.WriteLine(" JointCreateFixed");
1803 { // is not physical, or is not a body or is selected 1806 { // is not physical, or is not a body or is selected
1804 // _zeroPosition = d.BodyGetPosition(Body); 1807 // _zeroPosition = d.BodyGetPosition(Body);
1805 return; 1808 return;
1806//Console.WriteLine("Nothing " + m_primName); 1809//Console.WriteLine("Nothing " + Name);
1807 1810
1808 } 1811 }
1809 } 1812 }
@@ -1891,10 +1894,10 @@ Console.WriteLine(" JointCreateFixed");
1891 catch (System.AccessViolationException) 1894 catch (System.AccessViolationException)
1892 { 1895 {
1893 prim_geom = IntPtr.Zero; 1896 prim_geom = IntPtr.Zero;
1894 m_log.Error("[PHYSICS]: PrimGeom dead"); 1897 m_log.ErrorFormat("[PHYSICS]: PrimGeom dead for {0}", Name);
1895 } 1898 }
1896 } 1899 }
1897//Console.WriteLine("changePhysicsStatus for " + m_primName); 1900//Console.WriteLine("changePhysicsStatus for " + Name);
1898 changeadd(2f); 1901 changeadd(2f);
1899 } 1902 }
1900 if (childPrim) 1903 if (childPrim)
@@ -2063,7 +2066,7 @@ Console.WriteLine(" JointCreateFixed");
2063 catch (System.AccessViolationException) 2066 catch (System.AccessViolationException)
2064 { 2067 {
2065 prim_geom = IntPtr.Zero; 2068 prim_geom = IntPtr.Zero;
2066 m_log.Error("[PHYSICS]: PrimGeom dead"); 2069 m_log.ErrorFormat("[PHYSICS]: PrimGeom dead for {0}", Name);
2067 } 2070 }
2068 prim_geom = IntPtr.Zero; 2071 prim_geom = IntPtr.Zero;
2069 // we don't need to do space calculation because the client sends a position update also. 2072 // we don't need to do space calculation because the client sends a position update also.
@@ -2307,7 +2310,7 @@ Console.WriteLine(" JointCreateFixed");
2307 } 2310 }
2308 else 2311 else
2309 { 2312 {
2310 m_log.Warn("[PHYSICS]: Got NaN Size on object"); 2313 m_log.WarnFormat("[PHYSICS]: Got NaN Size on object {0}", Name);
2311 } 2314 }
2312 } 2315 }
2313 } 2316 }
@@ -2329,7 +2332,7 @@ Console.WriteLine(" JointCreateFixed");
2329 } 2332 }
2330 else 2333 else
2331 { 2334 {
2332 m_log.Warn("[PHYSICS]: NaN in Force Applied to an Object"); 2335 m_log.WarnFormat("[PHYSICS]: NaN in Force Applied to an Object {0}", Name);
2333 } 2336 }
2334 } 2337 }
2335 } 2338 }
@@ -2413,7 +2416,7 @@ Console.WriteLine(" JointCreateFixed");
2413 } 2416 }
2414 else 2417 else
2415 { 2418 {
2416 m_log.Warn("[PHYSICS]: Got NaN Velocity in Object"); 2419 m_log.WarnFormat("[PHYSICS]: Got NaN Velocity in Object {0}", Name);
2417 } 2420 }
2418 2421
2419 } 2422 }
@@ -2438,7 +2441,7 @@ Console.WriteLine(" JointCreateFixed");
2438 } 2441 }
2439 else 2442 else
2440 { 2443 {
2441 m_log.Warn("[PHYSICS]: Got NaN Torque in Object"); 2444 m_log.WarnFormat("[PHYSICS]: Got NaN Torque in Object {0}", Name);
2442 } 2445 }
2443 } 2446 }
2444 } 2447 }
@@ -2465,7 +2468,7 @@ Console.WriteLine(" JointCreateFixed");
2465 _orientation = value; 2468 _orientation = value;
2466 } 2469 }
2467 else 2470 else
2468 m_log.Warn("[PHYSICS]: Got NaN quaternion Orientation from Scene in Object"); 2471 m_log.WarnFormat("[PHYSICS]: Got NaN quaternion Orientation from Scene in Object {0}", Name);
2469 2472
2470 } 2473 }
2471 } 2474 }
@@ -2505,7 +2508,7 @@ Console.WriteLine(" JointCreateFixed");
2505 } 2508 }
2506 else 2509 else
2507 { 2510 {
2508 m_log.Warn("[PHYSICS]: Got Invalid linear force vector from Scene in Object"); 2511 m_log.WarnFormat("[PHYSICS]: Got Invalid linear force vector from Scene in Object {0}", Name);
2509 } 2512 }
2510 //m_log.Info("[PHYSICS]: Added Force:" + force.ToString() + " to prim at " + Position.ToString()); 2513 //m_log.Info("[PHYSICS]: Added Force:" + force.ToString() + " to prim at " + Position.ToString());
2511 } 2514 }
@@ -2519,7 +2522,7 @@ Console.WriteLine(" JointCreateFixed");
2519 } 2522 }
2520 else 2523 else
2521 { 2524 {
2522 m_log.Warn("[PHYSICS]: Got Invalid Angular force vector from Scene in Object"); 2525 m_log.WarnFormat("[PHYSICS]: Got Invalid Angular force vector from Scene in Object {0}", Name);
2523 } 2526 }
2524 } 2527 }
2525 2528
@@ -2545,7 +2548,7 @@ Console.WriteLine(" JointCreateFixed");
2545 } 2548 }
2546 else 2549 else
2547 { 2550 {
2548 m_log.Warn("[PHYSICS]: Got NaN RotationalVelocity in Object"); 2551 m_log.WarnFormat("[PHYSICS]: Got NaN RotationalVelocity in Object {0}", Name);
2549 } 2552 }
2550 } 2553 }
2551 } 2554 }
@@ -2560,7 +2563,7 @@ Console.WriteLine(" JointCreateFixed");
2560 } 2563 }
2561 else if (m_crossingfailures == _parent_scene.geomCrossingFailuresBeforeOutofbounds) 2564 else if (m_crossingfailures == _parent_scene.geomCrossingFailuresBeforeOutofbounds)
2562 { 2565 {
2563 m_log.Warn("[PHYSICS]: Too many crossing failures for: " + m_primName); 2566 m_log.Warn("[PHYSICS]: Too many crossing failures for: " + Name);
2564 } 2567 }
2565 } 2568 }
2566 2569
@@ -2593,7 +2596,7 @@ Console.WriteLine(" JointCreateFixed");
2593 } 2596 }
2594 else 2597 else
2595 { 2598 {
2596 m_log.Warn("[PHYSICS]: Got NaN locking axis from Scene on Object"); 2599 m_log.WarnFormat("[PHYSICS]: Got NaN locking axis from Scene on Object {0}", Name);
2597 } 2600 }
2598 } 2601 }
2599 2602
@@ -2685,7 +2688,7 @@ Console.WriteLine(" JointCreateFixed");
2685 } 2688 }
2686 2689
2687 //float Adiff = 1.0f - Math.Abs(Quaternion.Dot(m_lastorientation, l_orientation)); 2690 //float Adiff = 1.0f - Math.Abs(Quaternion.Dot(m_lastorientation, l_orientation));
2688//Console.WriteLine("Adiff " + m_primName + " = " + Adiff); 2691//Console.WriteLine("Adiff " + Name + " = " + Adiff);
2689 if ((Math.Abs(m_lastposition.X - l_position.X) < 0.02) 2692 if ((Math.Abs(m_lastposition.X - l_position.X) < 0.02)
2690 && (Math.Abs(m_lastposition.Y - l_position.Y) < 0.02) 2693 && (Math.Abs(m_lastposition.Y - l_position.Y) < 0.02)
2691 && (Math.Abs(m_lastposition.Z - l_position.Z) < 0.02) 2694 && (Math.Abs(m_lastposition.Z - l_position.Z) < 0.02)
@@ -2826,7 +2829,7 @@ Console.WriteLine(" JointCreateFixed");
2826 m_PIDTarget = value; 2829 m_PIDTarget = value;
2827 } 2830 }
2828 else 2831 else
2829 m_log.Warn("[PHYSICS]: Got NaN PIDTarget from Scene on Object"); 2832 m_log.WarnFormat("[PHYSICS]: Got NaN PIDTarget from Scene on Object {0}", Name);
2830 } 2833 }
2831 } 2834 }
2832 public override bool PIDActive { set { m_usePID = value; } } 2835 public override bool PIDActive { set { m_usePID = value; } }