aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorubit2013-01-09 19:17:05 +0100
committerubit2013-01-09 19:17:05 +0100
commita99e26c89f01d0e350ce62dd325b190abf568814 (patch)
tree949a96d08ac7e035b4c102b0b9640c2cab5b2ec6 /OpenSim/Region
parentMerge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff)
parent fix llGetRot and parameters prim_rotation for attachments. Only on (diff)
downloadopensim-SC-a99e26c89f01d0e350ce62dd325b190abf568814.zip
opensim-SC-a99e26c89f01d0e350ce62dd325b190abf568814.tar.gz
opensim-SC-a99e26c89f01d0e350ce62dd325b190abf568814.tar.bz2
opensim-SC-a99e26c89f01d0e350ce62dd325b190abf568814.tar.xz
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs28
1 files changed, 27 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index faa92dc..0dfcfd6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2443,6 +2443,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2443 2443
2444 m_host.AddScriptLPS(1); 2444 m_host.AddScriptLPS(1);
2445 Quaternion q = m_host.GetWorldRotation(); 2445 Quaternion q = m_host.GetWorldRotation();
2446
2447 if (m_host.ParentGroup != null && m_host.ParentGroup.AttachmentPoint != 0)
2448 {
2449 ScenePresence avatar = World.GetScenePresence(m_host.ParentGroup.AttachedAvatar);
2450 if (avatar != null)
2451 {
2452 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0)
2453 q = avatar.CameraRotation * q; // Mouselook
2454 else
2455 q = avatar.Rotation * q; // Currently infrequently updated so may be inaccurate
2456 }
2457 }
2458
2446 return new LSL_Rotation(q.X, q.Y, q.Z, q.W); 2459 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
2447 } 2460 }
2448 2461
@@ -2468,7 +2481,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2468 q = part.ParentGroup.GroupRotation; // just the group rotation 2481 q = part.ParentGroup.GroupRotation; // just the group rotation
2469 return new LSL_Rotation(q.X, q.Y, q.Z, q.W); 2482 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
2470 } 2483 }
2484
2471 q = part.GetWorldRotation(); 2485 q = part.GetWorldRotation();
2486 if (part.ParentGroup.AttachmentPoint != 0)
2487 {
2488 ScenePresence avatar = World.GetScenePresence(part.ParentGroup.AttachedAvatar);
2489 if (avatar != null)
2490 {
2491 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0)
2492 q = avatar.CameraRotation * q; // Mouselook
2493 else
2494 q = avatar.Rotation * q; // Currently infrequently updated so may be inaccurate
2495 }
2496 }
2497
2472 return new LSL_Rotation(q.X, q.Y, q.Z, q.W); 2498 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
2473 } 2499 }
2474 2500
@@ -8709,7 +8735,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8709 8735
8710 LSL_List remaining = GetPrimParams(m_host, rules, ref result); 8736 LSL_List remaining = GetPrimParams(m_host, rules, ref result);
8711 8737
8712 while (remaining != null && remaining.Length > 2) 8738 while ((object)remaining != null && remaining.Length > 2)
8713 { 8739 {
8714 int linknumber = remaining.GetLSLIntegerItem(0); 8740 int linknumber = remaining.GetLSLIntegerItem(0);
8715 rules = remaining.GetSublist(1, -1); 8741 rules = remaining.GetSublist(1, -1);