Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor

avinationmerge
Melanie 2010-08-09 00:49:40 +01:00
commit b0795bcfef
2 changed files with 23 additions and 23 deletions

View File

@ -2592,6 +2592,12 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns>True if the SceneObjectGroup was added, False if it was not</returns> /// <returns>True if the SceneObjectGroup was added, False if it was not</returns>
public bool AddSceneObject(SceneObjectGroup sceneObject) public bool AddSceneObject(SceneObjectGroup sceneObject)
{ {
if (sceneObject.OwnerID == UUID.Zero)
{
m_log.ErrorFormat("[SCENE]: Owner ID for {0} was zero", sceneObject.UUID);
return false;
}
// If the user is banned, we won't let any of their objects // If the user is banned, we won't let any of their objects
// enter. Period. // enter. Period.
// //
@ -2641,15 +2647,27 @@ namespace OpenSim.Region.Framework.Scenes
if (AttachmentsModule != null) if (AttachmentsModule != null)
AttachmentsModule.AttachObject(sp.ControllingClient, grp, 0, false); AttachmentsModule.AttachObject(sp.ControllingClient, grp, 0, false);
m_log.DebugFormat("[SCENE]: Attachment {0} arrived and scene presence was found, attaching", sceneObject.UUID);
} }
else else
{ {
m_log.DebugFormat("[SCENE]: Attachment {0} arrived and scene presence was not found, setting to temp", sceneObject.UUID);
RootPrim.RemFlag(PrimFlags.TemporaryOnRez); RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
RootPrim.AddFlag(PrimFlags.TemporaryOnRez); RootPrim.AddFlag(PrimFlags.TemporaryOnRez);
} }
if (sceneObject.OwnerID == UUID.Zero)
{
m_log.ErrorFormat("[SCENE]: Owner ID for {0} was zero after attachment processing. BUG!", sceneObject.UUID);
return false;
}
} }
else else
{ {
if (sceneObject.OwnerID == UUID.Zero)
{
m_log.ErrorFormat("[SCENE]: Owner ID for non-attachment {0} was zero", sceneObject.UUID);
return false;
}
AddRestoredSceneObject(sceneObject, true, false); AddRestoredSceneObject(sceneObject, true, false);
if (!Permissions.CanObjectEntry(sceneObject.UUID, if (!Permissions.CanObjectEntry(sceneObject.UUID,
@ -3495,7 +3513,8 @@ namespace OpenSim.Region.Framework.Scenes
if (tp == TeleportFlags.ViaLogin) if (tp == TeleportFlags.ViaLogin)
{ {
if (land != null && !TestLandRestrictions(agent, land, out reason)) if (land != null && !TestLandRestrictions(agent, land, out reason))
{ {
m_log.DebugFormat("[CONNECTION BEGIN]: Denying access to {0} due to no land access", agent.AgentID.ToString());
return false; return false;
} }
} }
@ -5333,4 +5352,4 @@ namespace OpenSim.Region.Framework.Scenes
return offsets.ToArray(); return offsets.ToArray();
} }
} }
} }

View File

@ -228,27 +228,8 @@ namespace OpenSim.Region.Framework.Scenes
if (sp.IsChildAgent) if (sp.IsChildAgent)
return; return;
if (sp.ParentID != 0) coarseLocations.Add(sp.AbsolutePosition);
{ avatarUUIDs.Add(sp.UUID);
// sitting avatar
SceneObjectPart sop = m_parentScene.GetSceneObjectPart(sp.ParentID);
if (sop != null)
{
coarseLocations.Add(sop.AbsolutePosition + sp.AbsolutePosition);
avatarUUIDs.Add(sp.UUID);
}
else
{
// we can't find the parent.. ! arg!
coarseLocations.Add(sp.AbsolutePosition);
avatarUUIDs.Add(sp.UUID);
}
}
else
{
coarseLocations.Add(sp.AbsolutePosition);
avatarUUIDs.Add(sp.UUID);
}
} }
} }