minor: Stop debug logging whenever an npc is moved, other npc log related formatting cleanups
parent
5dabecf95d
commit
ff08f56937
|
@ -146,9 +146,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
int.MaxValue);
|
int.MaxValue);
|
||||||
|
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}",
|
"[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}",
|
||||||
firstname, lastname, npcAvatar.AgentId, owner,
|
firstname, lastname, npcAvatar.AgentId, owner,
|
||||||
senseAsAgent, position, scene.RegionInfo.RegionName);
|
senseAsAgent, position, scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
AgentCircuitData acd = new AgentCircuitData();
|
AgentCircuitData acd = new AgentCircuitData();
|
||||||
acd.AgentID = npcAvatar.AgentId;
|
acd.AgentID = npcAvatar.AgentId;
|
||||||
|
@ -188,16 +188,16 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
|
|
||||||
sp.CompleteMovement(npcAvatar, false);
|
sp.CompleteMovement(npcAvatar, false);
|
||||||
m_avatars.Add(npcAvatar.AgentId, npcAvatar);
|
m_avatars.Add(npcAvatar.AgentId, npcAvatar);
|
||||||
m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}",
|
m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name);
|
||||||
npcAvatar.AgentId, sp.Name);
|
|
||||||
|
|
||||||
return npcAvatar.AgentId;
|
return npcAvatar.AgentId;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.WarnFormat(
|
||||||
"[NPC MODULE]: Could not find scene presence for NPC {0} {1}",
|
"[NPC MODULE]: Could not find scene presence for NPC {0} {1}",
|
||||||
sp.Name, sp.UUID);
|
sp.Name, sp.UUID);
|
||||||
|
|
||||||
return UUID.Zero;
|
return UUID.Zero;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -213,10 +213,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
ScenePresence sp;
|
ScenePresence sp;
|
||||||
if (scene.TryGetScenePresence(agentID, out sp))
|
if (scene.TryGetScenePresence(agentID, out sp))
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
"[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}",
|
// "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}",
|
||||||
sp.Name, pos, scene.RegionInfo.RegionName,
|
// sp.Name, pos, scene.RegionInfo.RegionName,
|
||||||
noFly, landAtTarget);
|
// noFly, landAtTarget);
|
||||||
|
|
||||||
sp.MoveToTarget(pos, noFly, landAtTarget);
|
sp.MoveToTarget(pos, noFly, landAtTarget);
|
||||||
sp.SetAlwaysRun = running;
|
sp.SetAlwaysRun = running;
|
||||||
|
@ -293,9 +293,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
ScenePresence sp;
|
ScenePresence sp;
|
||||||
if (scene.TryGetScenePresence(agentID, out sp))
|
if (scene.TryGetScenePresence(agentID, out sp))
|
||||||
{
|
{
|
||||||
sp.HandleAgentRequestSit(m_avatars[agentID], agentID,
|
sp.HandleAgentRequestSit(m_avatars[agentID], agentID, partID, Vector3.Zero);
|
||||||
partID, Vector3.Zero);
|
|
||||||
//sp.HandleAgentSit(m_avatars[agentID], agentID);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -387,8 +385,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
scene.IncomingCloseAgent(agentID, false);
|
scene.IncomingCloseAgent(agentID, false);
|
||||||
// scene.RemoveClient(agentID, false);
|
|
||||||
m_avatars.Remove(agentID);
|
m_avatars.Remove(agentID);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}",
|
m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}",
|
||||||
agentID, av.Name);
|
agentID, av.Name);
|
||||||
|
@ -427,4 +426,4 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
av.OwnerID == callerID;
|
av.OwnerID == callerID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue