diff options
author | Melanie Thielker | 2010-05-05 21:12:02 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-05-05 21:12:02 +0200 |
commit | e0f9b1a69994be3e5771ebdcb0f2c253f67150db (patch) | |
tree | d6dcb05ca981e929fac4b20bf7c212ddc5e8ed12 | |
parent | Add perms check to the teleport home client command handlers. (diff) | |
download | opensim-SC_OLD-e0f9b1a69994be3e5771ebdcb0f2c253f67150db.zip opensim-SC_OLD-e0f9b1a69994be3e5771ebdcb0f2c253f67150db.tar.gz opensim-SC_OLD-e0f9b1a69994be3e5771ebdcb0f2c253f67150db.tar.bz2 opensim-SC_OLD-e0f9b1a69994be3e5771ebdcb0f2c253f67150db.tar.xz |
Removed a test for a "can't happen" case. ParentGroup is never null anymore.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d216eff..6ab3c62 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2033,14 +2033,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2033 | float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y); | 2033 | float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y); |
2034 | bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true); | 2034 | bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true); |
2035 | 2035 | ||
2036 | if (part.ParentGroup == null) | 2036 | if (part.ParentGroup.RootPart == part) |
2037 | { | ||
2038 | if ((targetPos.z < ground) && disable_underground_movement) | ||
2039 | targetPos.z = ground; | ||
2040 | LSL_Vector real_vec = SetPosAdjust(currentPos, targetPos); | ||
2041 | part.UpdateOffSet(new Vector3((float)real_vec.x, (float)real_vec.y, (float)real_vec.z)); | ||
2042 | } | ||
2043 | else if (part.ParentGroup.RootPart == part) | ||
2044 | { | 2037 | { |
2045 | if ((targetPos.z < ground) && disable_underground_movement) | 2038 | if ((targetPos.z < ground) && disable_underground_movement) |
2046 | targetPos.z = ground; | 2039 | targetPos.z = ground; |
@@ -2050,7 +2043,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2050 | } | 2043 | } |
2051 | else | 2044 | else |
2052 | { | 2045 | { |
2053 | //it's late... i think this is right ? | ||
2054 | if (llVecDist(new LSL_Vector(0,0,0), targetPos) <= 10.0f) | 2046 | if (llVecDist(new LSL_Vector(0,0,0), targetPos) <= 10.0f) |
2055 | { | 2047 | { |
2056 | part.OffsetPosition = new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z); | 2048 | part.OffsetPosition = new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z); |