* Adding Scale to EntityBase * Fixing the incorrect initialization of EntityBase.Rotation * Removed SceneObjectGroup.GroupRotation and added overrides for Scale/Rotation/Velocity

This commit is contained in:
John Hurliman
2009-09-16 15:45:40 -07:00
parent f42d085ab1
commit 39842eb4af
6 changed files with 46 additions and 28 deletions

View File

@@ -2004,10 +2004,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
}
else
q = part.ParentGroup.GroupRotation; // Likely never get here but just in case
q = part.ParentGroup.Rotation; // Likely never get here but just in case
}
else
q = part.ParentGroup.GroupRotation; // just the group rotation
q = part.ParentGroup.Rotation; // just the group rotation
return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
}
q = part.GetWorldRotation();
@@ -7171,10 +7171,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
else
q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
else
q = m_host.ParentGroup.GroupRotation; // Likely never get here but just in case
q = m_host.ParentGroup.Rotation; // Likely never get here but just in case
}
else
q = m_host.ParentGroup.GroupRotation; // just the group rotation
q = m_host.ParentGroup.Rotation; // just the group rotation
return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
}

View File

@@ -218,16 +218,14 @@ namespace OpenSim.Region.ScriptEngine.Shared
}
}
Position = new LSL_Types.Vector3(part.AbsolutePosition.X,
part.AbsolutePosition.Y,
part.AbsolutePosition.Z);
Vector3 absPos = part.AbsolutePosition;
Position = new LSL_Types.Vector3(absPos.X, absPos.Y, absPos.Z);
Quaternion wr = part.ParentGroup.GroupRotation;
Quaternion wr = part.ParentGroup.Rotation;
Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W);
Velocity = new LSL_Types.Vector3(part.Velocity.X,
part.Velocity.Y,
part.Velocity.Z);
Vector3 vel = part.Velocity;
Velocity = new LSL_Types.Vector3(vel.X, vel.Y, vel.Z);
}
}