diff options
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs index 7367719..ddfdea4 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | |||
@@ -620,8 +620,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
620 | return d.JointCreateContactPtr(world, contactgroup, contact); | 620 | return d.JointCreateContactPtr(world, contactgroup, contact); |
621 | } | 621 | } |
622 | 622 | ||
623 | |||
624 | |||
625 | private bool GetCurContactGeom(int index, ref d.ContactGeom newcontactgeom) | 623 | private bool GetCurContactGeom(int index, ref d.ContactGeom newcontactgeom) |
626 | { | 624 | { |
627 | if (ContactgeomsArray == IntPtr.Zero || index >= contactsPerCollision) | 625 | if (ContactgeomsArray == IntPtr.Zero || index >= contactsPerCollision) |
@@ -1153,6 +1151,31 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1153 | } | 1151 | } |
1154 | } | 1152 | } |
1155 | break; | 1153 | break; |
1154 | case ActorTypes.Ground: | ||
1155 | case ActorTypes.Unknown: | ||
1156 | default: | ||
1157 | switch ((ActorTypes)p2.PhysicsActorType) | ||
1158 | { | ||
1159 | case ActorTypes.Agent: | ||
1160 | if (p2 is OdeCharacter) | ||
1161 | { | ||
1162 | cc2 = (OdeCharacter)p2; | ||
1163 | obj2LocalID = cc2.m_localID; | ||
1164 | if (p2events) | ||
1165 | cc2.AddCollisionEvent(0, contact); | ||
1166 | } | ||
1167 | break; | ||
1168 | case ActorTypes.Prim: | ||
1169 | if (p2 is OdePrim) | ||
1170 | { | ||
1171 | cp2 = (OdePrim)p2; | ||
1172 | obj2LocalID = cp2.m_localID; | ||
1173 | if (p2events) | ||
1174 | cp2.AddCollisionEvent(0, contact); | ||
1175 | } | ||
1176 | break; | ||
1177 | } | ||
1178 | break; | ||
1156 | } | 1179 | } |
1157 | } | 1180 | } |
1158 | 1181 | ||
@@ -1875,7 +1898,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1875 | 1898 | ||
1876 | case ActorTypes.Prim: | 1899 | case ActorTypes.Prim: |
1877 | OdePrim pobj = (OdePrim)obj; | 1900 | OdePrim pobj = (OdePrim)obj; |
1878 | pobj.SendCollisions(); | 1901 | if (pobj.Body == IntPtr.Zero || (d.BodyIsEnabled(pobj.Body) && !pobj.m_outbounds)) |
1902 | { | ||
1903 | pobj.AddCollisionFrameTime((int)(ODE_STEPSIZE * 1000.0f)); | ||
1904 | pobj.SendCollisions(); | ||
1905 | } | ||
1879 | break; | 1906 | break; |
1880 | } | 1907 | } |
1881 | } | 1908 | } |