diff options
author | Teravus Ovares | 2007-12-27 23:19:00 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-12-27 23:19:00 +0000 |
commit | 776e83941aacf771bb28d1ff5dc157cbd91fc44a (patch) | |
tree | 785e19b15b59ce0ac0bcca143c37c37be0586301 /OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |
parent | Thank you again, Alondria for: (diff) | |
download | opensim-SC-776e83941aacf771bb28d1ff5dc157cbd91fc44a.zip opensim-SC-776e83941aacf771bb28d1ff5dc157cbd91fc44a.tar.gz opensim-SC-776e83941aacf771bb28d1ff5dc157cbd91fc44a.tar.bz2 opensim-SC-776e83941aacf771bb28d1ff5dc157cbd91fc44a.tar.xz |
* Fixed Physical prim, various issues, viewer freezes, sim crashes, ODE errors, etc.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index f2c9b57..2193d07 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -299,29 +299,42 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
299 | p2.PhysicsActorType == (int) ActorTypes.Prim)) | 299 | p2.PhysicsActorType == (int) ActorTypes.Prim)) |
300 | { | 300 | { |
301 | if (p2.PhysicsActorType == (int) ActorTypes.Agent) | 301 | if (p2.PhysicsActorType == (int) ActorTypes.Agent) |
302 | { | 302 | { if (p1.IsPhysical) |
303 | { | ||
304 | int q = 1; | ||
305 | } | ||
303 | p2.CollidingObj = true; | 306 | p2.CollidingObj = true; |
304 | //contacts[i].depth = 0.003f; | 307 | //contacts[i].depth = 0.003f; |
305 | p2.Velocity = p2.Velocity + new PhysicsVector(0, 0, 2.5f); | 308 | p2.Velocity = p2.Velocity + new PhysicsVector(0, 0, 2.5f); |
306 | OdeCharacter character = (OdeCharacter) p2; | 309 | OdeCharacter character = (OdeCharacter) p2; |
307 | character.SetPidStatus(true); | 310 | character.SetPidStatus(true); |
308 | //contacts[i].pos = new d.Vector3(contacts[i].pos.X + (p1.Size.X / 2), contacts[i].pos.Y + (p1.Size.Y / 2), contacts[i].pos.Z + (p1.Size.Z / 2)); | 311 | //contacts[i].pos = new d.Vector3(contacts[i].pos.X + (p1.Size.X / 2), contacts[i].pos.Y + (p1.Size.Y / 2), contacts[i].pos.Z + (p1.Size.Z / 2)); |
312 | |||
309 | } | 313 | } |
310 | else | 314 | else |
311 | { | 315 | { |
316 | if (p1.IsPhysical) | ||
317 | { | ||
318 | int q = 1; | ||
319 | } | ||
312 | contacts[i].depth = 0.0000000f; | 320 | contacts[i].depth = 0.0000000f; |
313 | } | 321 | } |
314 | if (p1.PhysicsActorType == (int) ActorTypes.Agent) | 322 | if (p1.PhysicsActorType == (int) ActorTypes.Agent) |
315 | { | 323 | { |
324 | if (p2.IsPhysical) | ||
325 | { | ||
326 | int q = 1; | ||
327 | } | ||
316 | p1.CollidingObj = true; | 328 | p1.CollidingObj = true; |
317 | //contacts[i].depth = 0.003f; | 329 | //contacts[i].depth = 0.003f; |
318 | p1.Velocity = p1.Velocity + new PhysicsVector(0, 0, 2.5f); | 330 | p1.Velocity = p1.Velocity + new PhysicsVector(0, 0, 2.5f); |
319 | //contacts[i].pos = new d.Vector3(contacts[i].pos.X + (p2.Size.X / 2), contacts[i].pos.Y + (p2.Size.Y / 2), contacts[i].pos.Z + (p2.Size.Z / 2)); | 331 | //contacts[i].pos = new d.Vector3(contacts[i].pos.X + (p2.Size.X / 2), contacts[i].pos.Y + (p2.Size.Y / 2), contacts[i].pos.Z + (p2.Size.Z / 2)); |
320 | OdeCharacter character = (OdeCharacter) p2; | 332 | OdeCharacter character = (OdeCharacter)p1; |
321 | character.SetPidStatus(true); | 333 | character.SetPidStatus(true); |
322 | } | 334 | } |
323 | else | 335 | else |
324 | { | 336 | { |
337 | |||
325 | //contacts[i].depth = 0.0000000f; | 338 | //contacts[i].depth = 0.0000000f; |
326 | } | 339 | } |
327 | } | 340 | } |
@@ -329,7 +342,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
329 | if (p1.PhysicsActorType == (int) ActorTypes.Prim && p2.PhysicsActorType == (int) ActorTypes.Prim) | 342 | if (p1.PhysicsActorType == (int) ActorTypes.Prim && p2.PhysicsActorType == (int) ActorTypes.Prim) |
330 | { | 343 | { |
331 | // Don't collide, one or both prim will explode. | 344 | // Don't collide, one or both prim will explode. |
332 | contacts[i].depth = -1f; | 345 | contacts[i].depth = 0f; |
333 | } | 346 | } |
334 | if (contacts[i].depth >= 1.00f) | 347 | if (contacts[i].depth >= 1.00f) |
335 | { | 348 | { |
@@ -356,11 +369,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
356 | } | 369 | } |
357 | if (p1.PhysicsActorType == (int) ActorTypes.Agent) | 370 | if (p1.PhysicsActorType == (int) ActorTypes.Agent) |
358 | { | 371 | { |
359 | OdeCharacter character = (OdeCharacter) p2; | 372 | OdeCharacter character = (OdeCharacter)p1; |
360 | 373 | ||
361 | //p2.CollidingObj = true; | 374 | //p2.CollidingObj = true; |
362 | contacts[i].depth = 0.003f; | 375 | contacts[i].depth = 0.003f; |
363 | p2.Velocity = p2.Velocity + new PhysicsVector(0, 0, 0.5f); | 376 | p1.Velocity = p1.Velocity + new PhysicsVector(0, 0, 0.5f); |
364 | contacts[i].pos = | 377 | contacts[i].pos = |
365 | new d.Vector3(contacts[i].pos.X + (p1.Size.X/2), | 378 | new d.Vector3(contacts[i].pos.X + (p1.Size.X/2), |
366 | contacts[i].pos.Y + (p1.Size.Y/2), | 379 | contacts[i].pos.Y + (p1.Size.Y/2), |
@@ -1208,4 +1221,4 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1208 | { | 1221 | { |
1209 | } | 1222 | } |
1210 | } | 1223 | } |
1211 | } \ No newline at end of file | 1224 | } |