Fix global region coordinates that are delivered by llRequestSimulatorData.

Also did some source code clean-up by replacing literals with constants.
viewer-2-initial-appearance
Marck 2010-11-16 13:46:26 +01:00 committed by Justin Clark-Casey (justincc)
parent a88bcbb118
commit f1151f20dc
1 changed files with 6 additions and 6 deletions

View File

@ -8750,24 +8750,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
switch (data)
{
case 5: // DATA_SIM_POS
case ScriptBaseClass.DATA_SIM_POS:
if (info == null)
{
ScriptSleep(1000);
return UUID.Zero.ToString();
}
reply = new LSL_Vector(
info.RegionLocX * Constants.RegionSize,
info.RegionLocY * Constants.RegionSize,
info.RegionLocX,
info.RegionLocY,
0).ToString();
break;
case 6: // DATA_SIM_STATUS
case ScriptBaseClass.DATA_SIM_STATUS:
if (info != null)
reply = "up"; // Duh!
else
reply = "unknown";
break;
case 7: // DATA_SIM_RATING
case ScriptBaseClass.DATA_SIM_RATING:
if (info == null)
{
ScriptSleep(1000);
@ -8783,7 +8783,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
else
reply = "UNKNOWN";
break;
case 128:
case ScriptBaseClass.DATA_SIM_RELEASE:
if (ossl != null)
ossl.CheckThreatLevel(ThreatLevel.High, "llRequestSimulatorData");
reply = "OpenSim";