Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

user_profiles
Diva Canto 2013-05-11 07:15:31 -07:00
commit ab4d530462
6 changed files with 66 additions and 5 deletions

View File

@ -77,5 +77,11 @@ BEGIN;
ALTER TABLE estate_settings AUTO_INCREMENT = 100; ALTER TABLE estate_settings AUTO_INCREMENT = 100;
COMMIT; COMMIT;
:VERSION 33 #---------------------
BEGIN;
ALTER TABLE estate_settings ADD COLUMN `AllowLandmark` tinyint(4) NOT NULL default '1';
ALTER TABLE estate_settings ADD COLUMN `AllowParcelChanges` tinyint(4) NOT NULL default '1';
ALTER TABLE estate_settings ADD COLUMN `AllowSetHome` tinyint(4) NOT NULL default '1';
COMMIT;

View File

@ -86,3 +86,12 @@ begin;
alter table estate_settings add column DenyMinors tinyint not null default 0; alter table estate_settings add column DenyMinors tinyint not null default 0;
commit; commit;
:VERSION 9
begin;
alter table estate_settings add column AllowLandmark tinyint not null default '1';
alter table estate_settings add column AllowParcelChanges tinyint not null default '1';
alter table estate_settings add column AllowSetHome tinyint not null default '1';
commit;

View File

@ -58,6 +58,30 @@ namespace OpenSim.Framework
set { m_EstateName = value; } set { m_EstateName = value; }
} }
private bool m_AllowLandmark = true;
public bool AllowLandmark
{
get { return m_AllowLandmark; }
set { m_AllowLandmark = value; }
}
private bool m_AllowParcelChanges = true;
public bool AllowParcelChanges
{
get { return m_AllowParcelChanges; }
set { m_AllowParcelChanges = value; }
}
private bool m_AllowSetHome = true;
public bool AllowSetHome
{
get { return m_AllowSetHome; }
set { m_AllowSetHome = value; }
}
private uint m_ParentEstateID = 1; private uint m_ParentEstateID = 1;
public uint ParentEstateID public uint ParentEstateID
@ -374,10 +398,18 @@ namespace OpenSim.Framework
return l_EstateAccess.Contains(user); return l_EstateAccess.Contains(user);
} }
public void SetFromFlags(ulong regionFlags)
{
ResetHomeOnTeleport = ((regionFlags & (ulong)OpenMetaverse.RegionFlags.ResetHomeOnTeleport) == (ulong)OpenMetaverse.RegionFlags.ResetHomeOnTeleport);
BlockDwell = ((regionFlags & (ulong)OpenMetaverse.RegionFlags.BlockDwell) == (ulong)OpenMetaverse.RegionFlags.BlockDwell);
AllowLandmark = ((regionFlags & (ulong)OpenMetaverse.RegionFlags.AllowLandmark) == (ulong)OpenMetaverse.RegionFlags.AllowLandmark);
AllowParcelChanges = ((regionFlags & (ulong)OpenMetaverse.RegionFlags.AllowParcelChanges) == (ulong)OpenMetaverse.RegionFlags.AllowParcelChanges);
AllowSetHome = ((regionFlags & (ulong)OpenMetaverse.RegionFlags.AllowSetHome) == (ulong)OpenMetaverse.RegionFlags.AllowSetHome);
}
public bool GroupAccess(UUID groupID) public bool GroupAccess(UUID groupID)
{ {
return l_EstateGroups.Contains(groupID); return l_EstateGroups.Contains(groupID);
} }
} }
} }

View File

@ -1245,6 +1245,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
flags |= RegionFlags.NoFly; flags |= RegionFlags.NoFly;
if (Scene.RegionInfo.RegionSettings.RestrictPushing) if (Scene.RegionInfo.RegionSettings.RestrictPushing)
flags |= RegionFlags.RestrictPushObject; flags |= RegionFlags.RestrictPushObject;
if (Scene.RegionInfo.RegionSettings.AllowLandJoinDivide)
flags |= RegionFlags.AllowParcelChanges;
if (Scene.RegionInfo.RegionSettings.BlockShowInSearch) if (Scene.RegionInfo.RegionSettings.BlockShowInSearch)
flags |= RegionFlags.BlockParcelSearch; flags |= RegionFlags.BlockParcelSearch;
@ -1254,6 +1256,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
flags |= RegionFlags.Sandbox; flags |= RegionFlags.Sandbox;
if (Scene.RegionInfo.EstateSettings.AllowVoice) if (Scene.RegionInfo.EstateSettings.AllowVoice)
flags |= RegionFlags.AllowVoice; flags |= RegionFlags.AllowVoice;
if (Scene.RegionInfo.EstateSettings.AllowLandmark)
flags |= RegionFlags.AllowLandmark;
if (Scene.RegionInfo.EstateSettings.AllowSetHome)
flags |= RegionFlags.AllowSetHome;
if (Scene.RegionInfo.EstateSettings.BlockDwell) if (Scene.RegionInfo.EstateSettings.BlockDwell)
flags |= RegionFlags.BlockDwell; flags |= RegionFlags.BlockDwell;
if (Scene.RegionInfo.EstateSettings.ResetHomeOnTeleport) if (Scene.RegionInfo.EstateSettings.ResetHomeOnTeleport)
@ -1299,6 +1305,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
flags |= RegionFlags.ResetHomeOnTeleport; flags |= RegionFlags.ResetHomeOnTeleport;
if (Scene.RegionInfo.EstateSettings.TaxFree) if (Scene.RegionInfo.EstateSettings.TaxFree)
flags |= RegionFlags.TaxFree; flags |= RegionFlags.TaxFree;
if (Scene.RegionInfo.EstateSettings.AllowLandmark)
flags |= RegionFlags.AllowLandmark;
if (Scene.RegionInfo.EstateSettings.AllowParcelChanges)
flags |= RegionFlags.AllowParcelChanges;
if (Scene.RegionInfo.EstateSettings.AllowSetHome)
flags |= RegionFlags.AllowSetHome;
if (Scene.RegionInfo.EstateSettings.DenyMinors) if (Scene.RegionInfo.EstateSettings.DenyMinors)
flags |= (RegionFlags)(1 << 30); flags |= (RegionFlags)(1 << 30);

View File

@ -4189,8 +4189,6 @@ namespace OpenSim.Region.Framework.Scenes
m_log.DebugFormat( m_log.DebugFormat(
"[SCENE]: Incoming child agent update for {0} in {1}", cAgentData.AgentID, RegionInfo.RegionName); "[SCENE]: Incoming child agent update for {0} in {1}", cAgentData.AgentID, RegionInfo.RegionName);
// XPTO: if this agent is not allowed here as root, always return false
// TODO: This check should probably be in QueryAccess(). // TODO: This check should probably be in QueryAccess().
ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2); ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2);
if (nearestParcel == null) if (nearestParcel == null)

View File

@ -368,9 +368,10 @@ public class BSShapeMesh : BSShape
// Check to see if mesh was created (might require an asset). // Check to see if mesh was created (might require an asset).
newShape = VerifyMeshCreated(physicsScene, newShape, prim); newShape = VerifyMeshCreated(physicsScene, newShape, prim);
if (!newShape.isNativeShape) if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed)
{ {
// If a mesh was what was created, remember the built shape for later sharing. // If a mesh was what was created, remember the built shape for later sharing.
// Also note that if meshing failed we put it in the mesh list as there is nothing else to do about the mesh.
Meshes.Add(newMeshKey, retMesh); Meshes.Add(newMeshKey, retMesh);
} }
@ -481,8 +482,11 @@ public class BSShapeMesh : BSShape
} }
else else
{ {
// Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh.
prim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed;
physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}", physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}",
LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name); LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name);
physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey);
} }
} }
newShape.shapeKey = newMeshKey; newShape.shapeKey = newMeshKey;
@ -521,7 +525,7 @@ public class BSShapeHull : BSShape
// Check to see if hull was created (might require an asset). // Check to see if hull was created (might require an asset).
newShape = VerifyMeshCreated(physicsScene, newShape, prim); newShape = VerifyMeshCreated(physicsScene, newShape, prim);
if (!newShape.isNativeShape) if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed)
{ {
// If a mesh was what was created, remember the built shape for later sharing. // If a mesh was what was created, remember the built shape for later sharing.
Hulls.Add(newHullKey, retHull); Hulls.Add(newHullKey, retHull);