aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorJeff Ames2009-08-21 15:42:36 +0900
committerJeff Ames2009-08-21 15:47:55 +0900
commit158ad39df0de1c569d24d4ea28dc3952402df101 (patch)
tree30f989e4143bd8954712350fb634fdb2b36c57d8 /OpenSim/Region/ScriptEngine/Shared/Api
parentMerge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-158ad39df0de1c569d24d4ea28dc3952402df101.zip
opensim-SC_OLD-158ad39df0de1c569d24d4ea28dc3952402df101.tar.gz
opensim-SC_OLD-158ad39df0de1c569d24d4ea28dc3952402df101.tar.bz2
opensim-SC_OLD-158ad39df0de1c569d24d4ea28dc3952402df101.tar.xz
Add copyright header. Formatting cleanup.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs32
1 files changed, 17 insertions, 15 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 972e71c..16dd834 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1978,25 +1978,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1978 return new LSL_Rotation(q.X, q.Y, q.Z, q.W); 1978 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
1979 } 1979 }
1980 1980
1981 private LSL_Rotation GetPartRot( SceneObjectPart part ) 1981 private LSL_Rotation GetPartRot(SceneObjectPart part)
1982 { 1982 {
1983 Quaternion q; 1983 Quaternion q;
1984 if (part.LinkNum == 0 || part.LinkNum == 1) // unlinked or root prim 1984 if (part.LinkNum == 0 || part.LinkNum == 1) // unlinked or root prim
1985 { 1985 {
1986 if (part.ParentGroup.RootPart.AttachmentPoint != 0) 1986 if (part.ParentGroup.RootPart.AttachmentPoint != 0)
1987 { 1987 {
1988 ScenePresence avatar = World.GetScenePresence(part.AttachedAvatar); 1988 ScenePresence avatar = World.GetScenePresence(part.AttachedAvatar);
1989 if (avatar != null) 1989 if (avatar != null)
1990 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0) 1990 {
1991 q = avatar.CameraRotation; // Mouselook 1991 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0)
1992 else 1992 q = avatar.CameraRotation; // Mouselook
1993 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate 1993 else
1994 else 1994 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
1995 q = part.ParentGroup.GroupRotation; // Likely never get here but just in case 1995 }
1996 } 1996 else
1997 else 1997 q = part.ParentGroup.GroupRotation; // Likely never get here but just in case
1998 q = part.ParentGroup.GroupRotation; // just the group rotation 1998 }
1999 return new LSL_Rotation(q.X, q.Y, q.Z, q.W); 1999 else
2000 q = part.ParentGroup.GroupRotation; // just the group rotation
2001 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
2000 } 2002 }
2001 q = part.GetWorldRotation(); 2003 q = part.GetWorldRotation();
2002 return new LSL_Rotation(q.X, q.Y, q.Z, q.W); 2004 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);