aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorMelanie2013-01-25 00:10:32 +0000
committerMelanie2013-01-25 00:10:32 +0000
commit0b8bf69470aa461ac8b6554dce5e56427f39ac74 (patch)
tree9e2175c461425d1abc6ffbdb7d19278a9bf82c2e /OpenSim/Region/ScriptEngine/Shared
parentMerge branch 'avination' into careminster (diff)
parentBulletSim: reduce the zeroing threshold for rotational velocity. (diff)
downloadopensim-SC-0b8bf69470aa461ac8b6554dce5e56427f39ac74.zip
opensim-SC-0b8bf69470aa461ac8b6554dce5e56427f39ac74.tar.gz
opensim-SC-0b8bf69470aa461ac8b6554dce5e56427f39ac74.tar.bz2
opensim-SC-0b8bf69470aa461ac8b6554dce5e56427f39ac74.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs21
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs1
2 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 667cc09..1be2776 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -12091,12 +12091,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12091 radius = Math.Abs(maxY); 12091 radius = Math.Abs(maxY);
12092 if (Math.Abs(maxZ) > radius) 12092 if (Math.Abs(maxZ) > radius)
12093 radius = Math.Abs(maxZ); 12093 radius = Math.Abs(maxZ);
12094 12094 radius = radius*1.413f;
12095 Vector3 ac = group.AbsolutePosition - rayStart; 12095 Vector3 ac = group.AbsolutePosition - rayStart;
12096 Vector3 bc = group.AbsolutePosition - rayEnd; 12096 Vector3 bc = group.AbsolutePosition - rayEnd;
12097 12097
12098 double d = Math.Abs(Vector3.Mag(Vector3.Cross(ab, ac)) / Vector3.Distance(rayStart, rayEnd)); 12098 double d = Math.Abs(Vector3.Mag(Vector3.Cross(ab, ac)) / Vector3.Distance(rayStart, rayEnd));
12099 12099
12100 // Too far off ray, don't bother 12100 // Too far off ray, don't bother
12101 if (d > radius) 12101 if (d > radius)
12102 return; 12102 return;
@@ -12106,11 +12106,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12106 if (d2 > 0) 12106 if (d2 > 0)
12107 return; 12107 return;
12108 12108
12109 ray = new Ray(rayStart, Vector3.Normalize(rayEnd - rayStart));
12109 EntityIntersection intersection = group.TestIntersection(ray, true, false); 12110 EntityIntersection intersection = group.TestIntersection(ray, true, false);
12110 // Miss. 12111 // Miss.
12111 if (!intersection.HitTF) 12112 if (!intersection.HitTF)
12112 return; 12113 return;
12113 12114
12115 Vector3 b1 = group.AbsolutePosition + new Vector3(minX, minY, minZ);
12116 Vector3 b2 = group.AbsolutePosition + new Vector3(maxX, maxY, maxZ);
12117 //m_log.DebugFormat("[LLCASTRAY]: min<{0},{1},{2}>, max<{3},{4},{5}> = hitp<{6},{7},{8}>", b1.X,b1.Y,b1.Z,b2.X,b2.Y,b2.Z,intersection.ipoint.X,intersection.ipoint.Y,intersection.ipoint.Z);
12118 if (!(intersection.ipoint.X >= b1.X && intersection.ipoint.X <= b2.X &&
12119 intersection.ipoint.Y >= b1.Y && intersection.ipoint.Y <= b2.Y &&
12120 intersection.ipoint.Z >= b1.Z && intersection.ipoint.Z <= b2.Z))
12121 return;
12122
12114 ContactResult result = new ContactResult (); 12123 ContactResult result = new ContactResult ();
12115 result.ConsumerID = group.LocalId; 12124 result.ConsumerID = group.LocalId;
12116// result.Depth = intersection.distance; 12125// result.Depth = intersection.distance;
@@ -12384,8 +12393,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12384 if (checkPhysical || checkNonPhysical || detectPhantom) 12393 if (checkPhysical || checkNonPhysical || detectPhantom)
12385 { 12394 {
12386 ContactResult[] objectHits = ObjectIntersection(rayStart, rayEnd, checkPhysical, checkNonPhysical, detectPhantom); 12395 ContactResult[] objectHits = ObjectIntersection(rayStart, rayEnd, checkPhysical, checkNonPhysical, detectPhantom);
12387 foreach (ContactResult r in objectHits) 12396 for (int iter = 0; iter < objectHits.Length; iter++)
12388 results.Add(r); 12397 {
12398 // Redistance the Depth because the Scene RayCaster returns distance from center to make the rezzing code simpler.
12399 objectHits[iter].Depth = Vector3.Distance(objectHits[iter].Pos, rayStart);
12400 results.Add(objectHits[iter]);
12401 }
12389 } 12402 }
12390 } 12403 }
12391 12404
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
index 002e852..9d20c9e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -31,7 +31,6 @@ using System.Collections.Generic;
31using System.Globalization; 31using System.Globalization;
32using System.Reflection; 32using System.Reflection;
33using System.IO; 33using System.IO;
34using System.Linq;
35using System.Text; 34using System.Text;
36using Microsoft.CSharp; 35using Microsoft.CSharp;
37//using Microsoft.JScript; 36//using Microsoft.JScript;