One can now get hyoergrid region co-ordinates with llRequestSimulatorData

0.7.4.1
Blake.Bourque 2012-05-23 07:38:03 -04:00 committed by Justin Clark-Casey (justincc)
parent d6476b6277
commit 33b66009e4
1 changed files with 21 additions and 5 deletions

View File

@ -9098,7 +9098,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
GridRegion info;
if (m_ScriptEngine.World.RegionInfo.RegionName == simulator)
if (m_ScriptEngine.World.RegionInfo.RegionName == simulator) //Det data for this simulator?
info = new GridRegion(m_ScriptEngine.World.RegionInfo);
else
info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator);
@ -9111,10 +9112,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScriptSleep(1000);
return UUID.Zero.ToString();
}
if (m_ScriptEngine.World.RegionInfo.RegionName != simulator)
{
//Hypergrid Region co-ordinates
uint rx = 0, ry = 0;
Utils.LongToUInts(Convert.ToUInt64(info.RegionSecret), out rx, out ry);
reply = new LSL_Vector(
rx,
ry,
0).ToString();
}
else
{
//Local-cooridnates
reply = new LSL_Vector(
info.RegionLocX,
info.RegionLocY,
0).ToString();
}
break;
case ScriptBaseClass.DATA_SIM_STATUS:
if (info != null)