aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-08-26 11:48:05 -0400
committerTeravus Ovares (Dan Olivares)2009-08-26 11:48:05 -0400
commit54e05a083d2aeb7a892647f64edfd52db80ce5ed (patch)
tree1fca51f8dd19c0f4871d8e1b875511c6087b3675 /OpenSim/Region/Physics
parent* It turns out that Physics heightmap values were being stored in managed mem... (diff)
parentAdd reference to OpenMetaverse.dll to UserServer.Modules to make MSVS happy (diff)
downloadopensim-SC_OLD-54e05a083d2aeb7a892647f64edfd52db80ce5ed.zip
opensim-SC_OLD-54e05a083d2aeb7a892647f64edfd52db80ce5ed.tar.gz
opensim-SC_OLD-54e05a083d2aeb7a892647f64edfd52db80ce5ed.tar.bz2
opensim-SC_OLD-54e05a083d2aeb7a892647f64edfd52db80ce5ed.tar.xz
Merge branch 'master' of ssh://MyConnection/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs1
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsVector.cs5
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs4
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSCharacter.cs6
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSScene.cs14
5 files changed, 14 insertions, 16 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs
index a74eb0c..8d8b3fe 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs
@@ -43,6 +43,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
43 private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; 43 private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero;
44 private bool flying; 44 private bool flying;
45 private bool iscolliding; 45 private bool iscolliding;
46
46 public BasicActor() 47 public BasicActor()
47 { 48 {
48 _velocity = new PhysicsVector(); 49 _velocity = new PhysicsVector();
diff --git a/OpenSim/Region/Physics/Manager/PhysicsVector.cs b/OpenSim/Region/Physics/Manager/PhysicsVector.cs
index c275021..d6f4d0d 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsVector.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsVector.cs
@@ -46,12 +46,17 @@ namespace OpenSim.Region.Physics.Manager
46 Z = z; 46 Z = z;
47 } 47 }
48 48
49 public PhysicsVector(PhysicsVector pv) : this(pv.X, pv.Y, pv.Z)
50 {
51 }
52
49 public void setValues(float x, float y, float z) 53 public void setValues(float x, float y, float z)
50 { 54 {
51 X = x; 55 X = x;
52 Y = y; 56 Y = y;
53 Z = z; 57 Z = z;
54 } 58 }
59
55 public static readonly PhysicsVector Zero = new PhysicsVector(0f, 0f, 0f); 60 public static readonly PhysicsVector Zero = new PhysicsVector(0f, 0f, 0f);
56 61
57 public override string ToString() 62 public override string ToString()
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 35433c6..38df751 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -1025,7 +1025,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1025 } 1025 }
1026 } 1026 }
1027 1027
1028
1029 if (flying) 1028 if (flying)
1030 { 1029 {
1031 vec.Z = (_target_velocity.Z - vel.Z) * (PID_D); 1030 vec.Z = (_target_velocity.Z - vel.Z) * (PID_D);
@@ -1044,7 +1043,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1044 vec.Z += (target_altitude - _position.Z) * PID_P * 5.0f; 1043 vec.Z += (target_altitude - _position.Z) * PID_P * 5.0f;
1045 } 1044 }
1046 // end add Kitto Flora 1045 // end add Kitto Flora
1047
1048 } 1046 }
1049 if (PhysicsVector.isFinite(vec)) 1047 if (PhysicsVector.isFinite(vec))
1050 { 1048 {
@@ -1080,8 +1078,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1080 _parent_scene.geom_name_map.Remove(Shell); 1078 _parent_scene.geom_name_map.Remove(Shell);
1081 Shell = IntPtr.Zero; 1079 Shell = IntPtr.Zero;
1082 } 1080 }
1083
1084 return;
1085 } 1081 }
1086 } 1082 }
1087 1083
diff --git a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs b/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs
index 1973adf..35fc616 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Physics.POSPlugin
43 private PhysicsVector _acceleration; 43 private PhysicsVector _acceleration;
44 private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; 44 private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero;
45 private bool flying; 45 private bool flying;
46 private bool iscolliding; 46 private bool isColliding;
47 47
48 public POSCharacter() 48 public POSCharacter()
49 { 49 {
@@ -116,8 +116,8 @@ namespace OpenSim.Region.Physics.POSPlugin
116 116
117 public override bool IsColliding 117 public override bool IsColliding
118 { 118 {
119 get { return iscolliding; } 119 get { return isColliding; }
120 set { iscolliding = value; } 120 set { isColliding = value; }
121 } 121 }
122 122
123 public override bool CollidingGround 123 public override bool CollidingGround
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 }