diff options
author | Melanie | 2013-01-24 23:25:38 +0000 |
---|---|---|
committer | Melanie | 2013-01-24 23:25:38 +0000 |
commit | c6e6614a447b541d9d985c2a3dd3bb50a89f9b07 (patch) | |
tree | 023ae4d98fdfb20e8d1cd9c6ce4988e4f2dec842 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Make llGiveMoney async again. The return value is now the constant 1 to make (diff) | |
download | opensim-SC-c6e6614a447b541d9d985c2a3dd3bb50a89f9b07.zip opensim-SC-c6e6614a447b541d9d985c2a3dd3bb50a89f9b07.tar.gz opensim-SC-c6e6614a447b541d9d985c2a3dd3bb50a89f9b07.tar.bz2 opensim-SC-c6e6614a447b541d9d985c2a3dd3bb50a89f9b07.tar.xz |
Merge branch 'avination' into careminster
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
3 files changed, 26 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 70dea08..667cc09 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3049,7 +3049,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3049 | return src.ToLower(); | 3049 | return src.ToLower(); |
3050 | } | 3050 | } |
3051 | 3051 | ||
3052 | public void llGiveMoney(string destination, int amount) | 3052 | public LSL_Integer llGiveMoney(string destination, int amount) |
3053 | { | 3053 | { |
3054 | Util.FireAndForget(x => | 3054 | Util.FireAndForget(x => |
3055 | { | 3055 | { |
@@ -3083,6 +3083,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3083 | money.ObjectGiveMoney( | 3083 | money.ObjectGiveMoney( |
3084 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero); | 3084 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero); |
3085 | }); | 3085 | }); |
3086 | |||
3087 | return 0; | ||
3086 | } | 3088 | } |
3087 | 3089 | ||
3088 | public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) | 3090 | public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) |
@@ -12309,7 +12311,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12309 | bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL); | 12311 | bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL); |
12310 | 12312 | ||
12311 | 12313 | ||
12312 | if (World.SuportsRayCastFiltered()) | 12314 | if (World.SupportsRayCastFiltered()) |
12313 | { | 12315 | { |
12314 | if (dist == 0) | 12316 | if (dist == 0) |
12315 | return list; | 12317 | return list; |
@@ -12372,13 +12374,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12372 | } | 12374 | } |
12373 | else | 12375 | else |
12374 | { | 12376 | { |
12375 | if (checkTerrain) | ||
12376 | { | ||
12377 | ContactResult? groundContact = GroundIntersection(rayStart, rayEnd); | ||
12378 | if (groundContact != null) | ||
12379 | results.Add((ContactResult)groundContact); | ||
12380 | } | ||
12381 | |||
12382 | if (checkAgents) | 12377 | if (checkAgents) |
12383 | { | 12378 | { |
12384 | ContactResult[] agentHits = AvatarIntersection(rayStart, rayEnd); | 12379 | ContactResult[] agentHits = AvatarIntersection(rayStart, rayEnd); |
@@ -12394,6 +12389,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12394 | } | 12389 | } |
12395 | } | 12390 | } |
12396 | 12391 | ||
12392 | // Double check this | ||
12393 | if (checkTerrain) | ||
12394 | { | ||
12395 | bool skipGroundCheck = false; | ||
12396 | |||
12397 | foreach (ContactResult c in results) | ||
12398 | { | ||
12399 | if (c.ConsumerID == 0) // Physics gave us a ground collision | ||
12400 | skipGroundCheck = true; | ||
12401 | } | ||
12402 | |||
12403 | if (!skipGroundCheck) | ||
12404 | { | ||
12405 | ContactResult? groundContact = GroundIntersection(rayStart, rayEnd); | ||
12406 | if (groundContact != null) | ||
12407 | results.Add((ContactResult)groundContact); | ||
12408 | } | ||
12409 | } | ||
12410 | |||
12397 | results.Sort(delegate(ContactResult a, ContactResult b) | 12411 | results.Sort(delegate(ContactResult a, ContactResult b) |
12398 | { | 12412 | { |
12399 | return a.Depth.CompareTo(b.Depth); | 12413 | return a.Depth.CompareTo(b.Depth); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 8eeb4d2..9bf6f9b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | |||
@@ -208,7 +208,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
208 | LSL_Float llGetWallclock(); | 208 | LSL_Float llGetWallclock(); |
209 | void llGiveInventory(string destination, string inventory); | 209 | void llGiveInventory(string destination, string inventory); |
210 | void llGiveInventoryList(string destination, string category, LSL_List inventory); | 210 | void llGiveInventoryList(string destination, string category, LSL_List inventory); |
211 | void llGiveMoney(string destination, int amount); | 211 | LSL_Integer llGiveMoney(string destination, int amount); |
212 | LSL_String llTransferLindenDollars(string destination, int amount); | 212 | LSL_String llTransferLindenDollars(string destination, int amount); |
213 | void llGodLikeRezObject(string inventory, LSL_Vector pos); | 213 | void llGodLikeRezObject(string inventory, LSL_Vector pos); |
214 | LSL_Float llGround(LSL_Vector offset); | 214 | LSL_Float llGround(LSL_Vector offset); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index ef71d7b..8ecc4f8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -876,9 +876,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
876 | m_LSL_Functions.llGiveInventoryList(destination, category, inventory); | 876 | m_LSL_Functions.llGiveInventoryList(destination, category, inventory); |
877 | } | 877 | } |
878 | 878 | ||
879 | public void llGiveMoney(string destination, int amount) | 879 | public LSL_Integer llGiveMoney(string destination, int amount) |
880 | { | 880 | { |
881 | m_LSL_Functions.llGiveMoney(destination, amount); | 881 | return m_LSL_Functions.llGiveMoney(destination, amount); |
882 | } | 882 | } |
883 | 883 | ||
884 | public LSL_String llTransferLindenDollars(string destination, int amount) | 884 | public LSL_String llTransferLindenDollars(string destination, int amount) |