* Changed 11 calls for session info to the more optimized API method

This commit is contained in:
John Hurliman
2010-09-08 15:08:49 -07:00
parent 3fb4a17f10
commit 5dc9ea2f24
4 changed files with 37 additions and 81 deletions

View File

@@ -3971,9 +3971,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() });
if (pinfos != null && pinfos.Length > 0)
pinfo = pinfos[0];
pinfo = World.PresenceService.GetAgent(uuid);
ce = new UserInfoCacheEntry();
ce.time = Util.EnvironmentTickCount();
@@ -3991,11 +3989,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (Util.EnvironmentTickCount() < ce.time || (Util.EnvironmentTickCount() - ce.time) >= 20000)
{
PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() });
if (pinfos != null && pinfos.Length > 0)
pinfo = pinfos[0];
else
pinfo = null;
pinfo = World.PresenceService.GetAgent(uuid);
ce.time = Util.EnvironmentTickCount();
ce.pinfo = pinfo;