aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e83bbbb..da2a90f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2282,7 +2282,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2282 return end; 2282 return end;
2283 } 2283 }
2284 2284
2285 protected LSL_Vector GetSetPosTarget(SceneObjectPart part, LSL_Vector targetPos, LSL_Vector fromPos) 2285 protected LSL_Vector GetSetPosTarget(SceneObjectPart part, LSL_Vector targetPos, LSL_Vector fromPos, bool adjust)
2286 { 2286 {
2287 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) 2287 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
2288 return fromPos; 2288 return fromPos;
@@ -2298,9 +2298,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2298 if ((targetPos.z < ground) && disable_underground_movement && m_host.ParentGroup.AttachmentPoint == 0) 2298 if ((targetPos.z < ground) && disable_underground_movement && m_host.ParentGroup.AttachmentPoint == 0)
2299 targetPos.z = ground; 2299 targetPos.z = ground;
2300 } 2300 }
2301 LSL_Vector real_vec = SetPosAdjust(fromPos, targetPos); 2301 if (adjust)
2302 return SetPosAdjust(fromPos, targetPos);
2302 2303
2303 return real_vec; 2304 return targetPos;
2304 } 2305 }
2305 2306
2306 /// <summary> 2307 /// <summary>
@@ -2315,7 +2316,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2315 return; 2316 return;
2316 2317
2317 LSL_Vector currentPos = GetPartLocalPos(part); 2318 LSL_Vector currentPos = GetPartLocalPos(part);
2318 LSL_Vector toPos = GetSetPosTarget(part, targetPos, currentPos); 2319 LSL_Vector toPos = GetSetPosTarget(part, targetPos, currentPos, adjust);
2319 2320
2320 2321
2321 if (part.ParentGroup.RootPart == part) 2322 if (part.ParentGroup.RootPart == part)
@@ -7940,7 +7941,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7940 return null; 7941 return null;
7941 7942
7942 v=rules.GetVector3Item(idx++); 7943 v=rules.GetVector3Item(idx++);
7943 currentPosition = GetSetPosTarget(part, v, currentPosition); 7944 if (part.IsRoot && !part.ParentGroup.IsAttachment)
7945 currentPosition = GetSetPosTarget(part, v, currentPosition, true);
7946 else
7947 currentPosition = GetSetPosTarget(part, v, currentPosition, false);
7944 positionChanged = true; 7948 positionChanged = true;
7945 7949
7946 break; 7950 break;