aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs222
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs50
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs60
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs8
9 files changed, 194 insertions, 169 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5d72858..9a0c836 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -784,25 +784,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
784 public LSL_Float llCos(double f) 784 public LSL_Float llCos(double f)
785 { 785 {
786 m_host.AddScriptLPS(1); 786 m_host.AddScriptLPS(1);
787 return (double)Math.Cos(f); 787 return Math.Cos(f);
788 } 788 }
789 789
790 public LSL_Float llTan(double f) 790 public LSL_Float llTan(double f)
791 { 791 {
792 m_host.AddScriptLPS(1); 792 m_host.AddScriptLPS(1);
793 return (double)Math.Tan(f); 793 return Math.Tan(f);
794 } 794 }
795 795
796 public LSL_Float llAtan2(double x, double y) 796 public LSL_Float llAtan2(LSL_Float x, LSL_Float y)
797 { 797 {
798 m_host.AddScriptLPS(1); 798 m_host.AddScriptLPS(1);
799 return (double)Math.Atan2(x, y); 799 return Math.Atan2(x, y);
800 } 800 }
801 801
802 public LSL_Float llSqrt(double f) 802 public LSL_Float llSqrt(double f)
803 { 803 {
804 m_host.AddScriptLPS(1); 804 m_host.AddScriptLPS(1);
805 return (double)Math.Sqrt(f); 805 return Math.Sqrt(f);
806 } 806 }
807 807
808 public LSL_Float llPow(double fbase, double fexponent) 808 public LSL_Float llPow(double fbase, double fexponent)
@@ -811,7 +811,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
811 return (double)Math.Pow(fbase, fexponent); 811 return (double)Math.Pow(fbase, fexponent);
812 } 812 }
813 813
814 public LSL_Integer llAbs(int i) 814 public LSL_Integer llAbs(LSL_Integer i)
815 { 815 {
816 // changed to replicate LSL behaviour whereby minimum int value is returned untouched. 816 // changed to replicate LSL behaviour whereby minimum int value is returned untouched.
817 m_host.AddScriptLPS(1); 817 m_host.AddScriptLPS(1);
@@ -3069,7 +3069,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3069 m_host.ParentGroup.StopMoveToTarget(); 3069 m_host.ParentGroup.StopMoveToTarget();
3070 } 3070 }
3071 3071
3072 public void llApplyImpulse(LSL_Vector force, int local) 3072 public void llApplyImpulse(LSL_Vector force, LSL_Integer local)
3073 { 3073 {
3074 m_host.AddScriptLPS(1); 3074 m_host.AddScriptLPS(1);
3075 //No energy force yet 3075 //No energy force yet
@@ -3526,7 +3526,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3526 return src.ToLower(); 3526 return src.ToLower();
3527 } 3527 }
3528 3528
3529 public LSL_Integer llGiveMoney(string destination, int amount) 3529 public LSL_Integer llGiveMoney(LSL_Key destination, LSL_Integer amount)
3530 { 3530 {
3531 Util.FireAndForget(x => 3531 Util.FireAndForget(x =>
3532 { 3532 {
@@ -3785,7 +3785,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3785 return 100f * llGetMass(); 3785 return 100f * llGetMass();
3786 } 3786 }
3787 3787
3788 public void llCollisionFilter(string name, string id, int accept) 3788 public void llCollisionFilter(LSL_String name, LSL_Key id, LSL_Integer accept)
3789 { 3789 {
3790 m_host.AddScriptLPS(1); 3790 m_host.AddScriptLPS(1);
3791 m_host.CollisionFilter.Clear(); 3791 m_host.CollisionFilter.Clear();
@@ -4513,7 +4513,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4513 } 4513 }
4514 } 4514 }
4515 4515
4516 public void llCreateLink(LSL_String target, LSL_Integer parent) 4516 public void llCreateLink(LSL_Key target, LSL_Integer parent)
4517 { 4517 {
4518 m_host.AddScriptLPS(1); 4518 m_host.AddScriptLPS(1);
4519 4519
@@ -4847,7 +4847,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4847 return 1.0f; 4847 return 1.0f;
4848 } 4848 }
4849 4849
4850 public void llGiveInventory(string destination, string inventory) 4850 public void llGiveInventory(LSL_Key destination, LSL_String inventory)
4851 { 4851 {
4852 m_host.AddScriptLPS(1); 4852 m_host.AddScriptLPS(1);
4853 4853
@@ -5317,7 +5317,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5317 } 5317 }
5318 } 5318 }
5319 5319
5320 public void llCollisionSound(string impact_sound, double impact_volume) 5320 public void llCollisionSound(LSL_String impact_sound, LSL_Float impact_volume)
5321 { 5321 {
5322 m_host.AddScriptLPS(1); 5322 m_host.AddScriptLPS(1);
5323 5323
@@ -5344,11 +5344,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5344 m_host.aggregateScriptEvents(); 5344 m_host.aggregateScriptEvents();
5345 } 5345 }
5346 5346
5347 public LSL_String llGetAnimation(string id) 5347 public LSL_String llGetAnimation(LSL_Key id)
5348 { 5348 {
5349 // This should only return a value if the avatar is in the same region 5349 // This should only return a value if the avatar is in the same region
5350 m_host.AddScriptLPS(1); 5350 m_host.AddScriptLPS(1);
5351 UUID avatar = (UUID)id; 5351 UUID avatar;
5352 if(!UUID.TryParse(id, out avatar))
5353 return "";
5352 ScenePresence presence = World.GetScenePresence(avatar); 5354 ScenePresence presence = World.GetScenePresence(avatar);
5353 if (presence == null) 5355 if (presence == null)
5354 return ""; 5356 return "";
@@ -5698,13 +5700,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5698 return angle; 5700 return angle;
5699 } 5701 }
5700 5702
5701 public LSL_Float llAcos(double val) 5703 public LSL_Float llAcos(LSL_Float val)
5702 { 5704 {
5703 m_host.AddScriptLPS(1); 5705 m_host.AddScriptLPS(1);
5704 return (double)Math.Acos(val); 5706 return (double)Math.Acos(val);
5705 } 5707 }
5706 5708
5707 public LSL_Float llAsin(double val) 5709 public LSL_Float llAsin(LSL_Float val)
5708 { 5710 {
5709 m_host.AddScriptLPS(1); 5711 m_host.AddScriptLPS(1);
5710 return (double)Math.Asin(val); 5712 return (double)Math.Asin(val);
@@ -5744,7 +5746,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5744 return UUID.Zero.ToString(); 5746 return UUID.Zero.ToString();
5745 } 5747 }
5746 5748
5747 public void llAllowInventoryDrop(int add) 5749 public void llAllowInventoryDrop(LSL_Integer add)
5748 { 5750 {
5749 m_host.AddScriptLPS(1); 5751 m_host.AddScriptLPS(1);
5750 5752
@@ -6387,75 +6389,64 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6387 public LSL_String llGetEnv(LSL_String name) 6389 public LSL_String llGetEnv(LSL_String name)
6388 { 6390 {
6389 m_host.AddScriptLPS(1); 6391 m_host.AddScriptLPS(1);
6390 if (name == "agent_limit") 6392 switch(name)
6391 {
6392 return World.RegionInfo.RegionSettings.AgentLimit.ToString();
6393 }
6394 else if (name == "dynamic_pathfinding")
6395 {
6396 return "0";
6397 }
6398 else if (name == "estate_id")
6399 {
6400 return World.RegionInfo.EstateSettings.EstateID.ToString();
6401 }
6402 else if (name == "estate_name")
6403 {
6404 return World.RegionInfo.EstateSettings.EstateName;
6405 }
6406 else if (name == "frame_number")
6407 { 6393 {
6408 return World.Frame.ToString(); 6394 case "agent_limit":
6409 } 6395 return World.RegionInfo.RegionSettings.AgentLimit.ToString();
6410 else if (name == "region_cpu_ratio") 6396
6411 { 6397 case "dynamic_pathfinding":
6412 return "1"; 6398 return "0";
6413 } 6399
6414 else if (name == "region_idle") 6400 case "estate_id":
6415 { 6401 return World.RegionInfo.EstateSettings.EstateID.ToString();
6416 return "0"; 6402
6417 } 6403 case "estate_name":
6418 else if (name == "region_product_name") 6404 return World.RegionInfo.EstateSettings.EstateName;
6419 { 6405
6420 if (World.RegionInfo.RegionType != String.Empty) 6406 case "frame_number":
6421 return World.RegionInfo.RegionType; 6407 return World.Frame.ToString();
6422 else 6408
6409 case "region_cpu_ratio":
6410 return "1";
6411
6412 case "region_idle":
6413 return "0";
6414
6415 case "region_product_name":
6416 if (World.RegionInfo.RegionType != String.Empty)
6417 return World.RegionInfo.RegionType;
6418 else
6419 return "";
6420
6421 case "region_product_sku":
6422 return "OpenSim";
6423
6424 case "region_start_time":
6425 return World.UnixStartTime.ToString();
6426
6427 case "region_up_time":
6428 int time = Util.UnixTimeSinceEpoch() - World.UnixStartTime;
6429 return time.ToString();
6430
6431 case "sim_channel":
6432 return "OpenSim";
6433
6434 case "sim_version":
6435 return World.GetSimulatorVersion();
6436
6437 case "simulator_hostname":
6438 IUrlModule UrlModule = World.RequestModuleInterface<IUrlModule>();
6439 return UrlModule.ExternalHostNameForLSL;
6440
6441 case "region_max_prims":
6442 return World.RegionInfo.ObjectCapacity.ToString();
6443
6444 case "region_object_bonus":
6445 return World.RegionInfo.RegionSettings.ObjectBonus.ToString();
6446
6447 default:
6423 return ""; 6448 return "";
6424 } 6449 }
6425 else if (name == "region_product_sku")
6426 {
6427 return "OpenSim";
6428 }
6429 else if (name == "region_start_time")
6430 {
6431 return World.UnixStartTime.ToString();
6432 }
6433 else if (name == "sim_channel")
6434 {
6435 return "OpenSim";
6436 }
6437 else if (name == "sim_version")
6438 {
6439 return World.GetSimulatorVersion();
6440 }
6441 else if (name == "simulator_hostname")
6442 {
6443 IUrlModule UrlModule = World.RequestModuleInterface<IUrlModule>();
6444 return UrlModule.ExternalHostNameForLSL;
6445 }
6446 else if (name == "region_max_prims")
6447 {
6448 return World.RegionInfo.ObjectCapacity.ToString();
6449 }
6450 else if (name == "region_object_bonus")
6451 {
6452 return World.RegionInfo.RegionSettings.ObjectBonus.ToString();
6453 }
6454 else
6455 {
6456 return "";
6457 }
6458
6459 } 6450 }
6460 6451
6461 /// <summary> 6452 /// <summary>
@@ -6650,7 +6641,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6650 /// AGENT_BUSY 6641 /// AGENT_BUSY
6651 /// Remove as they are done 6642 /// Remove as they are done
6652 /// </summary> 6643 /// </summary>
6653 public LSL_Integer llGetAgentInfo(string id) 6644 public LSL_Integer llGetAgentInfo(LSL_Key id)
6654 { 6645 {
6655 m_host.AddScriptLPS(1); 6646 m_host.AddScriptLPS(1);
6656 6647
@@ -6757,7 +6748,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6757 return flags; 6748 return flags;
6758 } 6749 }
6759 6750
6760 public LSL_String llGetAgentLanguage(string id) 6751 public LSL_String llGetAgentLanguage(LSL_Key id)
6761 { 6752 {
6762 // This should only return a value if the avatar is in the same region, but eh. idc. 6753 // This should only return a value if the avatar is in the same region, but eh. idc.
6763 m_host.AddScriptLPS(1); 6754 m_host.AddScriptLPS(1);
@@ -6868,7 +6859,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6868 return result; 6859 return result;
6869 } 6860 }
6870 6861
6871 public void llAdjustSoundVolume(double volume) 6862 public void llAdjustSoundVolume(LSL_Float volume)
6872 { 6863 {
6873 m_host.AddScriptLPS(1); 6864 m_host.AddScriptLPS(1);
6874 m_host.AdjustSoundGain(volume); 6865 m_host.AdjustSoundGain(volume);
@@ -6881,7 +6872,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6881 m_host.SoundRadius = radius; 6872 m_host.SoundRadius = radius;
6882 } 6873 }
6883 6874
6884 public LSL_String llKey2Name(string id) 6875 public LSL_String llKey2Name(LSL_Key id)
6885 { 6876 {
6886 m_host.AddScriptLPS(1); 6877 m_host.AddScriptLPS(1);
6887 UUID key = new UUID(); 6878 UUID key = new UUID();
@@ -7055,22 +7046,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7055 /// only the height of avatars vary and that says: 7046 /// only the height of avatars vary and that says:
7056 /// Width (x) and depth (y) are constant. (0.45m and 0.6m respectively). 7047 /// Width (x) and depth (y) are constant. (0.45m and 0.6m respectively).
7057 /// </summary> 7048 /// </summary>
7058 public LSL_Vector llGetAgentSize(string id) 7049 public LSL_Vector llGetAgentSize(LSL_Key id)
7059 { 7050 {
7060 m_host.AddScriptLPS(1); 7051 m_host.AddScriptLPS(1);
7061 ScenePresence avatar = World.GetScenePresence((UUID)id); 7052 UUID avID;
7062 LSL_Vector agentSize; 7053 if(!UUID.TryParse(id, out avID))
7054 return ScriptBaseClass.ZERO_VECTOR;
7055
7056 ScenePresence avatar = World.GetScenePresence(avID);
7063 if (avatar == null || avatar.IsChildAgent) // Fail if not in the same region 7057 if (avatar == null || avatar.IsChildAgent) // Fail if not in the same region
7064 { 7058 return ScriptBaseClass.ZERO_VECTOR;
7065 agentSize = ScriptBaseClass.ZERO_VECTOR; 7059
7066 }
7067 else
7068 {
7069// agentSize = new LSL_Vector(0.45f, 0.6f, avatar.Appearance.AvatarHeight); 7060// agentSize = new LSL_Vector(0.45f, 0.6f, avatar.Appearance.AvatarHeight);
7070 Vector3 s = avatar.Appearance.AvatarSize; 7061 Vector3 s = avatar.Appearance.AvatarSize;
7071 agentSize = new LSL_Vector(s.X, s.Y, s.Z); 7062 return new LSL_Vector(s.X, s.Y, s.Z);
7072 }
7073 return agentSize;
7074 } 7063 }
7075 7064
7076 public LSL_Integer llSameGroup(string id) 7065 public LSL_Integer llSameGroup(string id)
@@ -7246,12 +7235,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7246 return m_host.ParentGroup.AttachmentPoint; 7235 return m_host.ParentGroup.AttachmentPoint;
7247 } 7236 }
7248 7237
7249 public LSL_List llGetAttachedList(string id) 7238 public LSL_List llGetAttachedList(LSL_Key id)
7250 { 7239 {
7251 m_host.AddScriptLPS(1); 7240 m_host.AddScriptLPS(1);
7252 7241
7253 ScenePresence av = World.GetScenePresence((UUID)id); 7242 UUID avID;
7243 if(!UUID.TryParse(id, out avID))
7244 return new LSL_List("NOT_FOUND");
7254 7245
7246 ScenePresence av = World.GetScenePresence(avID);
7255 if (av == null || av.IsDeleted) 7247 if (av == null || av.IsDeleted)
7256 return new LSL_List("NOT_FOUND"); 7248 return new LSL_List("NOT_FOUND");
7257 7249
@@ -7836,7 +7828,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7836 } 7828 }
7837 } 7829 }
7838 7830
7839 public void llGiveInventoryList(string destination, string category, LSL_List inventory) 7831 public void llGiveInventoryList(LSL_Key destination, LSL_String category, LSL_List inventory)
7840 { 7832 {
7841 m_host.AddScriptLPS(1); 7833 m_host.AddScriptLPS(1);
7842 7834
@@ -8014,7 +8006,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8014 } 8006 }
8015 8007
8016 8008
8017 public void llAddToLandPassList(LSL_Key avatar, double hours) 8009 public void llAddToLandPassList(LSL_Key avatar, LSL_Float hours)
8018 { 8010 {
8019 m_host.AddScriptLPS(1); 8011 m_host.AddScriptLPS(1);
8020 UUID key; 8012 UUID key;
@@ -11086,16 +11078,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11086 return (double)Math.Log(val); 11078 return (double)Math.Log(val);
11087 } 11079 }
11088 11080
11089 public LSL_List llGetAnimationList(string id) 11081 public LSL_List llGetAnimationList(LSL_Key id)
11090 { 11082 {
11091 m_host.AddScriptLPS(1); 11083 m_host.AddScriptLPS(1);
11092 11084
11093 LSL_List l = new LSL_List(); 11085 UUID avID;
11094 ScenePresence av = World.GetScenePresence((UUID)id); 11086 if(!UUID.TryParse(id, out avID))
11087 return new LSL_List();
11088
11089 ScenePresence av = World.GetScenePresence(avID);
11095 if (av == null || av.IsChildAgent) // only if in the region 11090 if (av == null || av.IsChildAgent) // only if in the region
11096 return l; 11091 return new LSL_List();
11092
11097 UUID[] anims; 11093 UUID[] anims;
11098 anims = av.Animator.GetAnimationArray(); 11094 anims = av.Animator.GetAnimationArray();
11095 LSL_List l = new LSL_List();
11099 foreach (UUID foo in anims) 11096 foreach (UUID foo in anims)
11100 l.Add(new LSL_Key(foo.ToString())); 11097 l.Add(new LSL_Key(foo.ToString()));
11101 return l; 11098 return l;
@@ -13619,7 +13616,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13619 ScriptSleep(m_sleepMsOnMapDestination); 13616 ScriptSleep(m_sleepMsOnMapDestination);
13620 } 13617 }
13621 13618
13622 public void llAddToLandBanList(LSL_Key avatar, double hours) 13619 public void llAddToLandBanList(LSL_Key avatar, LSL_Float hours)
13623 { 13620 {
13624 m_host.AddScriptLPS(1); 13621 m_host.AddScriptLPS(1);
13625 UUID key; 13622 UUID key;
@@ -14343,6 +14340,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14343 case "5": 14340 case "5":
14344 ret.Add(new LSL_Key(land.GlobalID.ToString())); 14341 ret.Add(new LSL_Key(land.GlobalID.ToString()));
14345 break; 14342 break;
14343 case "64":
14344 ret.Add(new LSL_Integer(land.Dwell));
14345 break;
14346 default: 14346 default:
14347 ret.Add(new LSL_Integer(0)); 14347 ret.Add(new LSL_Integer(0));
14348 break; 14348 break;
@@ -15056,7 +15056,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
15056 return name.Replace(" ", ".").ToLower(); 15056 return name.Replace(" ", ".").ToLower();
15057 } 15057 }
15058 15058
15059 public LSL_String llGetUsername(string id) 15059 public LSL_String llGetUsername(LSL_Key id)
15060 { 15060 {
15061 return Name2Username(llKey2Name(id)); 15061 return Name2Username(llKey2Name(id));
15062 } 15062 }
@@ -16599,7 +16599,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
16599 m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value); 16599 m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value);
16600 } 16600 }
16601 16601
16602 public void llCollisionSprite(string impact_sprite) 16602 public void llCollisionSprite(LSL_String impact_sprite)
16603 { 16603 {
16604 m_host.AddScriptLPS(1); 16604 m_host.AddScriptLPS(1);
16605 // Viewer 2.0 broke this and it's likely LL has no intention 16605 // Viewer 2.0 broke this and it's likely LL has no intention
@@ -16660,7 +16660,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
16660 new DetectParams[0])); 16660 new DetectParams[0]));
16661 } 16661 }
16662 16662
16663 public LSL_Key llTransferLindenDollars(string destination, int amount) 16663 public LSL_Key llTransferLindenDollars(LSL_Key destination, LSL_Integer amount)
16664 { 16664 {
16665 UUID txn = UUID.Random(); 16665 UUID txn = UUID.Random();
16666 16666
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 7d3c832..62da221 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1600,6 +1600,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1600 return 0.0f; 1600 return 0.0f;
1601 } 1601 }
1602 1602
1603 public LSL_Integer osGetParcelDwell(LSL_Vector pos)
1604 {
1605 LandData land = World.GetLandData(pos);
1606 if (land != null)
1607 {
1608 return (int)land.Dwell;
1609 }
1610 return 0;
1611 }
1612
1603 // Routines for creating and managing parcels programmatically 1613 // Routines for creating and managing parcels programmatically
1604 public void osParcelJoin(LSL_Vector pos1, LSL_Vector pos2) 1614 public void osParcelJoin(LSL_Vector pos1, LSL_Vector pos2)
1605 { 1615 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 8e1192c..6599c22 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -41,20 +41,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
41 { 41 {
42 void state(string newState); 42 void state(string newState);
43 43
44 LSL_Integer llAbs(int val); 44 LSL_Integer llAbs(LSL_Integer val);
45 LSL_Float llAcos(double val); 45 LSL_Float llAcos(LSL_Float val);
46 //ApiDesc Sleep 0.1 46 //ApiDesc Sleep 0.1
47 void llAddToLandBanList(LSL_Key avatarId, double hours); 47 void llAddToLandBanList(LSL_Key avatarId, LSL_Float hours);
48 //ApiDesc Sleep 0.1 48 //ApiDesc Sleep 0.1
49 void llAddToLandPassList(LSL_Key avatarId, double hours); 49 void llAddToLandPassList(LSL_Key avatarId, LSL_Float hours);
50 //ApiDesc Sleep 0.1 50 //ApiDesc Sleep 0.1
51 void llAdjustSoundVolume(double volume); 51 void llAdjustSoundVolume(LSL_Float volume);
52 void llAllowInventoryDrop(int add); 52 void llAllowInventoryDrop(LSL_Integer add);
53 LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b); 53 LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b);
54 void llApplyImpulse(LSL_Vector force, int local); 54 void llApplyImpulse(LSL_Vector force, LSL_Integer local);
55 void llApplyRotationalImpulse(LSL_Vector force, int local); 55 void llApplyRotationalImpulse(LSL_Vector force, int local);
56 LSL_Float llAsin(double val); 56 LSL_Float llAsin(LSL_Float val);
57 LSL_Float llAtan2(double x, double y); 57 LSL_Float llAtan2(LSL_Float x, LSL_Float y);
58 void llAttachToAvatar(LSL_Integer attachment); 58 void llAttachToAvatar(LSL_Integer attachment);
59 void llAttachToAvatarTemp(LSL_Integer attachmentPoint); 59 void llAttachToAvatarTemp(LSL_Integer attachmentPoint);
60 LSL_Key llAvatarOnSitTarget(); 60 LSL_Key llAvatarOnSitTarget();
@@ -74,13 +74,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
74 //ApiDesc Sleep 1.0 74 //ApiDesc Sleep 1.0
75 void llCloseRemoteDataChannel(string channel); 75 void llCloseRemoteDataChannel(string channel);
76 LSL_Float llCloud(LSL_Vector offset); 76 LSL_Float llCloud(LSL_Vector offset);
77 void llCollisionFilter(string name, string id, int accept); 77 void llCollisionFilter(LSL_String name, LSL_Key id, LSL_Integer accept);
78 void llCollisionSound(string impact_sound, double impact_volume); 78 void llCollisionSound(LSL_String impact_sound, LSL_Float impact_volume);
79 //ApiDesc Not Supported - does nothing 79 //ApiDesc Not Supported - does nothing
80 void llCollisionSprite(string impact_sprite); 80 void llCollisionSprite(LSL_String impact_sprite);
81 LSL_Float llCos(double f); 81 LSL_Float llCos(double f);
82 //ApiDesc Sleep 1.0 82 //ApiDesc Sleep 1.0
83 void llCreateLink(LSL_String targetId, LSL_Integer parent); 83 void llCreateLink(LSL_Key targetId, LSL_Integer parent);
84 LSL_List llCSV2List(string src); 84 LSL_List llCSV2List(string src);
85 LSL_List llDeleteSubList(LSL_List src, int start, int end); 85 LSL_List llDeleteSubList(LSL_List src, int start, int end);
86 LSL_String llDeleteSubString(string src, int start, int end); 86 LSL_String llDeleteSubString(string src, int start, int end);
@@ -116,16 +116,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
116 LSL_Float llFrand(double mag); 116 LSL_Float llFrand(double mag);
117 LSL_Key llGenerateKey(); 117 LSL_Key llGenerateKey();
118 LSL_Vector llGetAccel(); 118 LSL_Vector llGetAccel();
119 LSL_Integer llGetAgentInfo(string id); 119 LSL_Integer llGetAgentInfo(LSL_Key id);
120 LSL_String llGetAgentLanguage(string id); 120 LSL_String llGetAgentLanguage(LSL_Key id);
121 LSL_List llGetAgentList(LSL_Integer scope, LSL_List options); 121 LSL_List llGetAgentList(LSL_Integer scope, LSL_List options);
122 LSL_Vector llGetAgentSize(string id); 122 LSL_Vector llGetAgentSize(LSL_Key id);
123 LSL_Float llGetAlpha(int face); 123 LSL_Float llGetAlpha(int face);
124 LSL_Float llGetAndResetTime(); 124 LSL_Float llGetAndResetTime();
125 LSL_String llGetAnimation(string id); 125 LSL_String llGetAnimation(LSL_Key id);
126 LSL_List llGetAnimationList(string id); 126 LSL_List llGetAnimationList(LSL_Key id);
127 LSL_Integer llGetAttached(); 127 LSL_Integer llGetAttached();
128 LSL_List llGetAttachedList(string id); 128 LSL_List llGetAttachedList(LSL_Key id);
129 LSL_List llGetBoundingBox(string obj); 129 LSL_List llGetBoundingBox(string obj);
130 LSL_Vector llGetCameraPos(); 130 LSL_Vector llGetCameraPos();
131 LSL_Rotation llGetCameraRot(); 131 LSL_Rotation llGetCameraRot();
@@ -217,10 +217,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
217 LSL_Integer llGetUnixTime(); 217 LSL_Integer llGetUnixTime();
218 LSL_Vector llGetVel(); 218 LSL_Vector llGetVel();
219 LSL_Float llGetWallclock(); 219 LSL_Float llGetWallclock();
220 void llGiveInventory(string destination, string inventory); 220 void llGiveInventory(LSL_Key destination, LSL_String inventory);
221 void llGiveInventoryList(string destination, string category, LSL_List inventory); 221 void llGiveInventoryList(LSL_Key destination, LSL_String category, LSL_List inventory);
222 LSL_Integer llGiveMoney(string destination, int amount); 222 LSL_Integer llGiveMoney(LSL_Key destination, LSL_Integer amount);
223 LSL_Key llTransferLindenDollars(string destination, int amount); 223 LSL_Key llTransferLindenDollars(LSL_Key destination, LSL_Integer amount);
224 void llGodLikeRezObject(string inventory, LSL_Vector pos); 224 void llGodLikeRezObject(string inventory, LSL_Vector pos);
225 LSL_Float llGround(LSL_Vector offset); 225 LSL_Float llGround(LSL_Vector offset);
226 LSL_Vector llGroundContour(LSL_Vector offset); 226 LSL_Vector llGroundContour(LSL_Vector offset);
@@ -232,8 +232,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
232 LSL_String llInsertString(string dst, int position, string src); 232 LSL_String llInsertString(string dst, int position, string src);
233 void llInstantMessage(string user, string message); 233 void llInstantMessage(string user, string message);
234 LSL_String llIntegerToBase64(int number); 234 LSL_String llIntegerToBase64(int number);
235 LSL_String llKey2Name(string id); 235 LSL_String llKey2Name(LSL_Key id);
236 LSL_String llGetUsername(string id); 236 LSL_String llGetUsername(LSL_Key id);
237 LSL_Key llRequestUsername(string id); 237 LSL_Key llRequestUsername(string id);
238 LSL_String llGetDisplayName(string id); 238 LSL_String llGetDisplayName(string id);
239 LSL_Key llRequestDisplayName(string id); 239 LSL_Key llRequestDisplayName(string id);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 194df36..7c5ced8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -260,6 +260,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
260 LSL_Float osGetWindParam(string plugin, string param); 260 LSL_Float osGetWindParam(string plugin, string param);
261 261
262 // Parcel commands 262 // Parcel commands
263 LSL_Integer osGetParcelDwell(vector pos);
263 void osParcelJoin(vector pos1, vector pos2); 264 void osParcelJoin(vector pos1, vector pos2);
264 void osParcelSubdivide(vector pos1, vector pos2); 265 void osParcelSubdivide(vector pos1, vector pos2);
265 void osSetParcelDetails(vector pos, LSL_List rules); 266 void osSetParcelDetails(vector pos, LSL_List rules);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index fa0e25c..f93cea8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
35 public partial class ScriptBaseClass 35 public partial class ScriptBaseClass
36 { 36 {
37 // SCRIPTS CONSTANTS 37 // SCRIPTS CONSTANTS
38 public static readonly LSLInteger OS_APIVERSION = 4; 38 public static readonly LSLInteger OS_APIVERSION = 5;
39 39
40 public static readonly LSLInteger TRUE = 1; 40 public static readonly LSLInteger TRUE = 1;
41 public static readonly LSLInteger FALSE = 0; 41 public static readonly LSLInteger FALSE = 0;
@@ -728,6 +728,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
728 public const int PARCEL_DETAILS_SEE_AVATARS = 6; 728 public const int PARCEL_DETAILS_SEE_AVATARS = 6;
729 public const int PARCEL_DETAILS_ANY_AVATAR_SOUNDS = 7; 729 public const int PARCEL_DETAILS_ANY_AVATAR_SOUNDS = 7;
730 public const int PARCEL_DETAILS_GROUP_SOUNDS = 8; 730 public const int PARCEL_DETAILS_GROUP_SOUNDS = 8;
731 // constants for llGetParcelDetails os specific
732 public const int PARCEL_DETAILS_DWELL = 64;
731 733
732 //osSetParcelDetails 734 //osSetParcelDetails
733 public const int PARCEL_DETAILS_CLAIMDATE = 10; 735 public const int PARCEL_DETAILS_CLAIMDATE = 10;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 0f10d8d..ff5b4c3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -65,32 +65,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
65 // 65 //
66 // Script functions 66 // Script functions
67 // 67 //
68 public LSL_Integer llAbs(int i) 68 public LSL_Integer llAbs(LSL_Integer i)
69 { 69 {
70 return m_LSL_Functions.llAbs(i); 70 return m_LSL_Functions.llAbs(i);
71 } 71 }
72 72
73 public LSL_Float llAcos(double val) 73 public LSL_Float llAcos(LSL_Float val)
74 { 74 {
75 return m_LSL_Functions.llAcos(val); 75 return m_LSL_Functions.llAcos(val);
76 } 76 }
77 77
78 public void llAddToLandBanList(string avatar, double hours) 78 public void llAddToLandBanList(LSL_Key avatar, LSL_Float hours)
79 { 79 {
80 m_LSL_Functions.llAddToLandBanList(avatar, hours); 80 m_LSL_Functions.llAddToLandBanList(avatar, hours);
81 } 81 }
82 82
83 public void llAddToLandPassList(string avatar, double hours) 83 public void llAddToLandPassList(LSL_Key avatar, LSL_Float hours)
84 { 84 {
85 m_LSL_Functions.llAddToLandPassList(avatar, hours); 85 m_LSL_Functions.llAddToLandPassList(avatar, hours);
86 } 86 }
87 87
88 public void llAdjustSoundVolume(double volume) 88 public void llAdjustSoundVolume(LSL_Float volume)
89 { 89 {
90 m_LSL_Functions.llAdjustSoundVolume(volume); 90 m_LSL_Functions.llAdjustSoundVolume(volume);
91 } 91 }
92 92
93 public void llAllowInventoryDrop(int add) 93 public void llAllowInventoryDrop(LSL_Integer add)
94 { 94 {
95 m_LSL_Functions.llAllowInventoryDrop(add); 95 m_LSL_Functions.llAllowInventoryDrop(add);
96 } 96 }
@@ -100,7 +100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
100 return m_LSL_Functions.llAngleBetween(a, b); 100 return m_LSL_Functions.llAngleBetween(a, b);
101 } 101 }
102 102
103 public void llApplyImpulse(LSL_Vector force, int local) 103 public void llApplyImpulse(LSL_Vector force, LSL_Integer local)
104 { 104 {
105 m_LSL_Functions.llApplyImpulse(force, local); 105 m_LSL_Functions.llApplyImpulse(force, local);
106 } 106 }
@@ -110,12 +110,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
110 m_LSL_Functions.llApplyRotationalImpulse(force, local); 110 m_LSL_Functions.llApplyRotationalImpulse(force, local);
111 } 111 }
112 112
113 public LSL_Float llAsin(double val) 113 public LSL_Float llAsin(LSL_Float val)
114 { 114 {
115 return m_LSL_Functions.llAsin(val); 115 return m_LSL_Functions.llAsin(val);
116 } 116 }
117 117
118 public LSL_Float llAtan2(double x, double y) 118 public LSL_Float llAtan2(LSL_Float x, LSL_Float y)
119 { 119 {
120 return m_LSL_Functions.llAtan2(x, y); 120 return m_LSL_Functions.llAtan2(x, y);
121 } 121 }
@@ -190,17 +190,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
190 return m_LSL_Functions.llCloud(offset); 190 return m_LSL_Functions.llCloud(offset);
191 } 191 }
192 192
193 public void llCollisionFilter(string name, string id, int accept) 193 public void llCollisionFilter(LSL_String name, LSL_Key id, LSL_Integer accept)
194 { 194 {
195 m_LSL_Functions.llCollisionFilter(name, id, accept); 195 m_LSL_Functions.llCollisionFilter(name, id, accept);
196 } 196 }
197 197
198 public void llCollisionSound(string impact_sound, double impact_volume) 198 public void llCollisionSound(LSL_String impact_sound, LSL_Float impact_volume)
199 { 199 {
200 m_LSL_Functions.llCollisionSound(impact_sound, impact_volume); 200 m_LSL_Functions.llCollisionSound(impact_sound, impact_volume);
201 } 201 }
202 202
203 public void llCollisionSprite(string impact_sprite) 203 public void llCollisionSprite(LSL_String impact_sprite)
204 { 204 {
205 m_LSL_Functions.llCollisionSprite(impact_sprite); 205 m_LSL_Functions.llCollisionSprite(impact_sprite);
206 } 206 }
@@ -210,7 +210,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
210 return m_LSL_Functions.llCos(f); 210 return m_LSL_Functions.llCos(f);
211 } 211 }
212 212
213 public void llCreateLink(LSL_String target, LSL_Integer parent) 213 public void llCreateLink(LSL_Key target, LSL_Integer parent)
214 { 214 {
215 m_LSL_Functions.llCreateLink(target, parent); 215 m_LSL_Functions.llCreateLink(target, parent);
216 } 216 }
@@ -386,12 +386,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
386 return m_LSL_Functions.llGetAccel(); 386 return m_LSL_Functions.llGetAccel();
387 } 387 }
388 388
389 public LSL_Integer llGetAgentInfo(string id) 389 public LSL_Integer llGetAgentInfo(LSL_Key id)
390 { 390 {
391 return m_LSL_Functions.llGetAgentInfo(id); 391 return m_LSL_Functions.llGetAgentInfo(id);
392 } 392 }
393 393
394 public LSL_String llGetAgentLanguage(string id) 394 public LSL_String llGetAgentLanguage(LSL_Key id)
395 { 395 {
396 return m_LSL_Functions.llGetAgentLanguage(id); 396 return m_LSL_Functions.llGetAgentLanguage(id);
397 } 397 }
@@ -401,7 +401,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
401 return m_LSL_Functions.llGetAgentList(scope, options); 401 return m_LSL_Functions.llGetAgentList(scope, options);
402 } 402 }
403 403
404 public LSL_Vector llGetAgentSize(string id) 404 public LSL_Vector llGetAgentSize(LSL_Key id)
405 { 405 {
406 return m_LSL_Functions.llGetAgentSize(id); 406 return m_LSL_Functions.llGetAgentSize(id);
407 } 407 }
@@ -416,12 +416,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
416 return m_LSL_Functions.llGetAndResetTime(); 416 return m_LSL_Functions.llGetAndResetTime();
417 } 417 }
418 418
419 public LSL_String llGetAnimation(string id) 419 public LSL_String llGetAnimation(LSL_Key id)
420 { 420 {
421 return m_LSL_Functions.llGetAnimation(id); 421 return m_LSL_Functions.llGetAnimation(id);
422 } 422 }
423 423
424 public LSL_List llGetAnimationList(string id) 424 public LSL_List llGetAnimationList(LSL_Key id)
425 { 425 {
426 return m_LSL_Functions.llGetAnimationList(id); 426 return m_LSL_Functions.llGetAnimationList(id);
427 } 427 }
@@ -431,7 +431,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
431 return m_LSL_Functions.llGetAttached(); 431 return m_LSL_Functions.llGetAttached();
432 } 432 }
433 433
434 public LSL_List llGetAttachedList(string id) 434 public LSL_List llGetAttachedList(LSL_Key id)
435 { 435 {
436 return m_LSL_Functions.llGetAttachedList(id); 436 return m_LSL_Functions.llGetAttachedList(id);
437 } 437 }
@@ -881,27 +881,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
881 return m_LSL_Functions.llGetWallclock(); 881 return m_LSL_Functions.llGetWallclock();
882 } 882 }
883 883
884 public void llGiveInventory(string destination, string inventory) 884 public void llGiveInventory(LSL_Key destination, LSL_String inventory)
885 { 885 {
886 m_LSL_Functions.llGiveInventory(destination, inventory); 886 m_LSL_Functions.llGiveInventory(destination, inventory);
887 } 887 }
888 888
889 public void llGiveInventoryList(string destination, string category, LSL_List inventory) 889 public void llGiveInventoryList(LSL_Key destination, LSL_String category, LSL_List inventory)
890 { 890 {
891 m_LSL_Functions.llGiveInventoryList(destination, category, inventory); 891 m_LSL_Functions.llGiveInventoryList(destination, category, inventory);
892 } 892 }
893 893
894 public LSL_Integer llGiveMoney(string destination, int amount) 894 public LSL_Integer llGiveMoney(LSL_Key destination, LSL_Integer amount)
895 { 895 {
896 return m_LSL_Functions.llGiveMoney(destination, amount); 896 return m_LSL_Functions.llGiveMoney(destination, amount);
897 } 897 }
898 898
899 public LSL_Key llTransferLindenDollars(string destination, int amount) 899 public LSL_Key llTransferLindenDollars(LSL_Key destination, LSL_Integer amount)
900 { 900 {
901 return m_LSL_Functions.llTransferLindenDollars(destination, amount); 901 return m_LSL_Functions.llTransferLindenDollars(destination, amount);
902 } 902 }
903 903
904 public void llGodLikeRezObject(string inventory, LSL_Vector pos) 904 public void llGodLikeRezObject(LSL_String inventory, LSL_Vector pos)
905 { 905 {
906 m_LSL_Functions.llGodLikeRezObject(inventory, pos); 906 m_LSL_Functions.llGodLikeRezObject(inventory, pos);
907 } 907 }
@@ -931,22 +931,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
931 return m_LSL_Functions.llGroundSlope(offset); 931 return m_LSL_Functions.llGroundSlope(offset);
932 } 932 }
933 933
934 public LSL_Key llHTTPRequest(string url, LSL_List parameters, string body) 934 public LSL_Key llHTTPRequest(LSL_String url, LSL_List parameters, LSL_String body)
935 { 935 {
936 return m_LSL_Functions.llHTTPRequest(url, parameters, body); 936 return m_LSL_Functions.llHTTPRequest(url, parameters, body);
937 } 937 }
938 938
939 public void llHTTPResponse(LSL_Key id, int status, string body) 939 public void llHTTPResponse(LSL_Key id, int status, LSL_String body)
940 { 940 {
941 m_LSL_Functions.llHTTPResponse(id, status, body); 941 m_LSL_Functions.llHTTPResponse(id, status, body);
942 } 942 }
943 943
944 public LSL_String llInsertString(string dst, int position, string src) 944 public LSL_String llInsertString(LSL_String dst, int position, LSL_String src)
945 { 945 {
946 return m_LSL_Functions.llInsertString(dst, position, src); 946 return m_LSL_Functions.llInsertString(dst, position, src);
947 } 947 }
948 948
949 public void llInstantMessage(string user, string message) 949 public void llInstantMessage(LSL_String user, LSL_String message)
950 { 950 {
951 m_LSL_Functions.llInstantMessage(user, message); 951 m_LSL_Functions.llInstantMessage(user, message);
952 } 952 }
@@ -956,12 +956,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
956 return m_LSL_Functions.llIntegerToBase64(number); 956 return m_LSL_Functions.llIntegerToBase64(number);
957 } 957 }
958 958
959 public LSL_String llKey2Name(string id) 959 public LSL_String llKey2Name(LSL_Key id)
960 { 960 {
961 return m_LSL_Functions.llKey2Name(id); 961 return m_LSL_Functions.llKey2Name(id);
962 } 962 }
963 963
964 public LSL_String llGetUsername(string id) 964 public LSL_String llGetUsername(LSL_Key id)
965 { 965 {
966 return m_LSL_Functions.llGetUsername(id); 966 return m_LSL_Functions.llGetUsername(id);
967 } 967 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 88ea9d5..6a70305 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -116,6 +116,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
116 return m_OSSL_Functions.osGetWindParam(plugin, param); 116 return m_OSSL_Functions.osGetWindParam(plugin, param);
117 } 117 }
118 118
119 public LSL_Integer osGetParcelDwell(vector pos)
120 {
121 return m_OSSL_Functions.osGetParcelDwell(pos);
122 }
123
119 public void osParcelJoin(vector pos1, vector pos2) 124 public void osParcelJoin(vector pos1, vector pos2)
120 { 125 {
121 m_OSSL_Functions.osParcelJoin(pos1,pos2); 126 m_OSSL_Functions.osParcelJoin(pos1,pos2);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 351fca9..ec2a24e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -490,6 +490,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
490 { 490 {
491 ReleaseControls(); 491 ReleaseControls();
492 AsyncCommandManager.RemoveScript(Engine, LocalID, ItemID); 492 AsyncCommandManager.RemoveScript(Engine, LocalID, ItemID);
493 SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID);
494 if (part != null)
495 part.RemoveScriptEvents(ItemID);
493 } 496 }
494 497
495 public void RemoveState() 498 public void RemoveState()
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 5a38501..b52f767 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -533,8 +533,12 @@ namespace OpenSim.Region.ScriptEngine.Shared
533 533
534 public static Quaternion operator /(Quaternion a, Quaternion b) 534 public static Quaternion operator /(Quaternion a, Quaternion b)
535 { 535 {
536 // assuming normalized 536 // assume normalized
537 b.s = -b.s; 537 // if not, sl seems to not normalize either
538 b.x = -b.x;
539 b.y = -b.y;
540 b.z = -b.z;
541
538 return a * b; 542 return a * b;
539 } 543 }
540 544