aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
diff options
context:
space:
mode:
authorUbitUmarov2018-12-11 17:23:55 +0000
committerUbitUmarov2018-12-11 17:23:55 +0000
commitaf2a9d9508e08f1493858c27ad90f682b58e1ae4 (patch)
tree09de59564c144abdcd6f430a205a7309be0fb09a /OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
parentReturn a fake openid token to enable web services on a grid to identify the user (diff)
downloadopensim-SC-af2a9d9508e08f1493858c27ad90f682b58e1ae4.zip
opensim-SC-af2a9d9508e08f1493858c27ad90f682b58e1ae4.tar.gz
opensim-SC-af2a9d9508e08f1493858c27ad90f682b58e1ae4.tar.bz2
opensim-SC-af2a9d9508e08f1493858c27ad90f682b58e1ae4.tar.xz
mantis 8420: ubOde awake up lazy body
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs68
1 files changed, 64 insertions, 4 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
index 4e18522..842bc0b 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
@@ -3380,7 +3380,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3380 { 3380 {
3381 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); 3381 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3382 SafeNativeMethods.BodyEnable(Body); 3382 SafeNativeMethods.BodyEnable(Body);
3383 } 3383 }
3384 } 3384 }
3385 } 3385 }
3386 m_collisionscore = 0; 3386 m_collisionscore = 0;
@@ -3504,6 +3504,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3504 return; 3504 return;
3505 3505
3506 m_vehicle.ProcessFloatVehicleParam((Vehicle)fp.param, fp.value); 3506 m_vehicle.ProcessFloatVehicleParam((Vehicle)fp.param, fp.value);
3507 if (Body != IntPtr.Zero && !SafeNativeMethods.BodyIsEnabled(Body))
3508 {
3509 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3510 SafeNativeMethods.BodyEnable(Body);
3511 }
3507 } 3512 }
3508 3513
3509 private void changeVehicleVectorParam(strVehicleVectorParam vp) 3514 private void changeVehicleVectorParam(strVehicleVectorParam vp)
@@ -3511,6 +3516,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3511 if (m_vehicle == null) 3516 if (m_vehicle == null)
3512 return; 3517 return;
3513 m_vehicle.ProcessVectorVehicleParam((Vehicle)vp.param, vp.value); 3518 m_vehicle.ProcessVectorVehicleParam((Vehicle)vp.param, vp.value);
3519 if (Body != IntPtr.Zero && !SafeNativeMethods.BodyIsEnabled(Body))
3520 {
3521 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3522 SafeNativeMethods.BodyEnable(Body);
3523 }
3514 } 3524 }
3515 3525
3516 private void changeVehicleRotationParam(strVehicleQuatParam qp) 3526 private void changeVehicleRotationParam(strVehicleQuatParam qp)
@@ -3518,6 +3528,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3518 if (m_vehicle == null) 3528 if (m_vehicle == null)
3519 return; 3529 return;
3520 m_vehicle.ProcessRotationVehicleParam((Vehicle)qp.param, qp.value); 3530 m_vehicle.ProcessRotationVehicleParam((Vehicle)qp.param, qp.value);
3531 if (Body != IntPtr.Zero && !SafeNativeMethods.BodyIsEnabled(Body))
3532 {
3533 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3534 SafeNativeMethods.BodyEnable(Body);
3535 }
3521 } 3536 }
3522 3537
3523 private void changeVehicleFlags(strVehicleBoolParam bp) 3538 private void changeVehicleFlags(strVehicleBoolParam bp)
@@ -3525,48 +3540,93 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3525 if (m_vehicle == null) 3540 if (m_vehicle == null)
3526 return; 3541 return;
3527 m_vehicle.ProcessVehicleFlags(bp.param, bp.value); 3542 m_vehicle.ProcessVehicleFlags(bp.param, bp.value);
3543 if (Body != IntPtr.Zero && !SafeNativeMethods.BodyIsEnabled(Body))
3544 {
3545 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3546 SafeNativeMethods.BodyEnable(Body);
3547 }
3528 } 3548 }
3529 3549
3530 private void changeBuoyancy(float b) 3550 private void changeBuoyancy(float b)
3531 { 3551 {
3532 m_buoyancy = b; 3552 m_buoyancy = b;
3553 if (Body != IntPtr.Zero && !SafeNativeMethods.BodyIsEnabled(Body))
3554 {
3555 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3556 SafeNativeMethods.BodyEnable(Body);
3557 }
3533 } 3558 }
3534 3559
3535 private void changePIDTarget(Vector3 trg) 3560 private void changePIDTarget(Vector3 trg)
3536 { 3561 {
3537 m_PIDTarget = trg; 3562 m_PIDTarget = trg;
3563 if (Body != IntPtr.Zero && !SafeNativeMethods.BodyIsEnabled(Body))
3564 {
3565 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3566 SafeNativeMethods.BodyEnable(Body);
3567 }
3538 } 3568 }
3539 3569
3540 private void changePIDTau(float tau) 3570 private void changePIDTau(float tau)
3541 { 3571 {
3542 m_PIDTau = tau; 3572 m_PIDTau = tau;
3573 if (Body != IntPtr.Zero && !SafeNativeMethods.BodyIsEnabled(Body))
3574 {
3575 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3576 SafeNativeMethods.BodyEnable(Body);
3577 }
3543 } 3578 }
3544 3579
3545 private void changePIDActive(bool val) 3580 private void changePIDActive(bool val)
3546 { 3581 {
3547 m_usePID = val; 3582 m_usePID = val;
3583 if (Body != IntPtr.Zero && !SafeNativeMethods.BodyIsEnabled(Body))
3584 {
3585 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3586 SafeNativeMethods.BodyEnable(Body);
3587 }
3548 } 3588 }
3549 3589
3550 private void changePIDHoverHeight(float val) 3590 private void changePIDHoverHeight(float val)
3551 { 3591 {
3552 m_PIDHoverHeight = val; 3592 m_PIDHoverHeight = val;
3553 if (val == 0) 3593 if (val == 0)
3554 m_useHoverPID = false; 3594 m_useHoverPID = false;
3595 if (Body != IntPtr.Zero && !SafeNativeMethods.BodyIsEnabled(Body))
3596 {
3597 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3598 SafeNativeMethods.BodyEnable(Body);
3599 }
3555 } 3600 }
3556 3601
3557 private void changePIDHoverType(PIDHoverType type) 3602 private void changePIDHoverType(PIDHoverType type)
3558 { 3603 {
3559 m_PIDHoverType = type; 3604 m_PIDHoverType = type;
3605 if (Body != IntPtr.Zero && !SafeNativeMethods.BodyIsEnabled(Body))
3606 {
3607 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3608 SafeNativeMethods.BodyEnable(Body);
3609 }
3560 } 3610 }
3561 3611
3562 private void changePIDHoverTau(float tau) 3612 private void changePIDHoverTau(float tau)
3563 { 3613 {
3564 m_PIDHoverTau = tau; 3614 m_PIDHoverTau = tau;
3615 if (Body != IntPtr.Zero && !SafeNativeMethods.BodyIsEnabled(Body))
3616 {
3617 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3618 SafeNativeMethods.BodyEnable(Body);
3619 }
3565 } 3620 }
3566 3621
3567 private void changePIDHoverActive(bool active) 3622 private void changePIDHoverActive(bool active)
3568 { 3623 {
3569 m_useHoverPID = active; 3624 m_useHoverPID = active;
3625 if (Body != IntPtr.Zero && !SafeNativeMethods.BodyIsEnabled(Body))
3626 {
3627 SafeNativeMethods.BodySetAutoDisableSteps(Body, m_body_autodisable_frames);
3628 SafeNativeMethods.BodyEnable(Body);
3629 }
3570 } 3630 }
3571 3631
3572 private void changeInertia(PhysicsInertiaData inertia) 3632 private void changeInertia(PhysicsInertiaData inertia)