diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 32 |
1 files changed, 23 insertions, 9 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); |