diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 703c54d..a8763ea 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -12287,11 +12287,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12287 | } | 12287 | } |
12288 | } | 12288 | } |
12289 | 12289 | ||
12290 | // Double check this | ||
12290 | if (checkTerrain) | 12291 | if (checkTerrain) |
12291 | { | 12292 | { |
12292 | ContactResult? groundContact = GroundIntersection(rayStart, rayEnd); | 12293 | bool skipGroundCheck = false; |
12293 | if (groundContact != null) | 12294 | |
12294 | results.Add((ContactResult)groundContact); | 12295 | foreach (ContactResult c in results) |
12296 | { | ||
12297 | if (c.ConsumerID == 0) // Physics gave us a ground collision | ||
12298 | skipGroundCheck = true; | ||
12299 | } | ||
12300 | |||
12301 | if (!skipGroundCheck) | ||
12302 | { | ||
12303 | ContactResult? groundContact = GroundIntersection(rayStart, rayEnd); | ||
12304 | if (groundContact != null) | ||
12305 | results.Add((ContactResult)groundContact); | ||
12306 | } | ||
12295 | } | 12307 | } |
12296 | 12308 | ||
12297 | results.Sort(delegate(ContactResult a, ContactResult b) | 12309 | results.Sort(delegate(ContactResult a, ContactResult b) |