aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs1
-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
4 files changed, 9 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/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 759692f..d192018 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 }