aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorDiva Canto2011-05-26 15:52:34 -0700
committerDiva Canto2011-05-26 15:52:34 -0700
commitb17afe43c4f72bace2bd991d4cac83837acb9a67 (patch)
treee23aae27316b018065890b77028dfa4706981d5e /OpenSim/Region/ScriptEngine
parentHG IM in grid mode working fairly well. Unknown target user references looked... (diff)
parentimprove help information for "appearance show" (diff)
downloadopensim-SC-b17afe43c4f72bace2bd991d4cac83837acb9a67.zip
opensim-SC-b17afe43c4f72bace2bd991d4cac83837acb9a67.tar.gz
opensim-SC-b17afe43c4f72bace2bd991d4cac83837acb9a67.tar.bz2
opensim-SC-b17afe43c4f72bace2bd991d4cac83837acb9a67.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs117
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs13
2 files changed, 99 insertions, 31 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 1cf03b8..ce7d97c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3316,12 +3316,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3316 return m_ScriptEngine.GetStartParameter(m_itemID); 3316 return m_ScriptEngine.GetStartParameter(m_itemID);
3317 } 3317 }
3318 3318
3319 public void llGodLikeRezObject(string inventory, LSL_Vector pos)
3320 {
3321 m_host.AddScriptLPS(1);
3322 NotImplemented("llGodLikeRezObject");
3323 }
3324
3325 public void llRequestPermissions(string agent, int perm) 3319 public void llRequestPermissions(string agent, int perm)
3326 { 3320 {
3327 UUID agentID = new UUID(); 3321 UUID agentID = new UUID();
@@ -3870,9 +3864,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3870 throw new Exception(String.Format("The inventory object '{0}' could not be found", inventory)); 3864 throw new Exception(String.Format("The inventory object '{0}' could not be found", inventory));
3871 } 3865 }
3872 3866
3873 // check if destination is an avatar 3867 // check if destination is an object
3874 if (World.GetScenePresence(destId) != null) 3868 if (World.GetSceneObjectPart(destId) != null)
3875 { 3869 {
3870 // destination is an object
3871 World.MoveTaskInventoryItem(destId, m_host, objId);
3872 }
3873 else
3874 {
3875 ScenePresence presence = World.GetScenePresence(destId);
3876
3877 if (presence == null)
3878 {
3879 UserAccount account =
3880 World.UserAccountService.GetUserAccount(
3881 World.RegionInfo.ScopeID,
3882 destId);
3883
3884 if (account == null)
3885 {
3886 llSay(0, "Can't find destination "+destId.ToString());
3887 return;
3888 }
3889 }
3876 // destination is an avatar 3890 // destination is an avatar
3877 InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId); 3891 InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId);
3878 3892
@@ -3893,16 +3907,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3893 m_host.AbsolutePosition.ToString(), 3907 m_host.AbsolutePosition.ToString(),
3894 agentItem.ID, true, m_host.AbsolutePosition, 3908 agentItem.ID, true, m_host.AbsolutePosition,
3895 bucket); 3909 bucket);
3896
3897 if (m_TransferModule != null) 3910 if (m_TransferModule != null)
3898 m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); 3911 m_TransferModule.SendInstantMessage(msg, delegate(bool success) {});
3912 ScriptSleep(3000);
3899 } 3913 }
3900 else
3901 {
3902 // destination is an object
3903 World.MoveTaskInventoryItem(destId, m_host, objId);
3904 }
3905 ScriptSleep(3000);
3906 } 3914 }
3907 3915
3908 public void llRemoveInventory(string name) 3916 public void llRemoveInventory(string name)
@@ -4189,12 +4197,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4189 m_host.CollisionSoundVolume = (float)impact_volume; 4197 m_host.CollisionSoundVolume = (float)impact_volume;
4190 } 4198 }
4191 4199
4192 public void llCollisionSprite(string impact_sprite)
4193 {
4194 m_host.AddScriptLPS(1);
4195 NotImplemented("llCollisionSprite");
4196 }
4197
4198 public LSL_String llGetAnimation(string id) 4200 public LSL_String llGetAnimation(string id)
4199 { 4201 {
4200 // This should only return a value if the avatar is in the same region 4202 // This should only return a value if the avatar is in the same region
@@ -5526,12 +5528,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5526 ScriptSleep(100); 5528 ScriptSleep(100);
5527 } 5529 }
5528 5530
5529 public void llSetSoundQueueing(int queue)
5530 {
5531 m_host.AddScriptLPS(1);
5532 NotImplemented("llSetSoundQueueing");
5533 }
5534
5535 public void llSetSoundRadius(double radius) 5531 public void llSetSoundRadius(double radius)
5536 { 5532 {
5537 m_host.AddScriptLPS(1); 5533 m_host.AddScriptLPS(1);
@@ -10312,6 +10308,73 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10312 10308
10313 return rq.ToString(); 10309 return rq.ToString();
10314 } 10310 }
10311
10312 #region Not Implemented
10313 //
10314 // Listing the unimplemented lsl functions here, please move
10315 // them from this region as they are completed
10316 //
10317 public void llCastRay(LSL_Vector start, LSL_Vector end, LSL_List options)
10318 {
10319 m_host.AddScriptLPS(1);
10320 NotImplemented("llCastRay");
10321
10322 }
10323
10324 public void llGetEnv(LSL_String name)
10325 {
10326 m_host.AddScriptLPS(1);
10327 NotImplemented("llGetEnv");
10328
10329 }
10330
10331 public void llGetSPMaxMemory()
10332 {
10333 m_host.AddScriptLPS(1);
10334 NotImplemented("llGetSPMaxMemory");
10335
10336 }
10337
10338 public void llGetUsedMemory()
10339 {
10340 m_host.AddScriptLPS(1);
10341 NotImplemented("llGetUsedMemory");
10342
10343 }
10344
10345 public void llRegionSayTo( LSL_Key target, LSL_Integer channel, LSL_String msg )
10346 {
10347 m_host.AddScriptLPS(1);
10348 NotImplemented("llRegionSayTo");
10349
10350 }
10351
10352 public void llScriptProfiler( LSL_Integer flags )
10353 {
10354 m_host.AddScriptLPS(1);
10355 NotImplemented("llScriptProfiler");
10356
10357 }
10358
10359 public void llSetSoundQueueing(int queue)
10360 {
10361 m_host.AddScriptLPS(1);
10362 NotImplemented("llSetSoundQueueing");
10363 }
10364
10365 public void llCollisionSprite(string impact_sprite)
10366 {
10367 m_host.AddScriptLPS(1);
10368 NotImplemented("llCollisionSprite");
10369 }
10370
10371 public void llGodLikeRezObject(string inventory, LSL_Vector pos)
10372 {
10373 m_host.AddScriptLPS(1);
10374 NotImplemented("llGodLikeRezObject");
10375 }
10376
10377 #endregion
10315 } 10378 }
10316 10379
10317 public class NotecardCache 10380 public class NotecardCache
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 97ab411..d253c6a 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -393,11 +393,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
393 return 0; 393 return 0;
394 } 394 }
395 395
396 public object DoMaintenance(object p) 396 public void SaveAllState()
397 { 397 {
398 object[] parms = (object[])p;
399 int sleepTime = (int)parms[0];
400
401 foreach (IScriptInstance inst in m_Scripts.Values) 398 foreach (IScriptInstance inst in m_Scripts.Values)
402 { 399 {
403 if (inst.EventTime() > m_EventLimit) 400 if (inst.EventTime() > m_EventLimit)
@@ -407,6 +404,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
407 inst.Start(); 404 inst.Start();
408 } 405 }
409 } 406 }
407 }
408
409 public object DoMaintenance(object p)
410 {
411 object[] parms = (object[])p;
412 int sleepTime = (int)parms[0];
413
414 SaveAllState();
410 415
411 System.Threading.Thread.Sleep(sleepTime); 416 System.Threading.Thread.Sleep(sleepTime);
412 417