aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/POSPlugin/POSScene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/POSPlugin/POSScene.cs')
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSScene.cs14
1 files changed, 5 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/POSScene.cs b/OpenSim/Region/Physics/POSPlugin/POSScene.cs
index 5361be0..fa8cc70 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSScene.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSScene.cs
@@ -113,20 +113,16 @@ namespace OpenSim.Region.Physics.POSPlugin
113 c.Position.Z - p.Position.Z) * Quaternion.Inverse(p.Orientation); 113 c.Position.Z - p.Position.Z) * Quaternion.Inverse(p.Orientation);
114 Vector3 avatarSize = new Vector3(c.Size.X, c.Size.Y, c.Size.Z) * Quaternion.Inverse(p.Orientation); 114 Vector3 avatarSize = new Vector3(c.Size.X, c.Size.Y, c.Size.Z) * Quaternion.Inverse(p.Orientation);
115 115
116 if (Math.Abs(rotatedPos.X) >= (p.Size.X*0.5 + Math.Abs(avatarSize.X)) || 116 return (Math.Abs(rotatedPos.X) < (p.Size.X*0.5 + Math.Abs(avatarSize.X)) &&
117 Math.Abs(rotatedPos.Y) >= (p.Size.Y*0.5 + Math.Abs(avatarSize.Y)) || 117 Math.Abs(rotatedPos.Y) < (p.Size.Y*0.5 + Math.Abs(avatarSize.Y)) &&
118 Math.Abs(rotatedPos.Z) >= (p.Size.Z*0.5 + Math.Abs(avatarSize.Z))) 118 Math.Abs(rotatedPos.Z) < (p.Size.Z*0.5 + Math.Abs(avatarSize.Z)));
119 {
120 return false;
121 }
122 return true;
123 } 119 }
124 120
125 private bool isCollidingWithPrim(POSCharacter c) 121 private bool isCollidingWithPrim(POSCharacter c)
126 { 122 {
127 for (int i = 0; i < _prims.Count; ++i) 123 foreach (POSPrim p in _prims)
128 { 124 {
129 if (isColliding(c, _prims[i])) 125 if (isColliding(c, p))
130 { 126 {
131 return true; 127 return true;
132 } 128 }