SL compatibility - return only points on segemtn, not ray in llCastRay

avinationmerge
Melanie 2012-03-05 02:37:51 +01:00
parent 0ed4f24b34
commit c2a73a26b5
1 changed files with 5 additions and 0 deletions

View File

@ -11574,6 +11574,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
Vector3 rayEnd = new Vector3((float)end.x, (float)end.y, (float)end.z);
Vector3 dir = rayEnd - rayStart;
float dist = Vector3.Mag(dir);
int count = 1;
bool detectPhantom = false;
int dataFlags = 0;
@ -11630,6 +11632,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
int values = 0;
foreach (ContactResult result in results)
{
if (result.Depth > dist)
continue;
UUID itemID = UUID.Zero;
int linkNum = 0;