diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index eeaec42..5269bf9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -233,7 +233,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
233 | protected int m_maxHitsPerPrimInCastRay = 16; | 233 | protected int m_maxHitsPerPrimInCastRay = 16; |
234 | protected int m_maxHitsPerObjectInCastRay = 16; | 234 | protected int m_maxHitsPerObjectInCastRay = 16; |
235 | protected bool m_detectExitsInCastRay = false; | 235 | protected bool m_detectExitsInCastRay = false; |
236 | protected bool m_filterPartsInCastRay = false; | ||
237 | protected bool m_doAttachmentsInCastRay = false; | 236 | protected bool m_doAttachmentsInCastRay = false; |
238 | protected int m_msThrottleInCastRay = 200; | 237 | protected int m_msThrottleInCastRay = 200; |
239 | protected int m_msPerRegionInCastRay = 40; | 238 | protected int m_msPerRegionInCastRay = 40; |
@@ -391,7 +390,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
391 | m_maxHitsPerPrimInCastRay = lslConfig.GetInt("MaxHitsPerPrimInLlCastRay", m_maxHitsPerPrimInCastRay); | 390 | m_maxHitsPerPrimInCastRay = lslConfig.GetInt("MaxHitsPerPrimInLlCastRay", m_maxHitsPerPrimInCastRay); |
392 | m_maxHitsPerObjectInCastRay = lslConfig.GetInt("MaxHitsPerObjectInLlCastRay", m_maxHitsPerObjectInCastRay); | 391 | m_maxHitsPerObjectInCastRay = lslConfig.GetInt("MaxHitsPerObjectInLlCastRay", m_maxHitsPerObjectInCastRay); |
393 | m_detectExitsInCastRay = lslConfig.GetBoolean("DetectExitHitsInLlCastRay", m_detectExitsInCastRay); | 392 | m_detectExitsInCastRay = lslConfig.GetBoolean("DetectExitHitsInLlCastRay", m_detectExitsInCastRay); |
394 | m_filterPartsInCastRay = lslConfig.GetBoolean("FilterPartsInLlCastRay", m_filterPartsInCastRay); | ||
395 | m_doAttachmentsInCastRay = lslConfig.GetBoolean("DoAttachmentsInLlCastRay", m_doAttachmentsInCastRay); | 393 | m_doAttachmentsInCastRay = lslConfig.GetBoolean("DoAttachmentsInLlCastRay", m_doAttachmentsInCastRay); |
396 | m_msThrottleInCastRay = lslConfig.GetInt("ThrottleTimeInMsInLlCastRay", m_msThrottleInCastRay); | 394 | m_msThrottleInCastRay = lslConfig.GetInt("ThrottleTimeInMsInLlCastRay", m_msThrottleInCastRay); |
397 | m_msPerRegionInCastRay = lslConfig.GetInt("AvailableTimeInMsPerRegionInLlCastRay", m_msPerRegionInCastRay); | 395 | m_msPerRegionInCastRay = lslConfig.GetInt("AvailableTimeInMsPerRegionInLlCastRay", m_msPerRegionInCastRay); |
@@ -15063,8 +15061,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15063 | return; | 15061 | return; |
15064 | if (isPhantom && notdetectPhantom) | 15062 | if (isPhantom && notdetectPhantom) |
15065 | return; | 15063 | return; |
15066 | if (m_filterPartsInCastRay) | ||
15067 | return; | ||
15068 | if (isAttachment && !m_doAttachmentsInCastRay) | 15064 | if (isAttachment && !m_doAttachmentsInCastRay) |
15069 | return; | 15065 | return; |
15070 | 15066 | ||
@@ -15072,25 +15068,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15072 | // Iterate over all prims/parts in object/group | 15068 | // Iterate over all prims/parts in object/group |
15073 | foreach(SceneObjectPart part in group.Parts) | 15069 | foreach(SceneObjectPart part in group.Parts) |
15074 | { | 15070 | { |
15075 | // Check part filters if configured | 15071 | // ignore PhysicsShapeType.None as physics engines do |
15076 | if (m_filterPartsInCastRay) | 15072 | // or we will get into trouble in future |
15077 | { | 15073 | if(part.PhysicsShapeType == (byte)PhysicsShapeType.None) |
15078 | // ignore PhysicsShapeType.None as physics engines do | 15074 | continue; |
15079 | // or we will get into trouble in future | 15075 | isPhysical = (part.PhysActor != null && part.PhysActor.IsPhysical); |
15080 | if(part.PhysicsShapeType == (byte)PhysicsShapeType.None) | 15076 | isNonphysical = !isPhysical; |
15081 | continue; | 15077 | isPhantom = ((part.Flags & PrimFlags.Phantom) != 0) || |
15082 | isPhysical = (part.PhysActor != null && part.PhysActor.IsPhysical); | 15078 | (part.VolumeDetectActive); |
15083 | isNonphysical = !isPhysical; | ||
15084 | isPhantom = ((part.Flags & PrimFlags.Phantom) != 0) || | ||
15085 | (part.VolumeDetectActive); | ||
15086 | 15079 | ||
15087 | if (isPhysical && rejectPhysical) | 15080 | if (isPhysical && rejectPhysical) |
15088 | continue; | 15081 | continue; |
15089 | if (isNonphysical && rejectNonphysical) | 15082 | if (isNonphysical && rejectNonphysical) |
15090 | continue; | 15083 | continue; |
15091 | if (isPhantom && notdetectPhantom) | 15084 | if (isPhantom && notdetectPhantom) |
15092 | continue; | 15085 | continue; |
15093 | } | ||
15094 | 15086 | ||
15095 | // Parse prim/part and project ray if passed filters | 15087 | // Parse prim/part and project ray if passed filters |
15096 | Vector3 scalePart = part.Scale; | 15088 | Vector3 scalePart = part.Scale; |