aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBlake.Bourque2012-05-23 07:38:03 -0400
committerJustin Clark-Casey (justincc)2012-05-26 01:32:42 +0100
commit33b66009e43fa7c488b06c557dc46273288750d4 (patch)
treee741b9fbbe0271d22b130a4d03178f97b3b9d821
parentUse GetInventoryItem() in LSL_Api.InventoryKey(string name, int type). (diff)
downloadopensim-SC_OLD-33b66009e43fa7c488b06c557dc46273288750d4.zip
opensim-SC_OLD-33b66009e43fa7c488b06c557dc46273288750d4.tar.gz
opensim-SC_OLD-33b66009e43fa7c488b06c557dc46273288750d4.tar.bz2
opensim-SC_OLD-33b66009e43fa7c488b06c557dc46273288750d4.tar.xz
One can now get hyoergrid region co-ordinates with llRequestSimulatorData
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs26
1 files changed, 21 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 6438bcc..84493b1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -9098,7 +9098,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9098 9098
9099 GridRegion info; 9099 GridRegion info;
9100 9100
9101 if (m_ScriptEngine.World.RegionInfo.RegionName == simulator) 9101 if (m_ScriptEngine.World.RegionInfo.RegionName == simulator) //Det data for this simulator?
9102
9102 info = new GridRegion(m_ScriptEngine.World.RegionInfo); 9103 info = new GridRegion(m_ScriptEngine.World.RegionInfo);
9103 else 9104 else
9104 info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator); 9105 info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator);
@@ -9111,10 +9112,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9111 ScriptSleep(1000); 9112 ScriptSleep(1000);
9112 return UUID.Zero.ToString(); 9113 return UUID.Zero.ToString();
9113 } 9114 }
9114 reply = new LSL_Vector( 9115 if (m_ScriptEngine.World.RegionInfo.RegionName != simulator)
9115 info.RegionLocX, 9116 {
9116 info.RegionLocY, 9117 //Hypergrid Region co-ordinates
9117 0).ToString(); 9118 uint rx = 0, ry = 0;
9119 Utils.LongToUInts(Convert.ToUInt64(info.RegionSecret), out rx, out ry);
9120
9121 reply = new LSL_Vector(
9122 rx,
9123 ry,
9124 0).ToString();
9125 }
9126 else
9127 {
9128 //Local-cooridnates
9129 reply = new LSL_Vector(
9130 info.RegionLocX,
9131 info.RegionLocY,
9132 0).ToString();
9133 }
9118 break; 9134 break;
9119 case ScriptBaseClass.DATA_SIM_STATUS: 9135 case ScriptBaseClass.DATA_SIM_STATUS:
9120 if (info != null) 9136 if (info != null)