mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
SL compatibility - return only points on segemtn, not ray in llCastRay
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user