aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs85
1 files changed, 0 insertions, 85 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 8f9ff03..9cb3cad 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -14484,91 +14484,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14484 return contacts.ToArray(); 14484 return contacts.ToArray();
14485 } 14485 }
14486 14486
14487 private ContactResult? GroundIntersection2(Vector3 rayStart, Vector3 rayEnd)
14488 {
14489 // get work copies
14490 float sx = rayStart.X;
14491 float ex = rayEnd.X;
14492 float sy = rayStart.Y;
14493 float ey = rayEnd.Y;
14494
14495 float dx = ex - sx;
14496 float dy = ey - sy;
14497
14498 // region size info
14499 float rsx = World.RegionInfo.RegionSizeX;
14500
14501 float tmp;
14502
14503 // region bounds
14504 if(sx < 0)
14505 {
14506 if(ex < 0) // totally outside
14507 return null;
14508 if(dx <= 0) // out and going away
14509 return null;
14510 else if(ex >= rsx)
14511 ex = rsx - 0.001f;
14512 tmp = -sx / dx;
14513 sy += dy * dx;
14514 sx = 0;
14515 }
14516 else if(sx >= rsx)
14517 {
14518 if(ex >= rsx) // totally outside
14519 return null;
14520 if(dx >= 0) // out and going away
14521 return null;
14522 else if(ex < 0)
14523 ex = 0;
14524 tmp = (rsx - sx) / dx;
14525 sy += dy * dx;
14526 sx = rsx - 0.001f;
14527 }
14528
14529 float rsy = World.RegionInfo.RegionSizeY;
14530 if(sy < 0)
14531 {
14532 if(dy <= 0) // out and going away
14533 return null;
14534 else if(ey >= rsy)
14535 ey = rsy - 0.001f;
14536 tmp = -sy / dy;
14537 sx += dy * dx;
14538 sy = 0;
14539 }
14540 else if(sy >= rsy)
14541 {
14542 if(dy >= 0) // out and going away
14543 return null;
14544 else if(ey < 0)
14545 ey = 0;
14546 tmp = (rsy - sy) / dy;
14547 sx += dy * dx;
14548 sy = rsy - 0.001f;
14549 }
14550
14551 if(sx < 0 || sx >= rsx)
14552 return null;
14553
14554 float sz = rayStart.Z;
14555 float ez = rayEnd.Z;
14556 float dz = ez - sz;
14557
14558 float dist = dx * dx + dy * dy + dz * dz;
14559 if(dist < 0.001)
14560 return null;
14561 dist = (float)Math.Sqrt(dist);
14562 tmp = 1.0f / dist;
14563 Vector3 rayn = new Vector3(dx * tmp, dy * tmp, dz * tmp);
14564
14565 ContactResult? result = null;
14566
14567
14568
14569 return result;
14570 }
14571
14572 private ContactResult? GroundIntersection(Vector3 rayStart, Vector3 rayEnd) 14487 private ContactResult? GroundIntersection(Vector3 rayStart, Vector3 rayEnd)
14573 { 14488 {
14574 double[,] heightfield = World.Heightmap.GetDoubles(); 14489 double[,] heightfield = World.Heightmap.GetDoubles();