aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-15 16:35:27 -0700
committerJohn Hurliman2009-10-15 16:35:27 -0700
commit4b75353cbf50de3cae4c48ec90b55f30c1612c92 (patch)
tree2b5bf30d2a0c8558437f757e28081cb60a8b5dfc /OpenSim/Region/ScriptEngine
parentReplaced the update lists with a priority queue implementation in LLClientView (diff)
downloadopensim-SC_OLD-4b75353cbf50de3cae4c48ec90b55f30c1612c92.zip
opensim-SC_OLD-4b75353cbf50de3cae4c48ec90b55f30c1612c92.tar.gz
opensim-SC_OLD-4b75353cbf50de3cae4c48ec90b55f30c1612c92.tar.bz2
opensim-SC_OLD-4b75353cbf50de3cae4c48ec90b55f30c1612c92.tar.xz
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
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs18
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs4
2 files changed, 11 insertions, 11 deletions
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
2875 { 2875 {
2876 m_host.AddScriptLPS(1); 2876 m_host.AddScriptLPS(1);
2877 2877
2878 return m_host.ObjectOwner.ToString(); 2878 return m_host.OwnerID.ToString();
2879 } 2879 }
2880 2880
2881 public void llInstantMessage(string user, string message) 2881 public void llInstantMessage(string user, string message)
@@ -5634,7 +5634,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5634 ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); 5634 ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y);
5635 if (parcel != null) 5635 if (parcel != null)
5636 { 5636 {
5637 if (m_host.ObjectOwner == parcel.LandData.OwnerID || 5637 if (m_host.OwnerID == parcel.LandData.OwnerID ||
5638 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.LandData.GroupID 5638 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.LandData.GroupID
5639 && parcel.LandData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID)) 5639 && parcel.LandData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID))
5640 { 5640 {
@@ -7157,7 +7157,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7157 7157
7158 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 7158 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
7159 7159
7160 if (land.LandData.OwnerID != m_host.ObjectOwner) 7160 if (land.LandData.OwnerID != m_host.OwnerID)
7161 return; 7161 return;
7162 7162
7163 land.SetMusicUrl(url); 7163 land.SetMusicUrl(url);
@@ -7215,7 +7215,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7215 public LSL_String llGetCreator() 7215 public LSL_String llGetCreator()
7216 { 7216 {
7217 m_host.AddScriptLPS(1); 7217 m_host.AddScriptLPS(1);
7218 return m_host.ObjectCreator.ToString(); 7218 return m_host.CreatorID.ToString();
7219 } 7219 }
7220 7220
7221 public LSL_String llGetTimestamp() 7221 public LSL_String llGetTimestamp()
@@ -8396,7 +8396,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8396 IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); 8396 IDialogModule dm = World.RequestModuleInterface<IDialogModule>();
8397 if (null != dm) 8397 if (null != dm)
8398 dm.SendUrlToUser( 8398 dm.SendUrlToUser(
8399 new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, url); 8399 new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.OwnerID, false, message, url);
8400 8400
8401 ConditionalScriptSleep(10000); 8401 ConditionalScriptSleep(10000);
8402 } 8402 }
@@ -8411,7 +8411,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8411 // according to the docs, this command only works if script owner and land owner are the same 8411 // according to the docs, this command only works if script owner and land owner are the same
8412 // lets add estate owners and gods, too, and use the generic permission check. 8412 // lets add estate owners and gods, too, and use the generic permission check.
8413 ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 8413 ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
8414 if (!World.Permissions.CanEditParcel(m_host.ObjectOwner, landObject)) return; 8414 if (!World.Permissions.CanEditParcel(m_host.OwnerID, landObject)) return;
8415 8415
8416 bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? 8416 bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)?
8417 byte loop = 0; 8417 byte loop = 0;
@@ -9081,9 +9081,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9081 Vector3 velocity = m_host.Velocity; 9081 Vector3 velocity = m_host.Velocity;
9082 Quaternion rotation = m_host.RotationOffset; 9082 Quaternion rotation = m_host.RotationOffset;
9083 string ownerName = String.Empty; 9083 string ownerName = String.Empty;
9084 ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); 9084 ScenePresence scenePresence = World.GetScenePresence(m_host.OwnerID);
9085 if (scenePresence == null) 9085 if (scenePresence == null)
9086 ownerName = resolveName(m_host.ObjectOwner); 9086 ownerName = resolveName(m_host.OwnerID);
9087 else 9087 else
9088 ownerName = scenePresence.Name; 9088 ownerName = scenePresence.Name;
9089 9089
@@ -9108,7 +9108,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9108 httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z); 9108 httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z);
9109 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); 9109 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);
9110 httpHeaders["X-SecondLife-Owner-Name"] = ownerName; 9110 httpHeaders["X-SecondLife-Owner-Name"] = ownerName;
9111 httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); 9111 httpHeaders["X-SecondLife-Owner-Key"] = m_host.OwnerID.ToString();
9112 string userAgent = config.Configs["Network"].GetString("user_agent", null); 9112 string userAgent = config.Configs["Network"].GetString("user_agent", null);
9113 if (userAgent != null) 9113 if (userAgent != null)
9114 httpHeaders["User-Agent"] = userAgent; 9114 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
1164 ILandObject land 1164 ILandObject land
1165 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 1165 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
1166 1166
1167 if (land.LandData.OwnerID != m_host.ObjectOwner) 1167 if (land.LandData.OwnerID != m_host.OwnerID)
1168 return; 1168 return;
1169 1169
1170 land.SetMediaUrl(url); 1170 land.SetMediaUrl(url);
@@ -1182,7 +1182,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1182 ILandObject land 1182 ILandObject land
1183 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 1183 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
1184 1184
1185 if (land.LandData.OwnerID != m_host.ObjectOwner) 1185 if (land.LandData.OwnerID != m_host.OwnerID)
1186 { 1186 {
1187 OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function"); 1187 OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function");
1188 return; 1188 return;