aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorMelanie2009-10-22 07:12:10 +0100
committerMelanie2009-10-22 07:12:10 +0100
commitc4969d47d9bbc22b37054451cd31451ca8d8c78a (patch)
tree788e3b034254bcf068ca950ee97a78b6aa07b386 /OpenSim/Region/ScriptEngine/Shared/Api
parentMerge branch 'master' into vehicles (diff)
parentRemove the "mel_t" from version string (diff)
downloadopensim-SC_OLD-c4969d47d9bbc22b37054451cd31451ca8d8c78a.zip
opensim-SC_OLD-c4969d47d9bbc22b37054451cd31451ca8d8c78a.tar.gz
opensim-SC_OLD-c4969d47d9bbc22b37054451cd31451ca8d8c78a.tar.bz2
opensim-SC_OLD-c4969d47d9bbc22b37054451cd31451ca8d8c78a.tar.xz
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs137
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs4
2 files changed, 67 insertions, 74 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 7c176bb..11f255f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -137,13 +137,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
137 return lease; 137 return lease;
138 } 138 }
139 139
140 protected virtual void ConditionalScriptSleep(int delay)
141 {
142 // Uncomment to get SL compatibility!
143 //
144 // ScriptSleep(delay);
145 }
146
147 protected virtual void ScriptSleep(int delay) 140 protected virtual void ScriptSleep(int delay)
148 { 141 {
149 delay = (int)((float)delay * m_ScriptDelayFactor); 142 delay = (int)((float)delay * m_ScriptDelayFactor);
@@ -1686,7 +1679,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1686 { 1679 {
1687 m_host.AddScriptLPS(1); 1680 m_host.AddScriptLPS(1);
1688 SetTexture(m_host, texture, face); 1681 SetTexture(m_host, texture, face);
1689 ConditionalScriptSleep(200); 1682 ScriptSleep(200);
1690 } 1683 }
1691 1684
1692 public void llSetLinkTexture(int linknumber, string texture, int face) 1685 public void llSetLinkTexture(int linknumber, string texture, int face)
@@ -1698,7 +1691,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1698 foreach (SceneObjectPart part in parts) 1691 foreach (SceneObjectPart part in parts)
1699 SetTexture(part, texture, face); 1692 SetTexture(part, texture, face);
1700 1693
1701 ConditionalScriptSleep(200); 1694 ScriptSleep(200);
1702 } 1695 }
1703 1696
1704 protected void SetTexture(SceneObjectPart part, string texture, int face) 1697 protected void SetTexture(SceneObjectPart part, string texture, int face)
@@ -1743,7 +1736,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1743 m_host.AddScriptLPS(1); 1736 m_host.AddScriptLPS(1);
1744 1737
1745 ScaleTexture(m_host, u, v, face); 1738 ScaleTexture(m_host, u, v, face);
1746 ConditionalScriptSleep(200); 1739 ScriptSleep(200);
1747 } 1740 }
1748 1741
1749 protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) 1742 protected void ScaleTexture(SceneObjectPart part, double u, double v, int face)
@@ -1779,7 +1772,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1779 { 1772 {
1780 m_host.AddScriptLPS(1); 1773 m_host.AddScriptLPS(1);
1781 OffsetTexture(m_host, u, v, face); 1774 OffsetTexture(m_host, u, v, face);
1782 ConditionalScriptSleep(200); 1775 ScriptSleep(200);
1783 } 1776 }
1784 1777
1785 protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) 1778 protected void OffsetTexture(SceneObjectPart part, double u, double v, int face)
@@ -1815,7 +1808,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1815 { 1808 {
1816 m_host.AddScriptLPS(1); 1809 m_host.AddScriptLPS(1);
1817 RotateTexture(m_host, rotation, face); 1810 RotateTexture(m_host, rotation, face);
1818 ConditionalScriptSleep(200); 1811 ScriptSleep(200);
1819 } 1812 }
1820 1813
1821 protected void RotateTexture(SceneObjectPart part, double rotation, int face) 1814 protected void RotateTexture(SceneObjectPart part, double rotation, int face)
@@ -2289,7 +2282,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2289 { 2282 {
2290 m_host.AddScriptLPS(1); 2283 m_host.AddScriptLPS(1);
2291 m_host.PreloadSound(sound); 2284 m_host.PreloadSound(sound);
2292 ConditionalScriptSleep(1000); 2285 ScriptSleep(1000);
2293 } 2286 }
2294 2287
2295 /// <summary> 2288 /// <summary>
@@ -2581,28 +2574,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2581 { 2574 {
2582 m_host.AddScriptLPS(1); 2575 m_host.AddScriptLPS(1);
2583 Deprecated("llMakeExplosion"); 2576 Deprecated("llMakeExplosion");
2584 ConditionalScriptSleep(100); 2577 ScriptSleep(100);
2585 } 2578 }
2586 2579
2587 public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset) 2580 public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset)
2588 { 2581 {
2589 m_host.AddScriptLPS(1); 2582 m_host.AddScriptLPS(1);
2590 Deprecated("llMakeFountain"); 2583 Deprecated("llMakeFountain");
2591 ConditionalScriptSleep(100); 2584 ScriptSleep(100);
2592 } 2585 }
2593 2586
2594 public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) 2587 public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset)
2595 { 2588 {
2596 m_host.AddScriptLPS(1); 2589 m_host.AddScriptLPS(1);
2597 Deprecated("llMakeSmoke"); 2590 Deprecated("llMakeSmoke");
2598 ConditionalScriptSleep(100); 2591 ScriptSleep(100);
2599 } 2592 }
2600 2593
2601 public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) 2594 public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset)
2602 { 2595 {
2603 m_host.AddScriptLPS(1); 2596 m_host.AddScriptLPS(1);
2604 Deprecated("llMakeFire"); 2597 Deprecated("llMakeFire");
2605 ConditionalScriptSleep(100); 2598 ScriptSleep(100);
2606 } 2599 }
2607 2600
2608 public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) 2601 public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
@@ -2661,7 +2654,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2661 } 2654 }
2662 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) 2655 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)
2663 ScriptSleep((int)((groupmass * velmag) / 10)); 2656 ScriptSleep((int)((groupmass * velmag) / 10));
2664 ConditionalScriptSleep(100); 2657 ScriptSleep(100);
2665 return; 2658 return;
2666 } 2659 }
2667 } 2660 }
@@ -2881,7 +2874,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2881 { 2874 {
2882 m_host.AddScriptLPS(1); 2875 m_host.AddScriptLPS(1);
2883 2876
2884 return m_host.ObjectOwner.ToString(); 2877 return m_host.OwnerID.ToString();
2885 } 2878 }
2886 2879
2887 public void llInstantMessage(string user, string message) 2880 public void llInstantMessage(string user, string message)
@@ -2947,7 +2940,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2947 } 2940 }
2948 2941
2949 emailModule.SendEmail(m_host.UUID, address, subject, message); 2942 emailModule.SendEmail(m_host.UUID, address, subject, message);
2950 ConditionalScriptSleep(20000); 2943 ScriptSleep(20000);
2951 } 2944 }
2952 2945
2953 public void llGetNextEmail(string address, string subject) 2946 public void llGetNextEmail(string address, string subject)
@@ -3751,7 +3744,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3751 // destination is an object 3744 // destination is an object
3752 World.MoveTaskInventoryItem(destId, m_host, objId); 3745 World.MoveTaskInventoryItem(destId, m_host, objId);
3753 } 3746 }
3754 ConditionalScriptSleep(3000); 3747 ScriptSleep(3000);
3755 } 3748 }
3756 3749
3757 public void llRemoveInventory(string name) 3750 public void llRemoveInventory(string name)
@@ -3852,7 +3845,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3852 AsyncCommands. 3845 AsyncCommands.
3853 DataserverPlugin.DataserverReply(rq.ToString(), reply); 3846 DataserverPlugin.DataserverReply(rq.ToString(), reply);
3854 3847
3855 ConditionalScriptSleep(100); 3848 ScriptSleep(100);
3856 return tid.ToString(); 3849 return tid.ToString();
3857 } 3850 }
3858 3851
@@ -3890,11 +3883,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3890 reply); 3883 reply);
3891 }); 3884 });
3892 3885
3893 ConditionalScriptSleep(1000); 3886 ScriptSleep(1000);
3894 return tid.ToString(); 3887 return tid.ToString();
3895 } 3888 }
3896 } 3889 }
3897 ConditionalScriptSleep(1000); 3890 ScriptSleep(1000);
3898 return String.Empty; 3891 return String.Empty;
3899 } 3892 }
3900 3893
@@ -3922,7 +3915,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3922 } 3915 }
3923 } 3916 }
3924 } 3917 }
3925 ConditionalScriptSleep(5000); 3918 ScriptSleep(5000);
3926 } 3919 }
3927 3920
3928 public void llTextBox(string avatar, string message, int chat_channel) 3921 public void llTextBox(string avatar, string message, int chat_channel)
@@ -4666,7 +4659,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4666 { 4659 {
4667 index = src.Length + index; 4660 index = src.Length + index;
4668 } 4661 }
4669 if (index >= src.Length) 4662 if (index >= src.Length || index < 0)
4670 { 4663 {
4671 return 0; 4664 return 0;
4672 } 4665 }
@@ -4691,7 +4684,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4691 { 4684 {
4692 index = src.Length + index; 4685 index = src.Length + index;
4693 } 4686 }
4694 if (index >= src.Length) 4687 if (index >= src.Length || index < 0)
4695 { 4688 {
4696 return 0.0; 4689 return 0.0;
4697 } 4690 }
@@ -4718,7 +4711,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4718 { 4711 {
4719 index = src.Length + index; 4712 index = src.Length + index;
4720 } 4713 }
4721 if (index >= src.Length) 4714 if (index >= src.Length || index < 0)
4722 { 4715 {
4723 return String.Empty; 4716 return String.Empty;
4724 } 4717 }
@@ -4732,7 +4725,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4732 { 4725 {
4733 index = src.Length + index; 4726 index = src.Length + index;
4734 } 4727 }
4735 if (index >= src.Length) 4728 if (index >= src.Length || index < 0)
4736 { 4729 {
4737 return ""; 4730 return "";
4738 } 4731 }
@@ -4746,7 +4739,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4746 { 4739 {
4747 index = src.Length + index; 4740 index = src.Length + index;
4748 } 4741 }
4749 if (index >= src.Length) 4742 if (index >= src.Length || index < 0)
4750 { 4743 {
4751 return new LSL_Vector(0, 0, 0); 4744 return new LSL_Vector(0, 0, 0);
4752 } 4745 }
@@ -4767,7 +4760,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4767 { 4760 {
4768 index = src.Length + index; 4761 index = src.Length + index;
4769 } 4762 }
4770 if (index >= src.Length) 4763 if (index >= src.Length || index < 0)
4771 { 4764 {
4772 return new LSL_Rotation(0, 0, 0, 1); 4765 return new LSL_Rotation(0, 0, 0, 1);
4773 } 4766 }
@@ -5382,7 +5375,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5382 { 5375 {
5383 m_host.AddScriptLPS(1); 5376 m_host.AddScriptLPS(1);
5384 m_host.AdjustSoundGain(volume); 5377 m_host.AdjustSoundGain(volume);
5385 ConditionalScriptSleep(100); 5378 ScriptSleep(100);
5386 } 5379 }
5387 5380
5388 public void llSetSoundQueueing(int queue) 5381 public void llSetSoundQueueing(int queue)
@@ -5465,7 +5458,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5465 World.TeleportClientHome(agentId, presence.ControllingClient); 5458 World.TeleportClientHome(agentId, presence.ControllingClient);
5466 } 5459 }
5467 } 5460 }
5468 ConditionalScriptSleep(5000); 5461 ScriptSleep(5000);
5469 } 5462 }
5470 5463
5471 public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers) 5464 public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers)
@@ -5640,7 +5633,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5640 ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); 5633 ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y);
5641 if (parcel != null) 5634 if (parcel != null)
5642 { 5635 {
5643 if (m_host.ObjectOwner == parcel.LandData.OwnerID || 5636 if (m_host.OwnerID == parcel.LandData.OwnerID ||
5644 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.LandData.GroupID 5637 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.LandData.GroupID
5645 && parcel.LandData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID)) 5638 && parcel.LandData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID))
5646 { 5639 {
@@ -5850,7 +5843,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5850 5843
5851 for (int i = 0; i < rules.Length; i += 2) 5844 for (int i = 0; i < rules.Length; i += 2)
5852 { 5845 {
5853 switch ((int)rules.Data[i]) 5846 switch (Convert.ToInt32(rules.Data[i]))
5854 { 5847 {
5855 case (int)ScriptBaseClass.PSYS_PART_FLAGS: 5848 case (int)ScriptBaseClass.PSYS_PART_FLAGS:
5856 prules.PartDataFlags = (Primitive.ParticleSystem.ParticleDataFlags)(uint)rules.GetLSLIntegerItem(i + 1); 5849 prules.PartDataFlags = (Primitive.ParticleSystem.ParticleDataFlags)(uint)rules.GetLSLIntegerItem(i + 1);
@@ -6157,7 +6150,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6157 land.ParcelAccessList.Add(entry); 6150 land.ParcelAccessList.Add(entry);
6158 } 6151 }
6159 } 6152 }
6160 ConditionalScriptSleep(100); 6153 ScriptSleep(100);
6161 } 6154 }
6162 6155
6163 public void llSetTouchText(string text) 6156 public void llSetTouchText(string text)
@@ -6254,7 +6247,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6254 av, m_host.Name, m_host.UUID, m_host.OwnerID, 6247 av, m_host.Name, m_host.UUID, m_host.OwnerID,
6255 message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); 6248 message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts);
6256 6249
6257 ConditionalScriptSleep(1000); 6250 ScriptSleep(1000);
6258 } 6251 }
6259 6252
6260 public void llVolumeDetect(int detect) 6253 public void llVolumeDetect(int detect)
@@ -6279,7 +6272,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6279 m_host.AddScriptLPS(1); 6272 m_host.AddScriptLPS(1);
6280 // Report an error as it does in SL 6273 // Report an error as it does in SL
6281 ShoutError("Deprecated. Please use llRemoteLoadScriptPin instead."); 6274 ShoutError("Deprecated. Please use llRemoteLoadScriptPin instead.");
6282 ConditionalScriptSleep(3000); 6275 ScriptSleep(3000);
6283 } 6276 }
6284 6277
6285 public void llSetRemoteScriptAccessPin(int pin) 6278 public void llSetRemoteScriptAccessPin(int pin)
@@ -6365,14 +6358,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6365 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams("remote_data", resobj, 6358 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams("remote_data", resobj,
6366 new DetectParams[0])); 6359 new DetectParams[0]));
6367 } 6360 }
6368 ConditionalScriptSleep(1000); 6361 ScriptSleep(1000);
6369 } 6362 }
6370 6363
6371 public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata) 6364 public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata)
6372 { 6365 {
6373 m_host.AddScriptLPS(1); 6366 m_host.AddScriptLPS(1);
6374 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 6367 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
6375 ConditionalScriptSleep(3000); 6368 ScriptSleep(3000);
6376 return (xmlrpcMod.SendRemoteData(m_localID, m_itemID, channel, dest, idata, sdata)).ToString(); 6369 return (xmlrpcMod.SendRemoteData(m_localID, m_itemID, channel, dest, idata, sdata)).ToString();
6377 } 6370 }
6378 6371
@@ -6381,7 +6374,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6381 m_host.AddScriptLPS(1); 6374 m_host.AddScriptLPS(1);
6382 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 6375 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
6383 xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); 6376 xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata);
6384 ConditionalScriptSleep(3000); 6377 ScriptSleep(3000);
6385 } 6378 }
6386 6379
6387 public void llCloseRemoteDataChannel(string channel) 6380 public void llCloseRemoteDataChannel(string channel)
@@ -6389,7 +6382,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6389 m_host.AddScriptLPS(1); 6382 m_host.AddScriptLPS(1);
6390 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 6383 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
6391 xmlrpcMod.CloseXMLRPCChannel((UUID)channel); 6384 xmlrpcMod.CloseXMLRPCChannel((UUID)channel);
6392 ConditionalScriptSleep(1000); 6385 ScriptSleep(1000);
6393 } 6386 }
6394 6387
6395 public LSL_String llMD5String(string src, int nonce) 6388 public LSL_String llMD5String(string src, int nonce)
@@ -7117,7 +7110,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7117 { 7110 {
7118 m_host.AddScriptLPS(1); 7111 m_host.AddScriptLPS(1);
7119 Deprecated("llXorBase64Strings"); 7112 Deprecated("llXorBase64Strings");
7120 ConditionalScriptSleep(300); 7113 ScriptSleep(300);
7121 return String.Empty; 7114 return String.Empty;
7122 } 7115 }
7123 7116
@@ -7160,12 +7153,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7160 7153
7161 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 7154 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
7162 7155
7163 if (land.LandData.OwnerID != m_host.ObjectOwner) 7156 if (land.LandData.OwnerID != m_host.OwnerID)
7164 return; 7157 return;
7165 7158
7166 land.SetMusicUrl(url); 7159 land.SetMusicUrl(url);
7167 7160
7168 ConditionalScriptSleep(2000); 7161 ScriptSleep(2000);
7169 } 7162 }
7170 7163
7171 public LSL_Vector llGetRootPosition() 7164 public LSL_Vector llGetRootPosition()
@@ -7218,7 +7211,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7218 public LSL_String llGetCreator() 7211 public LSL_String llGetCreator()
7219 { 7212 {
7220 m_host.AddScriptLPS(1); 7213 m_host.AddScriptLPS(1);
7221 return m_host.ObjectCreator.ToString(); 7214 return m_host.CreatorID.ToString();
7222 } 7215 }
7223 7216
7224 public LSL_String llGetTimestamp() 7217 public LSL_String llGetTimestamp()
@@ -8210,7 +8203,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8210 case 5: // DATA_SIM_POS 8203 case 5: // DATA_SIM_POS
8211 if (info == null) 8204 if (info == null)
8212 { 8205 {
8213 ConditionalScriptSleep(1000); 8206 ScriptSleep(1000);
8214 return UUID.Zero.ToString(); 8207 return UUID.Zero.ToString();
8215 } 8208 }
8216 reply = new LSL_Vector( 8209 reply = new LSL_Vector(
@@ -8227,7 +8220,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8227 case 7: // DATA_SIM_RATING 8220 case 7: // DATA_SIM_RATING
8228 if (info == null) 8221 if (info == null)
8229 { 8222 {
8230 ConditionalScriptSleep(1000); 8223 ScriptSleep(1000);
8231 return UUID.Zero.ToString(); 8224 return UUID.Zero.ToString();
8232 } 8225 }
8233 int access = info.Maturity; 8226 int access = info.Maturity;
@@ -8246,7 +8239,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8246 reply = "OpenSim"; 8239 reply = "OpenSim";
8247 break; 8240 break;
8248 default: 8241 default:
8249 ConditionalScriptSleep(1000); 8242 ScriptSleep(1000);
8250 return UUID.Zero.ToString(); // Raise no event 8243 return UUID.Zero.ToString(); // Raise no event
8251 } 8244 }
8252 UUID rq = UUID.Random(); 8245 UUID rq = UUID.Random();
@@ -8257,7 +8250,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8257 AsyncCommands. 8250 AsyncCommands.
8258 DataserverPlugin.DataserverReply(rq.ToString(), reply); 8251 DataserverPlugin.DataserverReply(rq.ToString(), reply);
8259 8252
8260 ConditionalScriptSleep(1000); 8253 ScriptSleep(1000);
8261 return tid.ToString(); 8254 return tid.ToString();
8262 } 8255 }
8263 catch(Exception) 8256 catch(Exception)
@@ -8399,9 +8392,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8399 IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); 8392 IDialogModule dm = World.RequestModuleInterface<IDialogModule>();
8400 if (null != dm) 8393 if (null != dm)
8401 dm.SendUrlToUser( 8394 dm.SendUrlToUser(
8402 new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, url); 8395 new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.OwnerID, false, message, url);
8403 8396
8404 ConditionalScriptSleep(10000); 8397 ScriptSleep(10000);
8405 } 8398 }
8406 8399
8407 public void llParcelMediaCommandList(LSL_List commandList) 8400 public void llParcelMediaCommandList(LSL_List commandList)
@@ -8414,7 +8407,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8414 // according to the docs, this command only works if script owner and land owner are the same 8407 // according to the docs, this command only works if script owner and land owner are the same
8415 // lets add estate owners and gods, too, and use the generic permission check. 8408 // lets add estate owners and gods, too, and use the generic permission check.
8416 ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 8409 ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
8417 if (!World.Permissions.CanEditParcel(m_host.ObjectOwner, landObject)) return; 8410 if (!World.Permissions.CanEditParcel(m_host.OwnerID, landObject)) return;
8418 8411
8419 bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? 8412 bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)?
8420 byte loop = 0; 8413 byte loop = 0;
@@ -8637,7 +8630,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8637 time); 8630 time);
8638 } 8631 }
8639 } 8632 }
8640 ConditionalScriptSleep(2000); 8633 ScriptSleep(2000);
8641 } 8634 }
8642 8635
8643 public LSL_List llParcelMediaQuery(LSL_List aList) 8636 public LSL_List llParcelMediaQuery(LSL_List aList)
@@ -8675,7 +8668,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8675 8668
8676 } 8669 }
8677 } 8670 }
8678 ConditionalScriptSleep(2000); 8671 ScriptSleep(2000);
8679 return list; 8672 return list;
8680 } 8673 }
8681 8674
@@ -8684,7 +8677,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8684 m_host.AddScriptLPS(1); 8677 m_host.AddScriptLPS(1);
8685 Int64 tmp = 0; 8678 Int64 tmp = 0;
8686 Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); 8679 Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp);
8687 ConditionalScriptSleep(1000); 8680 ScriptSleep(1000);
8688 return Convert.ToInt32(tmp); 8681 return Convert.ToInt32(tmp);
8689 } 8682 }
8690 8683
@@ -8788,7 +8781,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8788 public void llSetPrimURL(string url) 8781 public void llSetPrimURL(string url)
8789 { 8782 {
8790 m_host.AddScriptLPS(1); 8783 m_host.AddScriptLPS(1);
8791 ConditionalScriptSleep(2000); 8784 ScriptSleep(2000);
8792 } 8785 }
8793 8786
8794 /// <summary> 8787 /// <summary>
@@ -8799,7 +8792,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8799 { 8792 {
8800 m_host.AddScriptLPS(1); 8793 m_host.AddScriptLPS(1);
8801 ShoutError("llRefreshPrimURL - not yet supported"); 8794 ShoutError("llRefreshPrimURL - not yet supported");
8802 ConditionalScriptSleep(20000); 8795 ScriptSleep(20000);
8803 } 8796 }
8804 8797
8805 public LSL_String llEscapeURL(string url) 8798 public LSL_String llEscapeURL(string url)
@@ -8841,7 +8834,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8841 new Vector3((float)pos.x, (float)pos.y, (float)pos.z), 8834 new Vector3((float)pos.x, (float)pos.y, (float)pos.z),
8842 new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z)); 8835 new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z));
8843 } 8836 }
8844 ConditionalScriptSleep(1000); 8837 ScriptSleep(1000);
8845 } 8838 }
8846 8839
8847 public void llAddToLandBanList(string avatar, double hours) 8840 public void llAddToLandBanList(string avatar, double hours)
@@ -8860,7 +8853,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8860 land.ParcelAccessList.Add(entry); 8853 land.ParcelAccessList.Add(entry);
8861 } 8854 }
8862 } 8855 }
8863 ConditionalScriptSleep(100); 8856 ScriptSleep(100);
8864 } 8857 }
8865 8858
8866 public void llRemoveFromLandPassList(string avatar) 8859 public void llRemoveFromLandPassList(string avatar)
@@ -8882,7 +8875,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8882 } 8875 }
8883 } 8876 }
8884 } 8877 }
8885 ConditionalScriptSleep(100); 8878 ScriptSleep(100);
8886 } 8879 }
8887 8880
8888 public void llRemoveFromLandBanList(string avatar) 8881 public void llRemoveFromLandBanList(string avatar)
@@ -8904,7 +8897,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8904 } 8897 }
8905 } 8898 }
8906 } 8899 }
8907 ConditionalScriptSleep(100); 8900 ScriptSleep(100);
8908 } 8901 }
8909 8902
8910 public void llSetCameraParams(LSL_List rules) 8903 public void llSetCameraParams(LSL_List rules)
@@ -9084,9 +9077,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9084 Vector3 velocity = m_host.Velocity; 9077 Vector3 velocity = m_host.Velocity;
9085 Quaternion rotation = m_host.RotationOffset; 9078 Quaternion rotation = m_host.RotationOffset;
9086 string ownerName = String.Empty; 9079 string ownerName = String.Empty;
9087 ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); 9080 ScenePresence scenePresence = World.GetScenePresence(m_host.OwnerID);
9088 if (scenePresence == null) 9081 if (scenePresence == null)
9089 ownerName = resolveName(m_host.ObjectOwner); 9082 ownerName = resolveName(m_host.OwnerID);
9090 else 9083 else
9091 ownerName = scenePresence.Name; 9084 ownerName = scenePresence.Name;
9092 9085
@@ -9111,7 +9104,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9111 httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z); 9104 httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z);
9112 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); 9105 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);
9113 httpHeaders["X-SecondLife-Owner-Name"] = ownerName; 9106 httpHeaders["X-SecondLife-Owner-Name"] = ownerName;
9114 httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); 9107 httpHeaders["X-SecondLife-Owner-Key"] = m_host.OwnerID.ToString();
9115 string userAgent = config.Configs["Network"].GetString("user_agent", null); 9108 string userAgent = config.Configs["Network"].GetString("user_agent", null);
9116 if (userAgent != null) 9109 if (userAgent != null)
9117 httpHeaders["User-Agent"] = userAgent; 9110 httpHeaders["User-Agent"] = userAgent;
@@ -9166,7 +9159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9166 } 9159 }
9167 } 9160 }
9168 } 9161 }
9169 ConditionalScriptSleep(100); 9162 ScriptSleep(100);
9170 } 9163 }
9171 9164
9172 public void llResetLandPassList() 9165 public void llResetLandPassList()
@@ -9183,7 +9176,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9183 } 9176 }
9184 } 9177 }
9185 } 9178 }
9186 ConditionalScriptSleep(100); 9179 ScriptSleep(100);
9187 } 9180 }
9188 9181
9189 public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) 9182 public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide)
@@ -9262,7 +9255,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9262 ret.Add(detectedParams.Value); 9255 ret.Add(detectedParams.Value);
9263 } 9256 }
9264 } 9257 }
9265 ConditionalScriptSleep(2000); 9258 ScriptSleep(2000);
9266 return ret; 9259 return ret;
9267 } 9260 }
9268 9261
@@ -9520,7 +9513,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9520 AsyncCommands. 9513 AsyncCommands.
9521 DataserverPlugin.DataserverReply(assetID.ToString(), 9514 DataserverPlugin.DataserverReply(assetID.ToString(),
9522 NotecardCache.GetLines(assetID).ToString()); 9515 NotecardCache.GetLines(assetID).ToString());
9523 ConditionalScriptSleep(100); 9516 ScriptSleep(100);
9524 return tid.ToString(); 9517 return tid.ToString();
9525 } 9518 }
9526 9519
@@ -9542,7 +9535,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9542 NotecardCache.GetLines(id).ToString()); 9535 NotecardCache.GetLines(id).ToString());
9543 }); 9536 });
9544 9537
9545 ConditionalScriptSleep(100); 9538 ScriptSleep(100);
9546 return tid.ToString(); 9539 return tid.ToString();
9547 } 9540 }
9548 9541
@@ -9581,7 +9574,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9581 { 9574 {
9582 AsyncCommands.DataserverPlugin.DataserverReply(assetID.ToString(), 9575 AsyncCommands.DataserverPlugin.DataserverReply(assetID.ToString(),
9583 NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); 9576 NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax));
9584 ConditionalScriptSleep(100); 9577 ScriptSleep(100);
9585 return tid.ToString(); 9578 return tid.ToString();
9586 } 9579 }
9587 9580
@@ -9602,7 +9595,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9602 NotecardCache.GetLine(id, line, m_notecardLineReadCharsMax)); 9595 NotecardCache.GetLine(id, line, m_notecardLineReadCharsMax));
9603 }); 9596 });
9604 9597
9605 ConditionalScriptSleep(100); 9598 ScriptSleep(100);
9606 return tid.ToString(); 9599 return tid.ToString();
9607 } 9600 }
9608 } 9601 }
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;