aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BasicPhysicsPlugin
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin')
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs2
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs42
2 files changed, 28 insertions, 16 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
index 919910c..b76fbbf 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
55// You can specify all values by your own or you can build default build and revision 55// You can specify all values by your own or you can build default build and revision
56// numbers with the '*' character (the default): 56// numbers with the '*' character (the default):
57 57
58[assembly : AssemblyVersion("1.0.*")] 58[assembly : AssemblyVersion("1.0.*")] \ No newline at end of file
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
index 5ac651f..636cf1a 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
@@ -106,18 +106,19 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
106 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, 106 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position,
107 PhysicsVector size, Quaternion rotation) 107 PhysicsVector size, Quaternion rotation)
108 { 108 {
109 return this.AddPrimShape(primName, pbs, position, size, rotation, false); 109 return AddPrimShape(primName, pbs, position, size, rotation, false);
110 } 110 }
111 111
112 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, 112 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position,
113 PhysicsVector size, Quaternion rotation, bool isPhysical) 113 PhysicsVector size, Quaternion rotation, bool isPhysical)
114 { 114 {
115 return null; 115 return null;
116 } 116 }
117
117 public override void AddPhysicsActorTaint(PhysicsActor prim) 118 public override void AddPhysicsActorTaint(PhysicsActor prim)
118 { 119 {
119
120 } 120 }
121
121 public override float Simulate(float timeStep) 122 public override float Simulate(float timeStep)
122 { 123 {
123 float fps = 0; 124 float fps = 0;
@@ -125,8 +126,8 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
125 { 126 {
126 BasicActor actor = _actors[i]; 127 BasicActor actor = _actors[i];
127 128
128 actor.Position.X += actor.Velocity.X * timeStep; 129 actor.Position.X += actor.Velocity.X*timeStep;
129 actor.Position.Y += actor.Velocity.Y * timeStep; 130 actor.Position.Y += actor.Velocity.Y*timeStep;
130 131
131 if (actor.Position.Y < 0) 132 if (actor.Position.Y < 0)
132 { 133 {
@@ -146,18 +147,18 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
146 actor.Position.X = 255.9F; 147 actor.Position.X = 255.9F;
147 } 148 }
148 149
149 float height = _heightMap[(int) actor.Position.Y * 256 + (int) actor.Position.X] + 1.0f; 150 float height = _heightMap[(int) actor.Position.Y*256 + (int) actor.Position.X] + 1.0f;
150 if (actor.Flying) 151 if (actor.Flying)
151 { 152 {
152 if (actor.Position.Z + (actor.Velocity.Z * timeStep) < 153 if (actor.Position.Z + (actor.Velocity.Z*timeStep) <
153 _heightMap[(int) actor.Position.Y * 256 + (int) actor.Position.X] + 2) 154 _heightMap[(int) actor.Position.Y*256 + (int) actor.Position.X] + 2)
154 { 155 {
155 actor.Position.Z = height; 156 actor.Position.Z = height;
156 actor.Velocity.Z = 0; 157 actor.Velocity.Z = 0;
157 } 158 }
158 else 159 else
159 { 160 {
160 actor.Position.Z += actor.Velocity.Z * timeStep; 161 actor.Position.Z += actor.Velocity.Z*timeStep;
161 } 162 }
162 } 163 }
163 else 164 else
@@ -204,31 +205,37 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
204 _position = new PhysicsVector(); 205 _position = new PhysicsVector();
205 _acceleration = new PhysicsVector(); 206 _acceleration = new PhysicsVector();
206 } 207 }
208
207 public override int PhysicsActorType 209 public override int PhysicsActorType
208 { 210 {
209 get { return (int)ActorTypes.Agent; } 211 get { return (int) ActorTypes.Agent; }
210 set { return; } 212 set { return; }
211 } 213 }
214
212 public override PhysicsVector RotationalVelocity 215 public override PhysicsVector RotationalVelocity
213 { 216 {
214 get { return m_rotationalVelocity; } 217 get { return m_rotationalVelocity; }
215 set { m_rotationalVelocity = value; } 218 set { m_rotationalVelocity = value; }
216 } 219 }
220
217 public override bool SetAlwaysRun 221 public override bool SetAlwaysRun
218 { 222 {
219 get { return false; } 223 get { return false; }
220 set { return; } 224 set { return; }
221 } 225 }
226
222 public override bool IsPhysical 227 public override bool IsPhysical
223 { 228 {
224 get { return false; } 229 get { return false; }
225 set { return; } 230 set { return; }
226 } 231 }
232
227 public override bool ThrottleUpdates 233 public override bool ThrottleUpdates
228 { 234 {
229 get { return false; } 235 get { return false; }
230 set { return; } 236 set { return; }
231 } 237 }
238
232 public override bool Flying 239 public override bool Flying
233 { 240 {
234 get { return flying; } 241 get { return flying; }
@@ -240,16 +247,19 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
240 get { return iscolliding; } 247 get { return iscolliding; }
241 set { iscolliding = value; } 248 set { iscolliding = value; }
242 } 249 }
250
243 public override bool CollidingGround 251 public override bool CollidingGround
244 { 252 {
245 get { return false; } 253 get { return false; }
246 set { return; } 254 set { return; }
247 } 255 }
256
248 public override bool CollidingObj 257 public override bool CollidingObj
249 { 258 {
250 get { return false; } 259 get { return false; }
251 set { return; } 260 set { return; }
252 } 261 }
262
253 public override PhysicsVector Position 263 public override PhysicsVector Position
254 { 264 {
255 get { return _position; } 265 get { return _position; }
@@ -264,27 +274,29 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
264 274
265 public override PrimitiveBaseShape Shape 275 public override PrimitiveBaseShape Shape
266 { 276 {
267 set 277 set { return; }
268 {
269 return;
270 }
271 } 278 }
279
272 public override float Mass 280 public override float Mass
273 { 281 {
274 get { return 0f; } 282 get { return 0f; }
275 } 283 }
284
276 public override PhysicsVector Force 285 public override PhysicsVector Force
277 { 286 {
278 get { return PhysicsVector.Zero; } 287 get { return PhysicsVector.Zero; }
279 } 288 }
289
280 public override PhysicsVector CenterOfMass 290 public override PhysicsVector CenterOfMass
281 { 291 {
282 get { return PhysicsVector.Zero; } 292 get { return PhysicsVector.Zero; }
283 } 293 }
294
284 public override PhysicsVector GeometricCenter 295 public override PhysicsVector GeometricCenter
285 { 296 {
286 get { return PhysicsVector.Zero; } 297 get { return PhysicsVector.Zero; }
287 } 298 }
299
288 public override PhysicsVector Velocity 300 public override PhysicsVector Velocity
289 { 301 {
290 get { return _velocity; } 302 get { return _velocity; }
@@ -321,4 +333,4 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
321 { 333 {
322 } 334 }
323 } 335 }
324} 336} \ No newline at end of file