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