Removed a test for a "can't happen" case. ParentGroup is never null anymore.
parent
8187fccd25
commit
7aed89a8d0
|
@ -1890,14 +1890,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y);
|
float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y);
|
||||||
bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true);
|
bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true);
|
||||||
|
|
||||||
if (part.ParentGroup == null)
|
if (part.ParentGroup.RootPart == part)
|
||||||
{
|
|
||||||
if ((targetPos.z < ground) && disable_underground_movement)
|
|
||||||
targetPos.z = ground;
|
|
||||||
LSL_Vector real_vec = SetPosAdjust(currentPos, targetPos);
|
|
||||||
part.UpdateOffSet(new Vector3((float)real_vec.x, (float)real_vec.y, (float)real_vec.z));
|
|
||||||
}
|
|
||||||
else if (part.ParentGroup.RootPart == part)
|
|
||||||
{
|
{
|
||||||
if ((targetPos.z < ground) && disable_underground_movement)
|
if ((targetPos.z < ground) && disable_underground_movement)
|
||||||
targetPos.z = ground;
|
targetPos.z = ground;
|
||||||
|
@ -1907,7 +1900,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//it's late... i think this is right ?
|
|
||||||
if (llVecDist(new LSL_Vector(0,0,0), targetPos) <= 10.0f)
|
if (llVecDist(new LSL_Vector(0,0,0), targetPos) <= 10.0f)
|
||||||
{
|
{
|
||||||
part.OffsetPosition = new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z);
|
part.OffsetPosition = new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z);
|
||||||
|
|
Loading…
Reference in New Issue