diff options
author | UbitUmarov | 2016-08-01 04:48:01 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-01 04:48:01 +0100 |
commit | 4ba4c9cf9e2002386fc157837f14cefe68fc7520 (patch) | |
tree | 577c4e42f203f0883a7739db60d7889e831c9e53 /OpenSim | |
parent | replace DateTime.Now by utcNow in another place (diff) | |
download | opensim-SC_OLD-4ba4c9cf9e2002386fc157837f14cefe68fc7520.zip opensim-SC_OLD-4ba4c9cf9e2002386fc157837f14cefe68fc7520.tar.gz opensim-SC_OLD-4ba4c9cf9e2002386fc157837f14cefe68fc7520.tar.bz2 opensim-SC_OLD-4ba4c9cf9e2002386fc157837f14cefe68fc7520.tar.xz |
missed a Math.sqrt ...
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index fb35a54..e074af2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6394,7 +6394,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6394 | { | 6394 | { |
6395 | m_host.AddScriptLPS(1); | 6395 | m_host.AddScriptLPS(1); |
6396 | 6396 | ||
6397 | if(dir.x == 0.0 && dir.y == 0.0) | 6397 | if(dir.x == 0 && dir.y == 0) |
6398 | return 1; // SL wiki | 6398 | return 1; // SL wiki |
6399 | 6399 | ||
6400 | float rsx = World.RegionInfo.RegionSizeX; | 6400 | float rsx = World.RegionInfo.RegionSizeX; |
@@ -6409,9 +6409,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6409 | if (dir.x == 0) | 6409 | if (dir.x == 0) |
6410 | { | 6410 | { |
6411 | ex = px; | 6411 | ex = px; |
6412 | ey = dir.y > 0.0 ? rsy + 1.0f : -1.0f; | 6412 | ey = dir.y > 0 ? rsy + 1.0f : -1.0f; |
6413 | } | 6413 | } |
6414 | else if(dir.y == 0.0f) | 6414 | else if(dir.y == 0) |
6415 | { | 6415 | { |
6416 | ex = dir.x > 0 ? rsx + 1.0f : -1.0f; | 6416 | ex = dir.x > 0 ? rsx + 1.0f : -1.0f; |
6417 | ey = py; | 6417 | ey = py; |
@@ -6422,6 +6422,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6422 | float dy = (float) dir.y; | 6422 | float dy = (float) dir.y; |
6423 | 6423 | ||
6424 | float t1 = dx * dx + dy * dy; | 6424 | float t1 = dx * dx + dy * dy; |
6425 | t1 = (float)Math.Sqrt(t1); | ||
6425 | dx /= t1; | 6426 | dx /= t1; |
6426 | dy /= t1; | 6427 | dy /= t1; |
6427 | 6428 | ||
@@ -6430,7 +6431,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6430 | else | 6431 | else |
6431 | t1 = -(px + 1f)/dx; | 6432 | t1 = -(px + 1f)/dx; |
6432 | 6433 | ||
6433 | |||
6434 | float t2; | 6434 | float t2; |
6435 | if(dy > 0) | 6435 | if(dy > 0) |
6436 | t2 = (rsy + 1f - py)/dy; | 6436 | t2 = (rsy + 1f - py)/dy; |