diff options
author | Melanie Thielker | 2010-05-05 21:12:02 +0200 |
---|---|---|
committer | Melanie | 2010-05-05 18:51:01 +0100 |
commit | 7aed89a8d099f3eecdaec10ec0cb6cd546d3bd3b (patch) | |
tree | b86d5480193a8d25d73b8d090dd4c795e60b7bc2 /OpenSim/Region/ScriptEngine/Shared | |
parent | Patch from mcortez: Update groups, add ALPHA Siman grid connector for groups (diff) | |
download | opensim-SC-7aed89a8d099f3eecdaec10ec0cb6cd546d3bd3b.zip opensim-SC-7aed89a8d099f3eecdaec10ec0cb6cd546d3bd3b.tar.gz opensim-SC-7aed89a8d099f3eecdaec10ec0cb6cd546d3bd3b.tar.bz2 opensim-SC-7aed89a8d099f3eecdaec10ec0cb6cd546d3bd3b.tar.xz |
Removed a test for a "can't happen" case. ParentGroup is never null anymore.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-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 3ccbb3a..b2eb585 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1890,14 +1890,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1890 | float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y); | 1890 | float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y); |
1891 | bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true); | 1891 | bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true); |
1892 | 1892 | ||
1893 | if (part.ParentGroup == null) | 1893 | if (part.ParentGroup.RootPart == part) |
1894 | { | ||
1895 | if ((targetPos.z < ground) && disable_underground_movement) | ||
1896 | targetPos.z = ground; | ||
1897 | LSL_Vector real_vec = SetPosAdjust(currentPos, targetPos); | ||
1898 | part.UpdateOffSet(new Vector3((float)real_vec.x, (float)real_vec.y, (float)real_vec.z)); | ||
1899 | } | ||
1900 | else if (part.ParentGroup.RootPart == part) | ||
1901 | { | 1894 | { |
1902 | if ((targetPos.z < ground) && disable_underground_movement) | 1895 | if ((targetPos.z < ground) && disable_underground_movement) |
1903 | targetPos.z = ground; | 1896 | targetPos.z = ground; |
@@ -1907,7 +1900,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1907 | } | 1900 | } |
1908 | else | 1901 | else |
1909 | { | 1902 | { |
1910 | //it's late... i think this is right ? | ||
1911 | if (llVecDist(new LSL_Vector(0,0,0), targetPos) <= 10.0f) | 1903 | if (llVecDist(new LSL_Vector(0,0,0), targetPos) <= 10.0f) |
1912 | { | 1904 | { |
1913 | part.OffsetPosition = new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z); | 1905 | part.OffsetPosition = new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z); |