Behavior change: only local users can set home in any parcel of a grid. Setting it for foreign users does not make sense, since cntrl+shift+H always teleports them back to their original grid.

bullet-2.82
Diva Canto 2014-06-15 16:29:25 -07:00
parent dcd8e74584
commit c5f7184d1b
1 changed files with 11 additions and 9 deletions

View File

@ -1985,15 +1985,17 @@ namespace OpenSim.Region.CoreModules.World.Land
telehub = m_scene.GetSceneObjectGroup(m_scene.RegionInfo.RegionSettings.TelehubObject); telehub = m_scene.GetSceneObjectGroup(m_scene.RegionInfo.RegionSettings.TelehubObject);
// Can the user set home here? // Can the user set home here?
if (// (a) gods and land managers can set home if (// Required: local user; foreign users cannot set home
m_scene.Permissions.IsAdministrator(remoteClient.AgentId) || m_scene.UserManagementModule.IsLocalGridUser(remoteClient.AgentId) &&
m_scene.Permissions.IsGod(remoteClient.AgentId) || (// (a) gods and land managers can set home
// (b) land owners can set home m_scene.Permissions.IsAdministrator(remoteClient.AgentId) ||
remoteClient.AgentId == land.LandData.OwnerID || m_scene.Permissions.IsGod(remoteClient.AgentId) ||
// (c) members of the land-associated group in roles that can set home // (b) land owners can set home
((gpowers & (ulong)GroupPowers.AllowSetHome) == (ulong)GroupPowers.AllowSetHome) || remoteClient.AgentId == land.LandData.OwnerID ||
// (d) parcels with telehubs can be the home of anyone // (c) members of the land-associated group in roles that can set home
(telehub != null && land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y))) ((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)) 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. // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot.