diff options
author | Melanie | 2012-04-03 23:52:53 +0100 |
---|---|---|
committer | Melanie | 2012-04-03 23:52:53 +0100 |
commit | 63c44719f7a67950325690bc4cc848b75318e29f (patch) | |
tree | eaa0575671680d8dad75813dc8700d098a3df622 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | Merge branch 'master' into careminster (diff) | |
parent | terrain save-tile extensions Signed-off-by: Garmin Kawaguichi <garmin.kawagui... (diff) | |
download | opensim-SC-63c44719f7a67950325690bc4cc848b75318e29f.zip opensim-SC-63c44719f7a67950325690bc4cc848b75318e29f.tar.gz opensim-SC-63c44719f7a67950325690bc4cc848b75318e29f.tar.bz2 opensim-SC-63c44719f7a67950325690bc4cc848b75318e29f.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index ce05b8c..5268ade 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1474,7 +1474,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1474 | if (scale.z < 0.01) | 1474 | if (scale.z < 0.01) |
1475 | scale.z = 0.01; | 1475 | scale.z = 0.01; |
1476 | 1476 | ||
1477 | if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) | 1477 | PhysicsActor pa = part.ParentGroup.RootPart.PhysActor; |
1478 | |||
1479 | if (pa != null && pa.IsPhysical) | ||
1478 | { | 1480 | { |
1479 | if (scale.x > World.m_maxPhys) | 1481 | if (scale.x > World.m_maxPhys) |
1480 | scale.x = World.m_maxPhys; | 1482 | scale.x = World.m_maxPhys; |
@@ -2345,7 +2347,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2345 | // but only if the object is not physial and active. This is important for rotating doors. | 2347 | // but only if the object is not physial and active. This is important for rotating doors. |
2346 | // without the absoluteposition = absoluteposition happening, the doors do not move in the physics | 2348 | // without the absoluteposition = absoluteposition happening, the doors do not move in the physics |
2347 | // scene | 2349 | // scene |
2348 | if (part.PhysActor != null && !part.PhysActor.IsPhysical) | 2350 | PhysicsActor pa = part.PhysActor; |
2351 | |||
2352 | if (pa != null && !pa.IsPhysical) | ||
2349 | { | 2353 | { |
2350 | part.ParentGroup.ResetChildPrimPhysicsPositions(); | 2354 | part.ParentGroup.ResetChildPrimPhysicsPositions(); |
2351 | } | 2355 | } |
@@ -3073,7 +3077,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3073 | 3077 | ||
3074 | float groupmass = new_group.GetMass(); | 3078 | float groupmass = new_group.GetMass(); |
3075 | 3079 | ||
3076 | if (new_group.RootPart.PhysActor != null && new_group.RootPart.PhysActor.IsPhysical && llvel != Vector3.Zero) | 3080 | PhysicsActor pa = new_group.RootPart.PhysActor; |
3081 | |||
3082 | if (pa != null && pa.IsPhysical && llvel != Vector3.Zero) | ||
3077 | { | 3083 | { |
3078 | //Recoil. | 3084 | //Recoil. |
3079 | llApplyImpulse(new LSL_Vector(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0); | 3085 | llApplyImpulse(new LSL_Vector(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0); |
@@ -3510,6 +3516,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3510 | public void llSetHoverHeight(double height, int water, double tau) | 3516 | public void llSetHoverHeight(double height, int water, double tau) |
3511 | { | 3517 | { |
3512 | m_host.AddScriptLPS(1); | 3518 | m_host.AddScriptLPS(1); |
3519 | |||
3513 | if (m_host.PhysActor != null) | 3520 | if (m_host.PhysActor != null) |
3514 | { | 3521 | { |
3515 | PIDHoverType hoverType = PIDHoverType.Ground; | 3522 | PIDHoverType hoverType = PIDHoverType.Ground; |
@@ -3560,7 +3567,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3560 | 3567 | ||
3561 | // Per discussion with Melanie, for non-physical objects llLookAt appears to simply | 3568 | // Per discussion with Melanie, for non-physical objects llLookAt appears to simply |
3562 | // set the rotation of the object, copy that behavior | 3569 | // set the rotation of the object, copy that behavior |
3563 | if (strength == 0 || m_host.PhysActor == null || !m_host.PhysActor.IsPhysical) | 3570 | PhysicsActor pa = m_host.PhysActor; |
3571 | |||
3572 | if (strength == 0 || pa == null || !pa.IsPhysical) | ||
3564 | { | 3573 | { |
3565 | llSetLocalRot(target); | 3574 | llSetLocalRot(target); |
3566 | } | 3575 | } |