aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs43
1 files changed, 37 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 527a5cc..ececa6c 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -142,8 +142,7 @@ namespace OpenSim.Region.Physics.OdePlugin
142 m_taintadd = true; 142 m_taintadd = true;
143 _parent_scene.AddPhysicsActorTaint(this); 143 _parent_scene.AddPhysicsActorTaint(this);
144 // don't do .add() here; old geoms get recycled with the same hash 144 // don't do .add() here; old geoms get recycled with the same hash
145 parent_scene.geom_name_map[prim_geom] = primName; 145
146 parent_scene.actor_name_map[prim_geom] = (PhysicsActor) this;
147 } 146 }
148 147
149 /// <summary> 148 /// <summary>
@@ -378,7 +377,7 @@ namespace OpenSim.Region.Physics.OdePlugin
378 377
379 public void ProcessTaints(float timestep) 378 public void ProcessTaints(float timestep)
380 { 379 {
381 System.Threading.Thread.Sleep(5); 380
382 381
383 if (m_taintadd) 382 if (m_taintadd)
384 changeadd(timestep); 383 changeadd(timestep);
@@ -412,7 +411,26 @@ namespace OpenSim.Region.Physics.OdePlugin
412 changevelocity(timestep); 411 changevelocity(timestep);
413 } 412 }
414 413
414 public void ResetTaints()
415 {
416
417 m_taintposition = _position;
418
419 m_taintrot = _orientation;
415 420
421 m_taintPhysics = m_isphysical;
422
423 m_taintsize = _size;
424
425
426 m_taintshape = false;
427
428 m_taintforce = false;
429
430 m_taintdisable = false;
431
432 m_taintVelocity = PhysicsVector.Zero;
433 }
416 public void changeadd(float timestep) 434 public void changeadd(float timestep)
417 { 435 {
418 if (_mesh != null) 436 if (_mesh != null)
@@ -525,7 +543,9 @@ namespace OpenSim.Region.Physics.OdePlugin
525 } 543 }
526 544
527 545
528 } 546 }
547 _parent_scene.geom_name_map[prim_geom] = this.m_primName;
548 _parent_scene.actor_name_map[prim_geom] = (PhysicsActor)this;
529 m_taintadd = false; 549 m_taintadd = false;
530 550
531 551
@@ -610,8 +630,14 @@ namespace OpenSim.Region.Physics.OdePlugin
610 630
611 public void changesize(float timestamp) 631 public void changesize(float timestamp)
612 { 632 {
633 if (!_parent_scene.geom_name_map.ContainsKey(prim_geom))
634 {
635 m_taintsize = _size;
636 return;
637 }
613 string oldname = _parent_scene.geom_name_map[prim_geom]; 638 string oldname = _parent_scene.geom_name_map[prim_geom];
614 639
640
615 // Cleanup of old prim geometry 641 // Cleanup of old prim geometry
616 if (_mesh != null) 642 if (_mesh != null)
617 { 643 {
@@ -995,11 +1021,16 @@ namespace OpenSim.Region.Physics.OdePlugin
995 public override void CrossingFailure() 1021 public override void CrossingFailure()
996 { 1022 {
997 m_crossingfailures++; 1023 m_crossingfailures++;
998 if (m_crossingfailures >= 5) 1024 if (m_crossingfailures > 5)
999 { 1025 {
1000 m_log.Warn("[PHYSICS]: Too many crossing failures for: " + m_primName); 1026 base.RaiseOutOfBounds(_position);
1027 return;
1001 1028
1002 } 1029 }
1030 else if (m_crossingfailures == 5)
1031 {
1032 m_log.Warn("[PHYSICS]: Too many crossing failures for: " + m_primName);
1033 }
1003 } 1034 }
1004 public void UpdatePositionAndVelocity() 1035 public void UpdatePositionAndVelocity()
1005 { 1036 {