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.

0.8.0.3
Diva Canto 2014-06-15 16:29:25 -07:00 committed by Justin Clark-Casey
parent 34a645efb6
commit 2cdef143c4
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);
// 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 (// Required: local user; foreign users cannot set home
m_scene.UserManagementModule.IsLocalGridUser(remoteClient.AgentId) &&
(// (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.