aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-07-15 00:50:00 +0100
committerUbitUmarov2012-07-15 00:50:00 +0100
commit62df82b74d0f3599585f7320aeab8c6a8262f61f (patch)
treece65558db728ca6ffb4c3f78772bd14e3943328d /OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs
parent remove forgotten line... (diff)
downloadopensim-SC-62df82b74d0f3599585f7320aeab8c6a8262f61f.zip
opensim-SC-62df82b74d0f3599585f7320aeab8c6a8262f61f.tar.gz
opensim-SC-62df82b74d0f3599585f7320aeab8c6a8262f61f.tar.bz2
opensim-SC-62df82b74d0f3599585f7320aeab8c6a8262f61f.tar.xz
messing around... Let terrain and water have nullphysicsactors, let
nullphyscisactors have a type water, ground or unknown (default). having this removed geom to name mapping no longer needed. Made some more methods comum to prims and characters acessible via PhysActor allowing for a more uniform access. ...
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs99
1 files changed, 60 insertions, 39 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs
index 3d108f8..21fe9c0 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs
@@ -470,56 +470,77 @@ namespace OpenSim.Region.Physics.OdePlugin
470 470
471 if (p2 == null) 471 if (p2 == null)
472 { 472 {
473 string name; 473 /*
474 474 string name;
475 if (!m_scene.geom_name_map.TryGetValue(g2, out name)) 475
476 return; 476 if (!m_scene.geom_name_map.TryGetValue(g2, out name))
477 477 return;
478 if (name == "Terrain") 478
479 { 479 if (name == "Terrain")
480 // land colision 480 {
481 if ((CurrentRayFilter & RayFilterFlags.land) == 0) 481 // land colision
482 return; 482 if ((CurrentRayFilter & RayFilterFlags.land) == 0)
483 } 483 return;
484 else if (name == "Water") 484 }
485 { 485 else if (name == "Water")
486 if ((CurrentRayFilter & RayFilterFlags.water) == 0) 486 {
487 return; 487 if ((CurrentRayFilter & RayFilterFlags.water) == 0)
488 } 488 return;
489 else 489 }
490 return; 490 else
491 return;
492 */
493 return;
491 } 494 }
492 else 495 else
493 { 496 {
494 if (p2 is OdePrim) 497 switch (p2.PhysicsActorType)
495 { 498 {
496 RayFilterFlags thisFlags; 499 case (int)ActorTypes.Prim:
497 500
498 if (p2.IsPhysical) 501 RayFilterFlags thisFlags;
499 thisFlags = RayFilterFlags.physical;
500 else
501 thisFlags = RayFilterFlags.nonphysical;
502 502
503 if (p2.Phantom) 503 if (p2.IsPhysical)
504 thisFlags |= RayFilterFlags.phantom; 504 thisFlags = RayFilterFlags.physical;
505 else
506 thisFlags = RayFilterFlags.nonphysical;
505 507
506 if (p2.IsVolumeDtc) 508 if (p2.Phantom)
507 thisFlags |= RayFilterFlags.volumedtc; 509 thisFlags |= RayFilterFlags.phantom;
508 510
509 if ((thisFlags & CurrentRayFilter) == 0) 511 if (p2.IsVolumeDtc)
510 return; 512 thisFlags |= RayFilterFlags.volumedtc;
511 513
512 ID = ((OdePrim)p2).LocalID; 514 if ((thisFlags & CurrentRayFilter) == 0)
513 } 515 return;
514 else if (p2 is OdeCharacter) 516
515 { 517 ID = ((OdePrim)p2).LocalID;
516 if ((CurrentRayFilter & RayFilterFlags.agent) == 0) 518 break;
519
520 case (int)ActorTypes.Agent:
521
522 if ((CurrentRayFilter & RayFilterFlags.agent) == 0)
523 return;
524 else
525 ID = ((OdeCharacter)p2).LocalID;
526 break;
527
528 case (int)ActorTypes.Ground:
529
530 if ((CurrentRayFilter & RayFilterFlags.land) == 0)
531 return;
532 break;
533
534 case (int)ActorTypes.Water:
535
536 if ((CurrentRayFilter & RayFilterFlags.water) == 0)
537 return;
538 break;
539
540 default:
517 return; 541 return;
518 else 542 break;
519 ID = ((OdeCharacter)p2).LocalID;
520 } 543 }
521 else //??
522 return;
523 } 544 }
524 545
525 d.ContactGeom curcontact = new d.ContactGeom(); 546 d.ContactGeom curcontact = new d.ContactGeom();