aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs12
2 files changed, 10 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 61c5add..5c6d382 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4232,22 +4232,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4232 UUID uuid = (UUID)id; 4232 UUID uuid = (UUID)id;
4233 4233
4234 UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid); 4234 UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid);
4235 if (account == null)
4236 return UUID.Zero.ToString();
4237
4235 4238
4236 PresenceInfo pinfo = null; 4239 PresenceInfo pinfo = null;
4237 PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); 4240 PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() });
4238 if (pinfos != null && pinfos.Length > 0) 4241 if (pinfos != null && pinfos.Length > 0)
4239 pinfo = pinfos[0]; 4242 pinfo = pinfos[0];
4240 4243
4241 if (pinfo == null)
4242 return UUID.Zero.ToString();
4243
4244 string reply = String.Empty; 4244 string reply = String.Empty;
4245 4245
4246 switch (data) 4246 switch (data)
4247 { 4247 {
4248 case 1: // DATA_ONLINE (0|1) 4248 case 1: // DATA_ONLINE (0|1)
4249 // TODO: implement fetching of this information 4249 if (pinfo != null && pinfo.RegionID != UUID.Zero)
4250 if (pinfo != null)
4251 reply = "1"; 4250 reply = "1";
4252 else 4251 else
4253 reply = "0"; 4252 reply = "0";
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 1ea52c5..212dbe3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -83,19 +83,19 @@ namespace OpenSim.Region.ScriptEngine.Shared
83 83
84 public override string ToString() 84 public override string ToString()
85 { 85 {
86 string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", x, y, z); 86 string s=String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}>", x, y, z);
87 return s; 87 return s;
88 } 88 }
89 89
90 public static explicit operator LSLString(Vector3 vec) 90 public static explicit operator LSLString(Vector3 vec)
91 { 91 {
92 string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", vec.x, vec.y, vec.z); 92 string s=String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}>", vec.x, vec.y, vec.z);
93 return new LSLString(s); 93 return new LSLString(s);
94 } 94 }
95 95
96 public static explicit operator string(Vector3 vec) 96 public static explicit operator string(Vector3 vec)
97 { 97 {
98 string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", vec.x, vec.y, vec.z); 98 string s=String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}>", vec.x, vec.y, vec.z);
99 return s; 99 return s;
100 } 100 }
101 101
@@ -337,19 +337,19 @@ namespace OpenSim.Region.ScriptEngine.Shared
337 337
338 public override string ToString() 338 public override string ToString()
339 { 339 {
340 string st=String.Format(Culture.FormatProvider, "<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", x, y, z, s); 340 string st=String.Format(Culture.FormatProvider, "<{0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000}>", x, y, z, s);
341 return st; 341 return st;
342 } 342 }
343 343
344 public static explicit operator string(Quaternion r) 344 public static explicit operator string(Quaternion r)
345 { 345 {
346 string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", r.x, r.y, r.z, r.s); 346 string s=String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000}>", r.x, r.y, r.z, r.s);
347 return s; 347 return s;
348 } 348 }
349 349
350 public static explicit operator LSLString(Quaternion r) 350 public static explicit operator LSLString(Quaternion r)
351 { 351 {
352 string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", r.x, r.y, r.z, r.s); 352 string s=String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000}>", r.x, r.y, r.z, r.s);
353 return new LSLString(s); 353 return new LSLString(s);
354 } 354 }
355 355