aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-06-12 16:19:29 +0100
committerUbitUmarov2017-06-12 16:19:29 +0100
commita18d45fbdcda9dead222ca45e1b8057c3090cf14 (patch)
tree7c72007f740b44cfb412cbba4272607b012718d3 /OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
parentimprove english on few messages (thx) (diff)
downloadopensim-SC-a18d45fbdcda9dead222ca45e1b8057c3090cf14.zip
opensim-SC-a18d45fbdcda9dead222ca45e1b8057c3090cf14.tar.gz
opensim-SC-a18d45fbdcda9dead222ca45e1b8057c3090cf14.tar.bz2
opensim-SC-a18d45fbdcda9dead222ca45e1b8057c3090cf14.tar.xz
fix some issues on ubOde physics shape type changes
Diffstat (limited to 'OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs23
1 files changed, 13 insertions, 10 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
index 9bf71f7..4bed0d2 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
@@ -165,6 +165,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
165 165
166 private float m_density; 166 private float m_density;
167 private byte m_shapetype; 167 private byte m_shapetype;
168 private byte m_fakeShapetype;
168 public bool _zeroFlag; 169 public bool _zeroFlag;
169 private bool m_lastUpdateSent; 170 private bool m_lastUpdateSent;
170 171
@@ -420,7 +421,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
420 { 421 {
421 if (value.IsFinite()) 422 if (value.IsFinite())
422 { 423 {
423 _parent_scene.m_meshWorker.ChangeActorPhysRep(this, _pbs, value, m_shapetype); 424 _parent_scene.m_meshWorker.ChangeActorPhysRep(this, _pbs, value, m_fakeShapetype);
424 } 425 }
425 else 426 else
426 { 427 {
@@ -630,7 +631,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
630 set 631 set
631 { 632 {
632// AddChange(changes.Shape, value); 633// AddChange(changes.Shape, value);
633 _parent_scene.m_meshWorker.ChangeActorPhysRep(this, value, _size, m_shapetype); 634 _parent_scene.m_meshWorker.ChangeActorPhysRep(this, value, _size, m_fakeShapetype);
634 } 635 }
635 } 636 }
636 637
@@ -638,11 +639,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
638 { 639 {
639 get 640 get
640 { 641 {
641 return m_shapetype; 642 return m_fakeShapetype;
642 } 643 }
643 set 644 set
644 { 645 {
645 m_shapetype = value; 646 m_fakeShapetype = value;
646 _parent_scene.m_meshWorker.ChangeActorPhysRep(this, _pbs, _size, value); 647 _parent_scene.m_meshWorker.ChangeActorPhysRep(this, _pbs, _size, value);
647 } 648 }
648 } 649 }
@@ -1329,7 +1330,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1329 1330
1330 _triMeshData = IntPtr.Zero; 1331 _triMeshData = IntPtr.Zero;
1331 1332
1332 m_shapetype = _shapeType; 1333 m_fakeShapetype = _shapeType;
1333 1334
1334 m_lastdoneSelected = false; 1335 m_lastdoneSelected = false;
1335 m_isSelected = false; 1336 m_isSelected = false;
@@ -1346,7 +1347,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1346 AddChange(changes.Add, null); 1347 AddChange(changes.Add, null);
1347 1348
1348 // get basic mass parameters 1349 // get basic mass parameters
1349 ODEPhysRepData repData = _parent_scene.m_meshWorker.NewActorPhysRep(this, _pbs, _size, m_shapetype); 1350 ODEPhysRepData repData = _parent_scene.m_meshWorker.NewActorPhysRep(this, _pbs, _size, _shapeType);
1350 1351
1351 primVolume = repData.volume; 1352 primVolume = repData.volume;
1352 m_OBB = repData.OBB; 1353 m_OBB = repData.OBB;
@@ -3161,7 +3162,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3161 { 3162 {
3162 _size = repData.size; //?? 3163 _size = repData.size; //??
3163 _pbs = repData.pbs; 3164 _pbs = repData.pbs;
3164 m_shapetype = repData.shapetype;
3165 3165
3166 m_mesh = repData.mesh; 3166 m_mesh = repData.mesh;
3167 3167
@@ -3200,9 +3200,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3200 { 3200 {
3201 repData.size = _size; 3201 repData.size = _size;
3202 repData.pbs = _pbs; 3202 repData.pbs = _pbs;
3203 repData.shapetype = m_shapetype; 3203 repData.shapetype = m_fakeShapetype;
3204 _parent_scene.m_meshWorker.RequestMesh(repData); 3204 _parent_scene.m_meshWorker.RequestMesh(repData);
3205 } 3205 }
3206 else
3207 m_shapetype = repData.shapetype;
3206 } 3208 }
3207 3209
3208 private void changePhysRepData(ODEPhysRepData repData) 3210 private void changePhysRepData(ODEPhysRepData repData)
@@ -3236,7 +3238,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3236 3238
3237 _size = repData.size; 3239 _size = repData.size;
3238 _pbs = repData.pbs; 3240 _pbs = repData.pbs;
3239 m_shapetype = repData.shapetype;
3240 3241
3241 m_mesh = repData.mesh; 3242 m_mesh = repData.mesh;
3242 3243
@@ -3287,9 +3288,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3287 { 3288 {
3288 repData.size = _size; 3289 repData.size = _size;
3289 repData.pbs = _pbs; 3290 repData.pbs = _pbs;
3290 repData.shapetype = m_shapetype; 3291 repData.shapetype = m_fakeShapetype;
3291 _parent_scene.m_meshWorker.RequestMesh(repData); 3292 _parent_scene.m_meshWorker.RequestMesh(repData);
3292 } 3293 }
3294 else
3295 m_shapetype = repData.shapetype;
3293 } 3296 }
3294 3297
3295 private void changeFloatOnWater(bool newval) 3298 private void changeFloatOnWater(bool newval)