aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorroot2010-09-17 01:50:48 +0200
committerMelanie2010-09-17 01:57:26 +0100
commit7762301cea99215df4068cca71b78335df5a4a40 (patch)
tree4423c7a47e4305881f1c1aa9472d965027336314 /OpenSim/Region/ScriptEngine/Shared
parentFixed a regression in SOG.Copy() (diff)
downloadopensim-SC_OLD-7762301cea99215df4068cca71b78335df5a4a40.zip
opensim-SC_OLD-7762301cea99215df4068cca71b78335df5a4a40.tar.gz
opensim-SC_OLD-7762301cea99215df4068cca71b78335df5a4a40.tar.bz2
opensim-SC_OLD-7762301cea99215df4068cca71b78335df5a4a40.tar.xz
Revert "* Changed 11 calls for session info to the more optimized API method"
This reverts commit 5dc9ea2f2487804d788b4b80d40d91bd792de4c2. Also makes online indicators and IM more robust
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs26
1 files changed, 24 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 01c026e..621d429 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3956,7 +3956,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3956 } 3956 }
3957 3957
3958 3958
3959 pinfo = World.PresenceService.GetAgent(uuid); 3959 PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() });
3960 if (pinfos != null && pinfos.Length > 0)
3961 {
3962 foreach (PresenceInfo p in pinfos)
3963 {
3964 if (p.RegionID != UUID.Zero)
3965 {
3966 pinfo = p;
3967 }
3968 }
3969 }
3960 3970
3961 ce = new UserInfoCacheEntry(); 3971 ce = new UserInfoCacheEntry();
3962 ce.time = Util.EnvironmentTickCount(); 3972 ce.time = Util.EnvironmentTickCount();
@@ -3974,7 +3984,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3974 3984
3975 if (Util.EnvironmentTickCount() < ce.time || (Util.EnvironmentTickCount() - ce.time) >= 20000) 3985 if (Util.EnvironmentTickCount() < ce.time || (Util.EnvironmentTickCount() - ce.time) >= 20000)
3976 { 3986 {
3977 pinfo = World.PresenceService.GetAgent(uuid); 3987 PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() });
3988 if (pinfos != null && pinfos.Length > 0)
3989 {
3990 foreach (PresenceInfo p in pinfos)
3991 {
3992 if (p.RegionID != UUID.Zero)
3993 {
3994 pinfo = p;
3995 }
3996 }
3997 }
3998 else
3999 pinfo = null;
3978 4000
3979 ce.time = Util.EnvironmentTickCount(); 4001 ce.time = Util.EnvironmentTickCount();
3980 ce.pinfo = pinfo; 4002 ce.pinfo = pinfo;