aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/OdePlugin.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index fef0c4e..e43a1ac 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -555,6 +555,13 @@ namespace OpenSim.Region.Physics.OdePlugin
555 } 555 }
556 556
557 float max_collision_depth = 0f; 557 float max_collision_depth = 0f;
558 if (p1.CollisionScore + count >= float.MaxValue)
559 p1.CollisionScore = 0;
560 p1.CollisionScore += count;
561
562 if (p2.CollisionScore + count >= float.MaxValue)
563 p2.CollisionScore = 0;
564 p2.CollisionScore += count;
558 565
559 for (int i = 0; i < count; i++) 566 for (int i = 0; i < count; i++)
560 { 567 {
@@ -585,6 +592,7 @@ namespace OpenSim.Region.Physics.OdePlugin
585 p2.CollidingGround = true; 592 p2.CollidingGround = true;
586 break; 593 break;
587 } 594 }
595
588 596
589 // we don't want prim or avatar to explode 597 // we don't want prim or avatar to explode
590 598
@@ -2162,5 +2170,27 @@ namespace OpenSim.Region.Physics.OdePlugin
2162 //d.CloseODE(); 2170 //d.CloseODE();
2163 } 2171 }
2164 } 2172 }
2173 public override Dictionary<uint, float> GetTopColliders()
2174 {
2175 Dictionary<uint, float> returncolliders = new Dictionary<uint, float>();
2176 int cnt = 0;
2177 lock (_prims)
2178 {
2179 foreach (OdePrim prm in _prims)
2180 {
2181 if (prm.CollisionScore > 0)
2182 {
2183 returncolliders.Add(prm.m_localID, prm.CollisionScore);
2184 cnt++;
2185 prm.CollisionScore = 0f;
2186 if (cnt > 25)
2187 {
2188 break;
2189 }
2190 }
2191 }
2192 }
2193 return returncolliders;
2194 }
2165 } 2195 }
2166} 2196}