One can now get hyoergrid region co-ordinates with llRequestSimulatorData
parent
4d44f2d248
commit
a1b64db942
|
@ -9053,7 +9053,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
GridRegion info;
|
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);
|
info = new GridRegion(m_ScriptEngine.World.RegionInfo);
|
||||||
else
|
else
|
||||||
info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator);
|
info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator);
|
||||||
|
@ -9066,10 +9067,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
ScriptSleep(1000);
|
ScriptSleep(1000);
|
||||||
return UUID.Zero.ToString();
|
return UUID.Zero.ToString();
|
||||||
}
|
}
|
||||||
reply = new LSL_Vector(
|
if (m_ScriptEngine.World.RegionInfo.RegionName != simulator)
|
||||||
info.RegionLocX,
|
{
|
||||||
info.RegionLocY,
|
//Hypergrid Region co-ordinates
|
||||||
0).ToString();
|
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;
|
break;
|
||||||
case ScriptBaseClass.DATA_SIM_STATUS:
|
case ScriptBaseClass.DATA_SIM_STATUS:
|
||||||
if (info != null)
|
if (info != null)
|
||||||
|
|
Loading…
Reference in New Issue