Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs OpenSim/Region/Framework/Scenes/Scene.csavinationmerge
commit
e8f4c7128f
|
@ -71,7 +71,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_URL = config.GetString("Cap_AvatarPickerSearch", string.Empty);
|
m_URL = config.GetString("Cap_AvatarPickerSearch", string.Empty);
|
||||||
m_log.DebugFormat("[XXX]: Cap_AvatarPickerSearch = {0}", m_URL);
|
|
||||||
// Cap doesn't exist
|
// Cap doesn't exist
|
||||||
if (m_URL != string.Empty)
|
if (m_URL != string.Empty)
|
||||||
m_Enabled = true;
|
m_Enabled = true;
|
||||||
|
|
|
@ -74,6 +74,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
protected IUserManagement m_userManager;
|
protected IUserManagement m_userManager;
|
||||||
protected IPrimCountModule m_primCountModule;
|
protected IPrimCountModule m_primCountModule;
|
||||||
|
protected IDialogModule m_Dialog;
|
||||||
|
|
||||||
// Minimum for parcels to work is 64m even if we don't actually use them.
|
// Minimum for parcels to work is 64m even if we don't actually use them.
|
||||||
#pragma warning disable 0429
|
#pragma warning disable 0429
|
||||||
|
@ -161,6 +162,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
m_userManager = m_scene.RequestModuleInterface<IUserManagement>();
|
m_userManager = m_scene.RequestModuleInterface<IUserManagement>();
|
||||||
m_primCountModule = m_scene.RequestModuleInterface<IPrimCountModule>();
|
m_primCountModule = m_scene.RequestModuleInterface<IPrimCountModule>();
|
||||||
|
m_Dialog = m_scene.RequestModuleInterface<IDialogModule>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
|
@ -213,6 +215,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
client.OnPreAgentUpdate += ClientOnPreAgentUpdate;
|
client.OnPreAgentUpdate += ClientOnPreAgentUpdate;
|
||||||
client.OnParcelEjectUser += ClientOnParcelEjectUser;
|
client.OnParcelEjectUser += ClientOnParcelEjectUser;
|
||||||
client.OnParcelFreezeUser += ClientOnParcelFreezeUser;
|
client.OnParcelFreezeUser += ClientOnParcelFreezeUser;
|
||||||
|
client.OnSetStartLocationRequest += ClientOnSetHome;
|
||||||
|
|
||||||
EntityBase presenceEntity;
|
EntityBase presenceEntity;
|
||||||
if (m_scene.Entities.TryGetValue(client.AgentId, out presenceEntity) && presenceEntity is ScenePresence)
|
if (m_scene.Entities.TryGetValue(client.AgentId, out presenceEntity) && presenceEntity is ScenePresence)
|
||||||
|
@ -1895,6 +1898,52 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the Home Point. The LoginService uses this to know where to put a user when they log-in
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="remoteClient"></param>
|
||||||
|
/// <param name="regionHandle"></param>
|
||||||
|
/// <param name="position"></param>
|
||||||
|
/// <param name="lookAt"></param>
|
||||||
|
/// <param name="flags"></param>
|
||||||
|
public virtual void ClientOnSetHome(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags)
|
||||||
|
{
|
||||||
|
// Let's find the parcel in question
|
||||||
|
ILandObject land = landChannel.GetLandObject(position);
|
||||||
|
if (land == null || m_scene.GridUserService == null)
|
||||||
|
{
|
||||||
|
m_Dialog.SendAlertToUser(remoteClient, "Set Home request failed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gather some data
|
||||||
|
ulong gpowers = remoteClient.GetGroupPowers(land.LandData.GroupID);
|
||||||
|
SceneObjectGroup telehub = null;
|
||||||
|
if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero)
|
||||||
|
// Does the telehub exist in the scene?
|
||||||
|
telehub = m_scene.GetSceneObjectGroup(m_scene.RegionInfo.RegionSettings.TelehubObject);
|
||||||
|
|
||||||
|
// Can the user set home here?
|
||||||
|
if (// (a) gods and land managers can set home
|
||||||
|
m_scene.Permissions.IsAdministrator(remoteClient.AgentId) ||
|
||||||
|
m_scene.Permissions.IsGod(remoteClient.AgentId) ||
|
||||||
|
// (b) land owners can set home
|
||||||
|
remoteClient.AgentId == land.LandData.OwnerID ||
|
||||||
|
// (c) members of the land-associated group in roles that can set home
|
||||||
|
((gpowers & (ulong)GroupPowers.AllowSetHome) == (ulong)GroupPowers.AllowSetHome) ||
|
||||||
|
// (d) parcels with telehubs can be the home of anyone
|
||||||
|
(telehub != null && land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y)))
|
||||||
|
{
|
||||||
|
if (m_scene.GridUserService.SetHome(remoteClient.AgentId.ToString(), land.RegionUUID, position, lookAt))
|
||||||
|
// FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot.
|
||||||
|
m_Dialog.SendAlertToUser(remoteClient, "Home position set.");
|
||||||
|
else
|
||||||
|
m_Dialog.SendAlertToUser(remoteClient, "Set Home request failed.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
m_Dialog.SendAlertToUser(remoteClient, "You are not allowed to set your home location in this parcel.");
|
||||||
|
}
|
||||||
|
|
||||||
protected void InstallInterfaces()
|
protected void InstallInterfaces()
|
||||||
{
|
{
|
||||||
Command clearCommand
|
Command clearCommand
|
||||||
|
|
|
@ -249,13 +249,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
if (estateModule != null)
|
if (estateModule != null)
|
||||||
regionFlags = estateModule.GetRegionFlags();
|
regionFlags = estateModule.GetRegionFlags();
|
||||||
|
|
||||||
// In a perfect world, this would have worked.
|
|
||||||
//
|
|
||||||
// if ((landData.Flags & (uint)ParcelFlags.AllowLandmark) != 0)
|
|
||||||
// regionFlags |= (uint)RegionFlags.AllowLandmark;
|
|
||||||
// if (landData.OwnerID == remote_client.AgentId)
|
|
||||||
// regionFlags |= (uint)RegionFlags.AllowSetHome;
|
|
||||||
|
|
||||||
int seq_id;
|
int seq_id;
|
||||||
if (snap_selection && (sequence_id == 0))
|
if (snap_selection && (sequence_id == 0))
|
||||||
{
|
{
|
||||||
|
|
|
@ -3246,7 +3246,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
//client.OnNameFromUUIDRequest += HandleUUIDNameRequest;
|
//client.OnNameFromUUIDRequest += HandleUUIDNameRequest;
|
||||||
client.OnMoneyTransferRequest += ProcessMoneyTransferRequest;
|
client.OnMoneyTransferRequest += ProcessMoneyTransferRequest;
|
||||||
client.OnSetStartLocationRequest += SetHomeRezPoint;
|
|
||||||
client.OnRegionHandleRequest += RegionHandleRequest;
|
client.OnRegionHandleRequest += RegionHandleRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3373,7 +3372,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
//client.OnNameFromUUIDRequest -= HandleUUIDNameRequest;
|
//client.OnNameFromUUIDRequest -= HandleUUIDNameRequest;
|
||||||
client.OnMoneyTransferRequest -= ProcessMoneyTransferRequest;
|
client.OnMoneyTransferRequest -= ProcessMoneyTransferRequest;
|
||||||
client.OnSetStartLocationRequest -= SetHomeRezPoint;
|
|
||||||
client.OnRegionHandleRequest -= RegionHandleRequest;
|
client.OnRegionHandleRequest -= RegionHandleRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3499,33 +3497,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sets the Home Point. The LoginService uses this to know where to put a user when they log-in
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="remoteClient"></param>
|
|
||||||
/// <param name="regionHandle"></param>
|
|
||||||
/// <param name="position"></param>
|
|
||||||
/// <param name="lookAt"></param>
|
|
||||||
/// <param name="flags"></param>
|
|
||||||
public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags)
|
|
||||||
{
|
|
||||||
//Add half the avatar's height so that the user doesn't fall through prims
|
|
||||||
ScenePresence presence;
|
|
||||||
if (TryGetScenePresence(remoteClient.AgentId, out presence))
|
|
||||||
{
|
|
||||||
if (presence.Appearance != null)
|
|
||||||
{
|
|
||||||
position.Z = position.Z + (presence.Appearance.AvatarHeight / 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GridUserService != null && GridUserService.SetHome(remoteClient.AgentId.ToString(), RegionInfo.RegionID, position, lookAt))
|
|
||||||
// FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot.
|
|
||||||
m_dialogModule.SendAlertToUser(remoteClient, "Home position set.");
|
|
||||||
else
|
|
||||||
m_dialogModule.SendAlertToUser(remoteClient, "Set Home request Failed.");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the avatar apperance for the given client.
|
/// Get the avatar apperance for the given client.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue