Added some debug messages for avatar border crossing.

dsg
Huaiyu (Kitty) Liu 2011-05-17 10:33:58 -07:00
parent 3f07bf204b
commit 0e1efc3250
4 changed files with 18 additions and 2 deletions

View File

@ -567,8 +567,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
protected void AttachToAgent(ScenePresence avatar, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent) protected void AttachToAgent(ScenePresence avatar, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent)
{ {
m_log.DebugFormat("[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}", Name, avatar.Name, m_log.DebugFormat("[ATTACHMENTS MODULE] Region {5}: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}", Name, avatar.Name,
attachmentpoint, attachOffset, so.RootPart.AttachedPos); attachmentpoint, attachOffset, so.RootPart.AttachedPos, m_scene.RegionInfo.RegionName);
so.DetachFromBackup(); so.DetachFromBackup();

View File

@ -234,6 +234,9 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
//m_log.DebugFormat("[REGION SYNC SERVER MODULE] QueuePresenceForUpdate: {0}", presence.UUID.ToString()); //m_log.DebugFormat("[REGION SYNC SERVER MODULE] QueuePresenceForUpdate: {0}", presence.UUID.ToString());
} }
//DSG DEBUG
private Vector3 lastPos;
public void SendUpdates() public void SendUpdates()
{ {
if (!Active || !Synced) if (!Active || !Synced)
@ -297,6 +300,14 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
presence.lastSentParentID = presence.ParentID; presence.lastSentParentID = presence.ParentID;
} }
//DSG DEBUG
//Vector3 diff = presence.AbsolutePosition - lastPos;
if (Vector3.Distance(presence.AbsolutePosition, lastPos) > 0.1)
{
m_log.DebugFormat("Sending UpdatedAvatar for avatar {0}, with new pos {1}", presence.Name, presence.AbsolutePosition);
lastPos = presence.AbsolutePosition;
}
RegionSyncMessage rsm = new RegionSyncMessage(RegionSyncMessage.MsgType.UpdatedAvatar, OSDParser.SerializeJsonString(data)); RegionSyncMessage rsm = new RegionSyncMessage(RegionSyncMessage.MsgType.UpdatedAvatar, OSDParser.SerializeJsonString(data));
m_server.EnqueuePresenceUpdate(presence.UUID, rsm.ToBytes()); m_server.EnqueuePresenceUpdate(presence.UUID, rsm.ToBytes());

View File

@ -302,6 +302,8 @@ namespace OpenSim.Region.Framework.Scenes
|| Scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || Scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S)) || Scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || Scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
&& !IsAttachmentCheckFull() && (!Scene.LoadingPrims)) && !IsAttachmentCheckFull() && (!Scene.LoadingPrims))
{ {
//DSG DEBUG
m_log.DebugFormat("Object {0},{1} at pos {2}, to call CrossPrimGroupIntoNewRegion.", Name, UUID, val);
m_scene.CrossPrimGroupIntoNewRegion(val, this, true); m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
} }
} }

View File

@ -2934,6 +2934,9 @@ namespace OpenSim.Region.Framework.Scenes
} }
else if (neighbor > 0) else if (neighbor > 0)
{ {
//DSG DEBUG
m_log.DebugFormat("{0} now at pos {1}, calling CrossToNewRegion", Name);
if (!CrossToNewRegion()) if (!CrossToNewRegion())
{ {
if (m_requestedSitTargetUUID == UUID.Zero) if (m_requestedSitTargetUUID == UUID.Zero)