Merge branch 'master' into httptests

httptests
UbitUmarov 2016-08-02 01:40:00 +01:00
commit 3b76b2f176
2 changed files with 7 additions and 7 deletions

View File

@ -6394,7 +6394,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if(dir.x == 0.0 && dir.y == 0.0) if(dir.x == 0 && dir.y == 0)
return 1; // SL wiki return 1; // SL wiki
float rsx = World.RegionInfo.RegionSizeX; float rsx = World.RegionInfo.RegionSizeX;
@ -6409,9 +6409,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (dir.x == 0) if (dir.x == 0)
{ {
ex = px; ex = px;
ey = dir.y > 0.0 ? rsy + 1.0f : -1.0f; ey = dir.y > 0 ? rsy + 1.0f : -1.0f;
} }
else if(dir.y == 0.0f) else if(dir.y == 0)
{ {
ex = dir.x > 0 ? rsx + 1.0f : -1.0f; ex = dir.x > 0 ? rsx + 1.0f : -1.0f;
ey = py; ey = py;
@ -6422,6 +6422,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
float dy = (float) dir.y; float dy = (float) dir.y;
float t1 = dx * dx + dy * dy; float t1 = dx * dx + dy * dy;
t1 = (float)Math.Sqrt(t1);
dx /= t1; dx /= t1;
dy /= t1; dy /= t1;
@ -6430,7 +6431,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
else else
t1 = -(px + 1f)/dx; t1 = -(px + 1f)/dx;
float t2; float t2;
if(dy > 0) if(dy > 0)
t2 = (rsy + 1f - py)/dy; t2 = (rsy + 1f - py)/dy;

View File

@ -120,7 +120,7 @@ namespace OpenSim.Services.Connectors
// If we don't have them, load them from the server // If we don't have them, load them from the server
List<EstateSettings> estates = null; List<EstateSettings> estates = null;
if (!m_EstateCache.TryGetValue("estates", out estates)) if (!m_EstateCache.TryGetValue("estates", out estates))
LoadEstateSettingsAll(); estates = LoadEstateSettingsAll();
foreach (EstateSettings es in estates) foreach (EstateSettings es in estates)
eids.Add((int)es.EstateID); eids.Add((int)es.EstateID);
@ -133,7 +133,7 @@ namespace OpenSim.Services.Connectors
// If we don't have them, load them from the server // If we don't have them, load them from the server
List<EstateSettings> estates = null; List<EstateSettings> estates = null;
if (!m_EstateCache.TryGetValue("estates", out estates)) if (!m_EstateCache.TryGetValue("estates", out estates))
LoadEstateSettingsAll(); estates = LoadEstateSettingsAll();
List<int> eids = new List<int>(); List<int> eids = new List<int>();
foreach (EstateSettings es in estates) foreach (EstateSettings es in estates)
@ -148,7 +148,7 @@ namespace OpenSim.Services.Connectors
// If we don't have them, load them from the server // If we don't have them, load them from the server
List<EstateSettings> estates = null; List<EstateSettings> estates = null;
if (!m_EstateCache.TryGetValue("estates", out estates)) if (!m_EstateCache.TryGetValue("estates", out estates))
LoadEstateSettingsAll(); estates = LoadEstateSettingsAll();
List<int> eids = new List<int>(); List<int> eids = new List<int>();
foreach (EstateSettings es in estates) foreach (EstateSettings es in estates)