From d6301db382111bf57a7893215ea84b7e6b09187e Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 2 Oct 2009 00:45:31 +0100 Subject: Revert "* Adding Scale to EntityBase * Fixing the incorrect initialization of EntityBase.Rotation * Removed SceneObjectGroup.GroupRotation and added overrides for Scale/Rotation/Velocity" This reverts commit 39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0. --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 ++++---- OpenSim/Region/ScriptEngine/Shared/Helpers.cs | 12 +++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index bf83a49..0bd6546 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2007,10 +2007,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api q = avatar.Rotation; // Currently infrequently updated so may be inaccurate } else - q = part.ParentGroup.Rotation; // Likely never get here but just in case + q = part.ParentGroup.GroupRotation; // Likely never get here but just in case } else - q = part.ParentGroup.Rotation; // just the group rotation + q = part.ParentGroup.GroupRotation; // just the group rotation return new LSL_Rotation(q.X, q.Y, q.Z, q.W); } q = part.GetWorldRotation(); @@ -7181,10 +7181,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api else q = avatar.Rotation; // Currently infrequently updated so may be inaccurate else - q = m_host.ParentGroup.Rotation; // Likely never get here but just in case + q = m_host.ParentGroup.GroupRotation; // Likely never get here but just in case } else - q = m_host.ParentGroup.Rotation; // just the group rotation + q = m_host.ParentGroup.GroupRotation; // just the group rotation return new LSL_Rotation(q.X, q.Y, q.Z, q.W); } diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs index 84ccafe..4855d64 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs @@ -218,14 +218,16 @@ namespace OpenSim.Region.ScriptEngine.Shared } } - Vector3 absPos = part.AbsolutePosition; - Position = new LSL_Types.Vector3(absPos.X, absPos.Y, absPos.Z); + Position = new LSL_Types.Vector3(part.AbsolutePosition.X, + part.AbsolutePosition.Y, + part.AbsolutePosition.Z); - Quaternion wr = part.ParentGroup.Rotation; + Quaternion wr = part.ParentGroup.GroupRotation; Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W); - Vector3 vel = part.Velocity; - Velocity = new LSL_Types.Vector3(vel.X, vel.Y, vel.Z); + Velocity = new LSL_Types.Vector3(part.Velocity.X, + part.Velocity.Y, + part.Velocity.Z); } } -- cgit v1.1 From 2107b67f1b145f7718fdb1450be1a7b8dd1a0bf7 Mon Sep 17 00:00:00 2001 From: dr scofield (aka dirk husemann) Date: Fri, 2 Oct 2009 11:10:52 +0200 Subject: - cleaning up LandData/ILandObject capitalization issues - adding LandDataSerializer to OAR mechanics --- .../Shared/Api/Implementation/LSL_Api.cs | 45 ++++++++++++---------- .../Shared/Api/Implementation/OSSL_Api.cs | 10 ++--- 2 files changed, 29 insertions(+), 26 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 0bd6546..cb91677 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3899,7 +3899,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { // agent must be over the owners land if (m_host.OwnerID == World.LandChannel.GetLandObject( - presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) + presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) { presence.ControllingClient.SendTeleportLocationStart(); World.TeleportClientHome(agentId, presence.ControllingClient); @@ -4091,7 +4091,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; // Need provisions for Group Owned here - if (m_host.OwnerID == targetlandObj.landData.OwnerID || targetlandObj.landData.IsGroupOwned || m_host.OwnerID == targetID) + if (m_host.OwnerID == targetlandObj.LandData.OwnerID || + targetlandObj.LandData.IsGroupOwned || m_host.OwnerID == targetID) { pushAllowed = true; } @@ -4107,10 +4108,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api else { // Parcel push restriction - if ((targetlandObj.landData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject) + if ((targetlandObj.LandData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject) { // Need provisions for Group Owned here - if (m_host.OwnerID == targetlandObj.landData.OwnerID || targetlandObj.landData.IsGroupOwned || m_host.OwnerID == targetID) + if (m_host.OwnerID == targetlandObj.LandData.OwnerID || + targetlandObj.LandData.IsGroupOwned || + m_host.OwnerID == targetID) { pushAllowed = true; } @@ -5442,7 +5445,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { // agent must be over the owners land if (m_host.OwnerID == World.LandChannel.GetLandObject( - presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) + presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) World.TeleportClientHome(agentId, presence.ControllingClient); } } @@ -5532,7 +5535,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (m_host.OwnerID == World.LandChannel.GetLandObject( - presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) + presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) return 1; } else // object is not an avatar @@ -5541,7 +5544,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (obj != null) if (m_host.OwnerID == World.LandChannel.GetLandObject( - obj.AbsolutePosition.X, obj.AbsolutePosition.Y).landData.OwnerID) + obj.AbsolutePosition.X, obj.AbsolutePosition.Y).LandData.OwnerID) return 1; } } @@ -5552,7 +5555,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetLandOwnerAt(LSL_Vector pos) { m_host.AddScriptLPS(1); - return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.OwnerID.ToString(); + return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.OwnerID.ToString(); } /// @@ -5621,9 +5624,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); if (parcel != null) { - if (m_host.ObjectOwner == parcel.landData.OwnerID || - (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.GroupID - && parcel.landData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID)) + if (m_host.ObjectOwner == parcel.LandData.OwnerID || + (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.LandData.GroupID + && parcel.LandData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID)) { av.StandUp(); } @@ -6126,7 +6129,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); UUID key; - LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; + LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData; if (land.OwnerID == m_host.OwnerID) { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); @@ -7144,7 +7147,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); - if (land.landData.OwnerID != m_host.ObjectOwner) + if (land.LandData.OwnerID != m_host.ObjectOwner) return; land.SetMusicUrl(url); @@ -8403,7 +8406,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? byte loop = 0; - LandData landData = landObject.landData; + LandData landData = landObject.LandData; string url = landData.MediaURL; string texture = landData.MediaID.ToString(); bool autoAlign = landData.MediaAutoScale != 0; @@ -8832,7 +8835,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); UUID key; - LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; + LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData; if (land.OwnerID == m_host.OwnerID) { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); @@ -8851,7 +8854,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); UUID key; - LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; + LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData; if (land.OwnerID == m_host.OwnerID) { if (UUID.TryParse(avatar, out key)) @@ -8873,7 +8876,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); UUID key; - LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; + LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData; if (land.OwnerID == m_host.OwnerID) { if (UUID.TryParse(avatar, out key)) @@ -9018,7 +9021,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetParcelFlags(LSL_Vector pos) { m_host.AddScriptLPS(1); - return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.Flags; + return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.Flags; } public LSL_Integer llGetRegionFlags() @@ -9139,7 +9142,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llResetLandBanList() { m_host.AddScriptLPS(1); - LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; + LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData; if (land.OwnerID == m_host.OwnerID) { foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) @@ -9156,7 +9159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llResetLandPassList() { m_host.AddScriptLPS(1); - LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; + LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData; if (land.OwnerID == m_host.OwnerID) { foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) @@ -9240,7 +9243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_List ret = new LSL_List(); if (land != null) { - foreach (KeyValuePair detectedParams in land.getLandObjectOwners()) + foreach (KeyValuePair detectedParams in land.GetLandObjectOwners()) { ret.Add(detectedParams.Key.ToString()); ret.Add(detectedParams.Value); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 0b95abc..59525b6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -593,7 +593,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // agent must be over owners land to avoid abuse if (m_host.OwnerID == World.LandChannel.GetLandObject( - presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) + presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) { // Check for hostname , attempt to make a hglink @@ -647,7 +647,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // agent must be over owners land to avoid abuse if (m_host.OwnerID == World.LandChannel.GetLandObject( - presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) + presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) { presence.ControllingClient.SendTeleportLocationStart(); World.RequestTeleportLocation(presence.ControllingClient, regionHandle, @@ -1164,7 +1164,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); - if (land.landData.OwnerID != m_host.ObjectOwner) + if (land.LandData.OwnerID != m_host.ObjectOwner) return; land.SetMediaUrl(url); @@ -1182,7 +1182,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); - if (land.landData.OwnerID != m_host.ObjectOwner) + if (land.LandData.OwnerID != m_host.ObjectOwner) { OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function"); return; @@ -1192,7 +1192,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IVoiceModule voiceModule = World.RequestModuleInterface(); if (voiceModule != null) - voiceModule.setLandSIPAddress(SIPAddress,land.landData.GlobalID); + voiceModule.setLandSIPAddress(SIPAddress,land.LandData.GlobalID); else OSSLError("osSetParcelSIPAddress: No voice module enabled for this land"); -- cgit v1.1