diff options
author | UbitUmarov | 2012-04-27 06:00:50 +0100 |
---|---|---|
committer | UbitUmarov | 2012-04-27 06:00:50 +0100 |
commit | 6edbbdc83ad53f38f1f5ae4a025b03c058827495 (patch) | |
tree | 95ae156f8adbd805a09c3de841a5fc81805b1aca /OpenSim/Region | |
parent | testing (diff) | |
download | opensim-SC_OLD-6edbbdc83ad53f38f1f5ae4a025b03c058827495.zip opensim-SC_OLD-6edbbdc83ad53f38f1f5ae4a025b03c058827495.tar.gz opensim-SC_OLD-6edbbdc83ad53f38f1f5ae4a025b03c058827495.tar.bz2 opensim-SC_OLD-6edbbdc83ad53f38f1f5ae4a025b03c058827495.tar.xz |
ubitODE fix don't report colisions with a volume detector ( only report to it )
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs index cf74f14..fa3d33e 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | |||
@@ -1020,12 +1020,16 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1020 | 1020 | ||
1021 | private void collision_accounting_events(PhysicsActor p1, PhysicsActor p2, ContactPoint contact) | 1021 | private void collision_accounting_events(PhysicsActor p1, PhysicsActor p2, ContactPoint contact) |
1022 | { | 1022 | { |
1023 | // obj1LocalID = 0; | ||
1024 | //returncollisions = false; | ||
1025 | obj2LocalID = 0; | 1023 | obj2LocalID = 0; |
1026 | //ctype = 0; | 1024 | bool p1events = p1.SubscribedEvents(); |
1027 | //cStartStop = 0; | 1025 | bool p2events = p2.SubscribedEvents(); |
1028 | if (!(p2.SubscribedEvents() || p1.SubscribedEvents())) | 1026 | |
1027 | if (p1 is OdePrim && p1.IsVolumeDtc) | ||
1028 | p2events = false; | ||
1029 | if (p2 is OdePrim && p2.IsVolumeDtc) | ||
1030 | p1events = false; | ||
1031 | |||
1032 | if (!(p2events || p1events)) | ||
1029 | return; | 1033 | return; |
1030 | 1034 | ||
1031 | switch ((ActorTypes)p1.PhysicsActorType) | 1035 | switch ((ActorTypes)p1.PhysicsActorType) |
@@ -1037,7 +1041,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1037 | case ActorTypes.Agent: | 1041 | case ActorTypes.Agent: |
1038 | cc2 = (OdeCharacter)p2; | 1042 | cc2 = (OdeCharacter)p2; |
1039 | obj2LocalID = cc2.m_localID; | 1043 | obj2LocalID = cc2.m_localID; |
1040 | if (p2.SubscribedEvents()) | 1044 | if (p2events) |
1041 | cc2.AddCollisionEvent(cc1.m_localID, contact); | 1045 | cc2.AddCollisionEvent(cc1.m_localID, contact); |
1042 | break; | 1046 | break; |
1043 | 1047 | ||
@@ -1046,7 +1050,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1046 | { | 1050 | { |
1047 | cp2 = (OdePrim)p2; | 1051 | cp2 = (OdePrim)p2; |
1048 | obj2LocalID = cp2.m_localID; | 1052 | obj2LocalID = cp2.m_localID; |
1049 | if (p2.SubscribedEvents()) | 1053 | if (p2events) |
1050 | cp2.AddCollisionEvent(cc1.m_localID, contact); | 1054 | cp2.AddCollisionEvent(cc1.m_localID, contact); |
1051 | } | 1055 | } |
1052 | break; | 1056 | break; |
@@ -1057,7 +1061,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1057 | obj2LocalID = 0; | 1061 | obj2LocalID = 0; |
1058 | break; | 1062 | break; |
1059 | } | 1063 | } |
1060 | if (p1.SubscribedEvents()) | 1064 | if (p1events) |
1061 | { | 1065 | { |
1062 | contact.SurfaceNormal = -contact.SurfaceNormal; | 1066 | contact.SurfaceNormal = -contact.SurfaceNormal; |
1063 | cc1.AddCollisionEvent(obj2LocalID, contact); | 1067 | cc1.AddCollisionEvent(obj2LocalID, contact); |
@@ -1078,7 +1082,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1078 | { | 1082 | { |
1079 | cc2 = (OdeCharacter)p2; | 1083 | cc2 = (OdeCharacter)p2; |
1080 | obj2LocalID = cc2.m_localID; | 1084 | obj2LocalID = cc2.m_localID; |
1081 | if (p2.SubscribedEvents()) | 1085 | if (p2events) |
1082 | cc2.AddCollisionEvent(cp1.m_localID, contact); | 1086 | cc2.AddCollisionEvent(cp1.m_localID, contact); |
1083 | } | 1087 | } |
1084 | break; | 1088 | break; |
@@ -1088,7 +1092,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1088 | { | 1092 | { |
1089 | cp2 = (OdePrim)p2; | 1093 | cp2 = (OdePrim)p2; |
1090 | obj2LocalID = cp2.m_localID; | 1094 | obj2LocalID = cp2.m_localID; |
1091 | if (p2.SubscribedEvents()) | 1095 | if (p2events) |
1092 | cp2.AddCollisionEvent(cp1.m_localID, contact); | 1096 | cp2.AddCollisionEvent(cp1.m_localID, contact); |
1093 | } | 1097 | } |
1094 | break; | 1098 | break; |
@@ -1099,7 +1103,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1099 | obj2LocalID = 0; | 1103 | obj2LocalID = 0; |
1100 | break; | 1104 | break; |
1101 | } | 1105 | } |
1102 | if (p1.SubscribedEvents()) | 1106 | if (p1events) |
1103 | { | 1107 | { |
1104 | contact.SurfaceNormal = -contact.SurfaceNormal; | 1108 | contact.SurfaceNormal = -contact.SurfaceNormal; |
1105 | cp1.AddCollisionEvent(obj2LocalID, contact); | 1109 | cp1.AddCollisionEvent(obj2LocalID, contact); |
@@ -1734,7 +1738,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1734 | base.TriggerPhysicsBasedRestart(); | 1738 | base.TriggerPhysicsBasedRestart(); |
1735 | } | 1739 | } |
1736 | 1740 | ||
1737 | while (step_time >= HalfOdeStep && nodeframes < 10) //limit number of steps so we don't say here for ever | 1741 | while (step_time > HalfOdeStep && nodeframes < 10) //limit number of steps so we don't say here for ever |
1738 | { | 1742 | { |
1739 | try | 1743 | try |
1740 | { | 1744 | { |