diff options
author | UbitUmarov | 2012-03-04 04:26:05 +0000 |
---|---|---|
committer | UbitUmarov | 2012-03-04 04:26:05 +0000 |
commit | 01fcd400d7651be5f4aae3547a0489a7ccc5d7f7 (patch) | |
tree | 2b775b1118bf0fc25782c153513fc132ad6297ac /OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff) | |
download | opensim-SC-01fcd400d7651be5f4aae3547a0489a7ccc5d7f7.zip opensim-SC-01fcd400d7651be5f4aae3547a0489a7ccc5d7f7.tar.gz opensim-SC-01fcd400d7651be5f4aae3547a0489a7ccc5d7f7.tar.bz2 opensim-SC-01fcd400d7651be5f4aae3547a0489a7ccc5d7f7.tar.xz |
update UbitOde
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs index e5fa1d7..db07565 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | |||
@@ -187,7 +187,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
187 | public ODEDynamics m_vehicle; | 187 | public ODEDynamics m_vehicle; |
188 | 188 | ||
189 | internal int m_material = (int)Material.Wood; | 189 | internal int m_material = (int)Material.Wood; |
190 | protected ContactData primContactData = new ContactData { mu = 0f, bounce = 0.1f }; | 190 | private float mu; |
191 | private float bounce; | ||
191 | 192 | ||
192 | /// <summary> | 193 | /// <summary> |
193 | /// Is this prim subject to physics? Even if not, it's still solid for collision purposes. | 194 | /// Is this prim subject to physics? Even if not, it's still solid for collision purposes. |
@@ -218,25 +219,23 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
218 | } | 219 | } |
219 | } | 220 | } |
220 | 221 | ||
221 | public override ContactData ContactData | 222 | public override void getContactData(ref ContactData cdata) |
222 | { | 223 | { |
223 | get | 224 | cdata.mu = mu; |
225 | cdata.bounce = bounce; | ||
226 | |||
227 | if (m_isphysical) | ||
224 | { | 228 | { |
225 | if (m_isphysical) | 229 | ODEDynamics veh; |
226 | { | 230 | if (_parent != null) |
227 | ODEDynamics veh; | 231 | veh = ((OdePrim)_parent).m_vehicle; |
228 | if (_parent != null) | 232 | else |
229 | veh = ((OdePrim)_parent).m_vehicle; | 233 | veh = m_vehicle; |
230 | else | ||
231 | veh = m_vehicle; | ||
232 | 234 | ||
233 | if (veh != null) | 235 | if (veh != null && veh.Type != Vehicle.TYPE_NONE) |
234 | if (veh.Type != Vehicle.TYPE_NONE && veh.EngineActive) | 236 | cdata.mu *= veh.FrictionFactor; |
235 | return new ContactData(0, 0); | ||
236 | } | ||
237 | return primContactData; | ||
238 | } | 237 | } |
239 | } | 238 | } |
240 | 239 | ||
241 | public override int PhysicsActorType | 240 | public override int PhysicsActorType |
242 | { | 241 | { |
@@ -745,8 +744,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
745 | public override void SetMaterial(int pMaterial) | 744 | public override void SetMaterial(int pMaterial) |
746 | { | 745 | { |
747 | m_material = pMaterial; | 746 | m_material = pMaterial; |
748 | primContactData.mu = _parent_scene.m_materialContactsData[pMaterial].mu; | 747 | mu = _parent_scene.m_materialContactsData[pMaterial].mu; |
749 | primContactData.bounce = _parent_scene.m_materialContactsData[pMaterial].bounce; | 748 | bounce = _parent_scene.m_materialContactsData[pMaterial].bounce; |
750 | } | 749 | } |
751 | 750 | ||
752 | public void setPrimForRemoval() | 751 | public void setPrimForRemoval() |
@@ -899,8 +898,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
899 | m_isSelected = false; | 898 | m_isSelected = false; |
900 | m_delaySelect = false; | 899 | m_delaySelect = false; |
901 | 900 | ||
902 | primContactData.mu = parent_scene.m_materialContactsData[(int)Material.Wood].mu; | 901 | mu = parent_scene.m_materialContactsData[(int)Material.Wood].mu; |
903 | primContactData.bounce = parent_scene.m_materialContactsData[(int)Material.Wood].bounce; | 902 | bounce = parent_scene.m_materialContactsData[(int)Material.Wood].bounce; |
904 | 903 | ||
905 | CalcPrimBodyData(); | 904 | CalcPrimBodyData(); |
906 | 905 | ||