One can now get hyoergrid region co-ordinates with llRequestSimulatorData
parent
d6476b6277
commit
33b66009e4
|
@ -9098,7 +9098,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);
|
||||||
|
@ -9111,10 +9112,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