aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/POSPlugin/POSScene.cs
diff options
context:
space:
mode:
authorJeff Ames2009-08-26 12:58:37 +0900
committerJeff Ames2009-08-26 14:02:01 +0900
commit256624566f4708fc6e3280c240393d0abdb7beb6 (patch)
tree2b0005a270e4dad39f888f8c760ad0ada3635798 /OpenSim/Region/Physics/POSPlugin/POSScene.cs
parentA slightly modified version of (diff)
downloadopensim-SC_OLD-256624566f4708fc6e3280c240393d0abdb7beb6.zip
opensim-SC_OLD-256624566f4708fc6e3280c240393d0abdb7beb6.tar.gz
opensim-SC_OLD-256624566f4708fc6e3280c240393d0abdb7beb6.tar.bz2
opensim-SC_OLD-256624566f4708fc6e3280c240393d0abdb7beb6.tar.xz
Formatting cleanup, minor refactoring.
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 }