From 4b75353cbf50de3cae4c48ec90b55f30c1612c92 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 15 Oct 2009 16:35:27 -0700 Subject: Object update prioritization by Jim Greensky of Intel Labs, part one. This implements a simple distance prioritizer based on initial agent positions. Re-prioritizing and more advanced priority algorithms will follow soon --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 18 +++++++++--------- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 4 ++-- 2 files changed, 11 insertions(+), 11 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 e10e612..57b14f7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2875,7 +2875,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); - return m_host.ObjectOwner.ToString(); + return m_host.OwnerID.ToString(); } public void llInstantMessage(string user, string message) @@ -5634,7 +5634,7 @@ 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 || + if (m_host.OwnerID == parcel.LandData.OwnerID || (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.LandData.GroupID && parcel.LandData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID)) { @@ -7157,7 +7157,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.OwnerID) return; land.SetMusicUrl(url); @@ -7215,7 +7215,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetCreator() { m_host.AddScriptLPS(1); - return m_host.ObjectCreator.ToString(); + return m_host.CreatorID.ToString(); } public LSL_String llGetTimestamp() @@ -8396,7 +8396,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IDialogModule dm = World.RequestModuleInterface(); if (null != dm) dm.SendUrlToUser( - new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, url); + new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.OwnerID, false, message, url); ConditionalScriptSleep(10000); } @@ -8411,7 +8411,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // according to the docs, this command only works if script owner and land owner are the same // lets add estate owners and gods, too, and use the generic permission check. ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); - if (!World.Permissions.CanEditParcel(m_host.ObjectOwner, landObject)) return; + if (!World.Permissions.CanEditParcel(m_host.OwnerID, landObject)) return; bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? byte loop = 0; @@ -9081,9 +9081,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Vector3 velocity = m_host.Velocity; Quaternion rotation = m_host.RotationOffset; string ownerName = String.Empty; - ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); + ScenePresence scenePresence = World.GetScenePresence(m_host.OwnerID); if (scenePresence == null) - ownerName = resolveName(m_host.ObjectOwner); + ownerName = resolveName(m_host.OwnerID); else ownerName = scenePresence.Name; @@ -9108,7 +9108,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z); httpHeaders["X-SecondLife-Local-Rotation"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000})", rotation.X, rotation.Y, rotation.Z, rotation.W); httpHeaders["X-SecondLife-Owner-Name"] = ownerName; - httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); + httpHeaders["X-SecondLife-Owner-Key"] = m_host.OwnerID.ToString(); string userAgent = config.Configs["Network"].GetString("user_agent", null); if (userAgent != null) httpHeaders["User-Agent"] = userAgent; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 4cb4b61..52396b6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -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.OwnerID) 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.OwnerID) { OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function"); return; -- cgit v1.1