Small optimization to last commit
parent
cc1476fc36
commit
003bd9f1b3
|
@ -3056,11 +3056,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public override void RemoveClient(UUID agentID, bool closeChildAgents)
|
public override void RemoveClient(UUID agentID, bool closeChildAgents)
|
||||||
{
|
{
|
||||||
CheckHeartbeat();
|
CheckHeartbeat();
|
||||||
bool childagentYN = false;
|
bool isChildAgent = false;
|
||||||
ScenePresence avatar = GetScenePresence(agentID);
|
ScenePresence avatar = GetScenePresence(agentID);
|
||||||
if (avatar != null)
|
if (avatar != null)
|
||||||
{
|
{
|
||||||
childagentYN = avatar.IsChildAgent;
|
isChildAgent = avatar.IsChildAgent;
|
||||||
|
|
||||||
if (avatar.ParentID != 0)
|
if (avatar.ParentID != 0)
|
||||||
{
|
{
|
||||||
|
@ -3071,9 +3071,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[SCENE]: Removing {0} agent {1} from region {2}",
|
"[SCENE]: Removing {0} agent {1} from region {2}",
|
||||||
(childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName);
|
(isChildAgent ? "child" : "root"), agentID, RegionInfo.RegionName);
|
||||||
|
|
||||||
m_sceneGraph.removeUserCount(!childagentYN);
|
m_sceneGraph.removeUserCount(!isChildAgent);
|
||||||
|
|
||||||
// TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop
|
// TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop
|
||||||
// unnecessary operations. This should go away once NPCs have no accompanying IClientAPI
|
// unnecessary operations. This should go away once NPCs have no accompanying IClientAPI
|
||||||
|
@ -3103,7 +3103,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
m_eventManager.TriggerOnRemovePresence(agentID);
|
m_eventManager.TriggerOnRemovePresence(agentID);
|
||||||
|
|
||||||
if (AttachmentsModule != null && !avatar.IsChildAgent && avatar.PresenceType != PresenceType.Npc)
|
if (AttachmentsModule != null && !isChildAgent && avatar.PresenceType != PresenceType.Npc)
|
||||||
{
|
{
|
||||||
IUserManagement uMan = RequestModuleInterface<IUserManagement>();
|
IUserManagement uMan = RequestModuleInterface<IUserManagement>();
|
||||||
// Don't save attachments for HG visitors, it
|
// Don't save attachments for HG visitors, it
|
||||||
|
|
Loading…
Reference in New Issue