Reserve a extra localID for a presence ( it will be localID + 1 )

avinationmerge
UbitUmarov 2014-08-20 17:54:23 +01:00
parent b21b6532b0
commit 16cf3967b4
2 changed files with 13 additions and 1 deletions

View File

@ -296,6 +296,18 @@ namespace OpenSim.Region.Framework.Scenes
return myID;
}
public uint AllocatePresenceLocalId()
{
uint myID;
_primAllocateMutex.WaitOne();
myID = ++m_lastAllocatedLocalId;
++m_lastAllocatedLocalId;
_primAllocateMutex.ReleaseMutex();
return myID;
}
#region Module Methods
/// <summary>

View File

@ -969,7 +969,7 @@ namespace OpenSim.Region.Framework.Scenes
m_name = String.Format("{0} {1}", Firstname, Lastname);
m_scene = world;
m_uuid = client.AgentId;
LocalId = m_scene.AllocateLocalId();
LocalId = m_scene.AllocatePresenceLocalId();
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid);
if (account != null)