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

avinationmerge
Melanie Thielker 2010-08-08 17:53:25 +02:00
commit 6cb50c49b5
2 changed files with 1051 additions and 1020 deletions

View File

@ -281,6 +281,34 @@ namespace OpenSim.Region.CoreModules.World.Land
return false;
}
public bool HasGroupAccess(UUID avatar)
{
if ((LandData.Flags & (uint)ParcelFlags.UseAccessGroup) == (uint)ParcelFlags.UseAccessGroup)
{
IGroupsModule groupsModule =
m_scene.RequestModuleInterface<IGroupsModule>();
List<UUID> agentGroups = new List<UUID>();
if (groupsModule != null)
{
GroupMembershipData[] GroupMembership =
groupsModule.GetMembershipData(avatar);
if (GroupMembership != null)
{
for (int i = 0; i < GroupMembership.Length; i++)
{
if (LandData.GroupID == GroupMembership[i].GroupID)
{
return true;
}
}
}
}
}
return false;
}
public bool IsBannedFromLand(UUID avatar)
{
if (m_scene.Permissions.IsAdministrator(avatar))
@ -317,10 +345,14 @@ namespace OpenSim.Region.CoreModules.World.Land
//If they are not on the access list and are not the owner
if (!LandData.ParcelAccessList.Contains(entry) && LandData.OwnerID != avatar)
{
//They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel
return true;
if (!HasGroupAccess(avatar))
{
//They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel
return true;
}
}
}
return false;
}

View File

@ -2053,13 +2053,9 @@ namespace OpenSim.Region.Framework.Scenes
//Console.WriteLine("Camera Eye ={0}", cameraEyeOffset);
//NOTE: SendSitResponse should be relative to the GROUP *NOT* THE PRIM if we're sitting on a child
Quaternion roffset = Quaternion.Identity;
if (SitTargetisSet)
{
roffset = part.RotationOffset;
}
ControllingClient.SendSitResponse(part.ParentGroup.UUID, ((offset * roffset) + part.OffsetPosition), sitOrientation / part.RotationOffset, autopilot, cameraAtOffset, cameraEyeOffset, forceMouselook);
ControllingClient.SendSitResponse(part.ParentGroup.UUID, ((offset * part.RotationOffset) + part.OffsetPosition), sitOrientation, autopilot, cameraAtOffset, cameraEyeOffset, forceMouselook);
m_requestedSitTargetUUID = part.UUID; //KF: Correct autopilot target
// This calls HandleAgentSit twice, once from here, and the client calls
// HandleAgentSit itself after it gets to the location
// It doesn't get to the location until we've moved them there though
@ -2444,7 +2440,10 @@ namespace OpenSim.Region.Framework.Scenes
}
m_linkedPrim = part.UUID;
m_offsetRotation = m_offsetRotation / part.RotationOffset;
if (part.GetAvatarOnSitTarget() != UUID)
{
m_offsetRotation = m_offsetRotation / part.RotationOffset;
}
Velocity = Vector3.Zero;
RemoveFromPhysicalScene();
Animator.TrySetMovementAnimation(sitAnimation);