aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2013-01-15 22:15:06 +0100
committerMelanie2013-01-15 22:15:06 +0100
commitb3939a431cc28a5e3443ea1abcf1b4dbc48d7d3b (patch)
tree4fe20a0bb5d9d9fac2a6c5f358cdb41478e77b5d /OpenSim
parentadd some sanity checking to HandleAgentRequestSit handler (diff)
downloadopensim-SC_OLD-b3939a431cc28a5e3443ea1abcf1b4dbc48d7d3b.zip
opensim-SC_OLD-b3939a431cc28a5e3443ea1abcf1b4dbc48d7d3b.tar.gz
opensim-SC_OLD-b3939a431cc28a5e3443ea1abcf1b4dbc48d7d3b.tar.bz2
opensim-SC_OLD-b3939a431cc28a5e3443ea1abcf1b4dbc48d7d3b.tar.xz
Fix llSetRegionPos and detail behaviors of llSet[Link]PrimitiveParams[Fast]()
regarding prim positioning.
Diffstat (limited to '')
-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 1e1e574..525e575 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2260,7 +2260,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2260 return end; 2260 return end;
2261 } 2261 }
2262 2262
2263 protected LSL_Vector GetSetPosTarget(SceneObjectPart part, LSL_Vector targetPos, LSL_Vector fromPos) 2263 protected LSL_Vector GetSetPosTarget(SceneObjectPart part, LSL_Vector targetPos, LSL_Vector fromPos, bool adjust)
2264 { 2264 {
2265 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) 2265 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
2266 return fromPos; 2266 return fromPos;
@@ -2276,9 +2276,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2276 if ((targetPos.z < ground) && disable_underground_movement && m_host.ParentGroup.AttachmentPoint == 0) 2276 if ((targetPos.z < ground) && disable_underground_movement && m_host.ParentGroup.AttachmentPoint == 0)
2277 targetPos.z = ground; 2277 targetPos.z = ground;
2278 } 2278 }
2279 LSL_Vector real_vec = SetPosAdjust(fromPos, targetPos); 2279 if (adjust)
2280 return SetPosAdjust(fromPos, targetPos);
2280 2281
2281 return real_vec; 2282 return targetPos;
2282 } 2283 }
2283 2284
2284 /// <summary> 2285 /// <summary>
@@ -2293,7 +2294,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2293 return; 2294 return;
2294 2295
2295 LSL_Vector currentPos = GetPartLocalPos(part); 2296 LSL_Vector currentPos = GetPartLocalPos(part);
2296 LSL_Vector toPos = GetSetPosTarget(part, targetPos, currentPos); 2297 LSL_Vector toPos = GetSetPosTarget(part, targetPos, currentPos, adjust);
2297 2298
2298 2299
2299 if (part.ParentGroup.RootPart == part) 2300 if (part.ParentGroup.RootPart == part)
@@ -7925,7 +7926,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7925 return null; 7926 return null;
7926 7927
7927 v=rules.GetVector3Item(idx++); 7928 v=rules.GetVector3Item(idx++);
7928 currentPosition = GetSetPosTarget(part, v, currentPosition); 7929 if (part.IsRoot && !part.ParentGroup.IsAttachment)
7930 currentPosition = GetSetPosTarget(part, v, currentPosition, true);
7931 else
7932 currentPosition = GetSetPosTarget(part, v, currentPosition, false);
7929 positionChanged = true; 7933 positionChanged = true;
7930 7934
7931 break; 7935 break;