diff options
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 | ||||
-rw-r--r-- | OpenSim/Services/Connectors/Estate/EstateDataConnector.cs | 6 |
2 files changed, 7 insertions, 7 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; |
diff --git a/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs b/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs index 6412bcd..74935f3 100644 --- a/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs +++ b/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs | |||
@@ -120,7 +120,7 @@ namespace OpenSim.Services.Connectors | |||
120 | // If we don't have them, load them from the server | 120 | // If we don't have them, load them from the server |
121 | List<EstateSettings> estates = null; | 121 | List<EstateSettings> estates = null; |
122 | if (!m_EstateCache.TryGetValue("estates", out estates)) | 122 | if (!m_EstateCache.TryGetValue("estates", out estates)) |
123 | LoadEstateSettingsAll(); | 123 | estates = LoadEstateSettingsAll(); |
124 | 124 | ||
125 | foreach (EstateSettings es in estates) | 125 | foreach (EstateSettings es in estates) |
126 | eids.Add((int)es.EstateID); | 126 | eids.Add((int)es.EstateID); |
@@ -133,7 +133,7 @@ namespace OpenSim.Services.Connectors | |||
133 | // If we don't have them, load them from the server | 133 | // If we don't have them, load them from the server |
134 | List<EstateSettings> estates = null; | 134 | List<EstateSettings> estates = null; |
135 | if (!m_EstateCache.TryGetValue("estates", out estates)) | 135 | if (!m_EstateCache.TryGetValue("estates", out estates)) |
136 | LoadEstateSettingsAll(); | 136 | estates = LoadEstateSettingsAll(); |
137 | 137 | ||
138 | List<int> eids = new List<int>(); | 138 | List<int> eids = new List<int>(); |
139 | foreach (EstateSettings es in estates) | 139 | foreach (EstateSettings es in estates) |
@@ -148,7 +148,7 @@ namespace OpenSim.Services.Connectors | |||
148 | // If we don't have them, load them from the server | 148 | // If we don't have them, load them from the server |
149 | List<EstateSettings> estates = null; | 149 | List<EstateSettings> estates = null; |
150 | if (!m_EstateCache.TryGetValue("estates", out estates)) | 150 | if (!m_EstateCache.TryGetValue("estates", out estates)) |
151 | LoadEstateSettingsAll(); | 151 | estates = LoadEstateSettingsAll(); |
152 | 152 | ||
153 | List<int> eids = new List<int>(); | 153 | List<int> eids = new List<int>(); |
154 | foreach (EstateSettings es in estates) | 154 | foreach (EstateSettings es in estates) |