mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
This commit is contained in:
@@ -506,6 +506,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
currentRegionSettings.Elevation2SE = loadedRegionSettings.Elevation2SE;
|
||||
currentRegionSettings.Elevation2SW = loadedRegionSettings.Elevation2SW;
|
||||
currentRegionSettings.FixedSun = loadedRegionSettings.FixedSun;
|
||||
currentRegionSettings.SunPosition = loadedRegionSettings.SunPosition;
|
||||
currentRegionSettings.ObjectBonus = loadedRegionSettings.ObjectBonus;
|
||||
currentRegionSettings.RestrictPushing = loadedRegionSettings.RestrictPushing;
|
||||
currentRegionSettings.TerrainLowerLimit = loadedRegionSettings.TerrainLowerLimit;
|
||||
@@ -518,6 +519,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
currentRegionSettings.WaterHeight = loadedRegionSettings.WaterHeight;
|
||||
|
||||
currentRegionSettings.Save();
|
||||
|
||||
m_scene.TriggerEstateSunUpdate();
|
||||
|
||||
IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>();
|
||||
|
||||
|
||||
@@ -198,11 +198,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
m_log.ErrorFormat(
|
||||
"[ARCHIVER]: (... {0} more not shown)", uuids.Count - MAX_UUID_DISPLAY_ON_TIMEOUT);
|
||||
|
||||
m_log.Error("[ARCHIVER]: OAR save aborted. PLEASE DO NOT USE THIS OAR, IT WILL BE INCOMPLETE.");
|
||||
m_log.Error("[ARCHIVER]: Archive save aborted. PLEASE DO NOT USE THIS ARCHIVE, IT WILL BE INCOMPLETE.");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[ARCHIVER]: Timeout handler exception {0}", e);
|
||||
m_log.ErrorFormat("[ARCHIVER]: Timeout handler exception {0}{1}", e.Message, e.StackTrace);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -230,6 +230,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
/// <param name="asset"></param>
|
||||
public void AssetRequestCallback(string id, object sender, AssetBase asset)
|
||||
{
|
||||
Culture.SetCurrentCulture();
|
||||
|
||||
try
|
||||
{
|
||||
lock (this)
|
||||
@@ -289,6 +291,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
/// </summary>
|
||||
protected void PerformAssetsRequestCallback(object o)
|
||||
{
|
||||
Culture.SetCurrentCulture();
|
||||
|
||||
try
|
||||
{
|
||||
m_assetsRequestCallback(m_foundAssetUuids, m_notFoundAssetUuids);
|
||||
|
||||
@@ -440,6 +440,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
rs.Elevation2SE = 9.2;
|
||||
rs.Elevation2SW = 2.1;
|
||||
rs.FixedSun = true;
|
||||
rs.SunPosition = 12.0;
|
||||
rs.ObjectBonus = 1.4;
|
||||
rs.RestrictPushing = true;
|
||||
rs.TerrainLowerLimit = 0.4;
|
||||
@@ -485,6 +486,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
Assert.That(loadedRs.Elevation2SE, Is.EqualTo(9.2));
|
||||
Assert.That(loadedRs.Elevation2SW, Is.EqualTo(2.1));
|
||||
Assert.That(loadedRs.FixedSun, Is.True);
|
||||
Assert.AreEqual(12.0, loadedRs.SunPosition);
|
||||
Assert.That(loadedRs.ObjectBonus, Is.EqualTo(1.4));
|
||||
Assert.That(loadedRs.RestrictPushing, Is.True);
|
||||
Assert.That(loadedRs.TerrainLowerLimit, Is.EqualTo(0.4));
|
||||
|
||||
@@ -548,18 +548,18 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
|
||||
// libomv will moan about PrimFlags.ObjectYouOfficer being
|
||||
// deprecated
|
||||
#pragma warning disable 0612
|
||||
#pragma warning disable 0612
|
||||
objflags &= (uint)
|
||||
~(PrimFlags.ObjectCopy | // Tells client you can copy the object
|
||||
PrimFlags.ObjectModify | // tells client you can modify the object
|
||||
PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod)
|
||||
PrimFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it
|
||||
PrimFlags.ObjectYouOwner | // Tells client that you're the owner of the object
|
||||
PrimFlags.ObjectAnyOwner | // Tells client that someone owns the object
|
||||
PrimFlags.ObjectOwnerModify | // Tells client that you're the owner of the object
|
||||
PrimFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set
|
||||
PrimFlags.ObjectModify | // tells client you can modify the object
|
||||
PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod)
|
||||
PrimFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it
|
||||
PrimFlags.ObjectYouOwner | // Tells client that you're the owner of the object
|
||||
PrimFlags.ObjectAnyOwner | // Tells client that someone owns the object
|
||||
PrimFlags.ObjectOwnerModify | // Tells client that you're the owner of the object
|
||||
PrimFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set
|
||||
);
|
||||
#pragma warning restore 0612
|
||||
#pragma warning restore 0612
|
||||
|
||||
// Creating the three ObjectFlags options for this method to choose from.
|
||||
// Customize the OwnerMask
|
||||
@@ -576,22 +576,27 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
|
||||
if (m_bypassPermissions)
|
||||
return objectOwnerMask;
|
||||
|
||||
|
||||
// Object owners should be able to edit their own content
|
||||
if (user == objectOwner)
|
||||
return objectOwnerMask;
|
||||
|
||||
if (IsFriendWithPerms(user, objectOwner))
|
||||
return objectOwnerMask;
|
||||
|
||||
if (IsFriendWithPerms(user, objectOwner))
|
||||
{
|
||||
return objectOwnerMask;
|
||||
}
|
||||
// Estate users should be able to edit anything in the sim if RegionOwnerIsGod is set
|
||||
if (m_RegionOwnerIsGod && IsEstateManager(user) && !IsAdministrator(objectOwner))
|
||||
{
|
||||
return objectOwnerMask;
|
||||
}
|
||||
|
||||
// Admin should be able to edit anything in the sim (including admin objects)
|
||||
if (IsAdministrator(user))
|
||||
{
|
||||
return objectOwnerMask;
|
||||
|
||||
}
|
||||
|
||||
// Users should be able to edit what is over their land.
|
||||
Vector3 taskPos = task.AbsolutePosition;
|
||||
ILandObject parcel = m_scene.LandChannel.GetLandObject(taskPos.X, taskPos.Y);
|
||||
@@ -599,13 +604,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
{
|
||||
// Admin objects should not be editable by the above
|
||||
if (!IsAdministrator(objectOwner))
|
||||
{
|
||||
return objectOwnerMask;
|
||||
}
|
||||
}
|
||||
|
||||
// Group permissions
|
||||
if ((task.GroupID != UUID.Zero) && IsGroupMember(task.GroupID, user, 0))
|
||||
return objectGroupMask | objectEveryoneMask;
|
||||
|
||||
|
||||
return objectEveryoneMask;
|
||||
}
|
||||
|
||||
@@ -673,7 +680,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
//
|
||||
// Nobody but the object owner can set permissions on an object
|
||||
//
|
||||
|
||||
if (locked && (!IsAdministrator(currentUser)) && denyOnLocked)
|
||||
{
|
||||
return false;
|
||||
@@ -704,6 +710,11 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
// Return immediately, so that the administrator can shares group objects
|
||||
return true;
|
||||
}
|
||||
|
||||
// Friends with benefits should be able to edit the objects too
|
||||
if (IsFriendWithPerms(currentUser, objectOwner))
|
||||
// Return immediately, so that the administrator can share objects with friends
|
||||
return true;
|
||||
|
||||
// Users should be able to edit what is over their land.
|
||||
ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
public class Warp3DImageModule : IMapImageGenerator, INonSharedRegionModule
|
||||
{
|
||||
private static readonly UUID TEXTURE_METADATA_MAGIC = new UUID("802dc0e0-f080-4931-8b57-d1be8611c4f3");
|
||||
private static readonly Color4 WATER_COLOR = new Color4(29, 71, 95, 216);
|
||||
private static readonly Color4 WATER_COLOR = new Color4(29, 72, 96, 216);
|
||||
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
private IRendering m_primMesher;
|
||||
private IConfigSource m_config;
|
||||
private Dictionary<UUID, Color4> m_colors = new Dictionary<UUID, Color4>();
|
||||
private bool m_useAntiAliasing = true; // TODO: Make this a config option
|
||||
private bool m_useAntiAliasing = false; // TODO: Make this a config option
|
||||
private bool m_Enabled = false;
|
||||
|
||||
#region IRegionModule Members
|
||||
@@ -192,8 +192,8 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
|
||||
#endregion Camera
|
||||
|
||||
renderer.Scene.addLight("Light1", new warp_Light(new warp_Vector(0.2f, 0.2f, 1f), 0xffffff, 320, 80));
|
||||
renderer.Scene.addLight("Light2", new warp_Light(new warp_Vector(-1f, -1f, 1f), 0xffffff, 100, 40));
|
||||
renderer.Scene.addLight("Light1", new warp_Light(new warp_Vector(1.0f, 0.5f, 1f), 0xffffff, 0, 320, 40));
|
||||
renderer.Scene.addLight("Light2", new warp_Light(new warp_Vector(-1f, -1f, 1f), 0xffffff, 0, 100, 40));
|
||||
|
||||
CreateWater(renderer);
|
||||
CreateTerrain(renderer, textureTerrain);
|
||||
@@ -237,6 +237,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
renderer.Scene.sceneobject("Water").setPos(127.5f, waterHeight, 127.5f);
|
||||
|
||||
renderer.AddMaterial("WaterColor", ConvertColor(WATER_COLOR));
|
||||
renderer.Scene.material("WaterColor").setReflectivity(0); // match water color with standard map module thanks lkalif
|
||||
renderer.Scene.material("WaterColor").setTransparency((byte)((1f - WATER_COLOR.A) * 255f));
|
||||
renderer.SetObjectMaterial("Water", "WaterColor");
|
||||
}
|
||||
@@ -322,6 +323,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
warp_Material material = new warp_Material(texture);
|
||||
material.setReflectivity(50);
|
||||
renderer.Scene.addMaterial("TerrainColor", material);
|
||||
renderer.Scene.material("TerrainColor").setReflectivity(0); // reduces tile seams a bit thanks lkalif
|
||||
renderer.SetObjectMaterial("Terrain", "TerrainColor");
|
||||
}
|
||||
|
||||
@@ -653,4 +655,4 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -208,52 +208,65 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
//m_log.DebugFormat("[MAPLAYER]: path: {0}, param: {1}, agent:{2}",
|
||||
// path, param, agentID.ToString());
|
||||
|
||||
// this is here because CAPS map requests work even beyond the 10,000 limit.
|
||||
ScenePresence avatarPresence = null;
|
||||
// There is a major hack going on in this method. The viewer doesn't request
|
||||
// map blocks (RequestMapBlocks) above 2048. That means that if we don't hack,
|
||||
// grids above that cell don't have a map at all. So, here's the hack: we wait
|
||||
// for this CAP request to come, and we inject the map blocks at this point.
|
||||
// In a normal scenario, this request simply sends back the MapLayer (the blue color).
|
||||
// In the hacked scenario, it also sends the map blocks via UDP.
|
||||
//
|
||||
// 6/8/2011 -- I'm adding an explicit 2048 check, so that we never forget that there is
|
||||
// a hack here, and so that regions below 4096 don't get spammed with unnecessary map blocks.
|
||||
|
||||
m_scene.TryGetScenePresence(agentID, out avatarPresence);
|
||||
|
||||
if (avatarPresence != null)
|
||||
if (m_scene.RegionInfo.RegionLocX >= 2048 || m_scene.RegionInfo.RegionLocY >= 2048)
|
||||
{
|
||||
bool lookup = false;
|
||||
ScenePresence avatarPresence = null;
|
||||
|
||||
lock (cachedMapBlocks)
|
||||
m_scene.TryGetScenePresence(agentID, out avatarPresence);
|
||||
|
||||
if (avatarPresence != null)
|
||||
{
|
||||
if (cachedMapBlocks.Count > 0 && ((cachedTime + 1800) > Util.UnixTimeSinceEpoch()))
|
||||
{
|
||||
List<MapBlockData> mapBlocks;
|
||||
|
||||
mapBlocks = cachedMapBlocks;
|
||||
avatarPresence.ControllingClient.SendMapBlock(mapBlocks, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
lookup = true;
|
||||
}
|
||||
}
|
||||
if (lookup)
|
||||
{
|
||||
List<MapBlockData> mapBlocks = new List<MapBlockData>(); ;
|
||||
|
||||
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
|
||||
(int)(m_scene.RegionInfo.RegionLocX - 8) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.RegionLocX + 8) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.RegionLocY - 8) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.RegionLocY + 8) * (int)Constants.RegionSize);
|
||||
foreach (GridRegion r in regions)
|
||||
{
|
||||
MapBlockData block = new MapBlockData();
|
||||
MapBlockFromGridRegion(block, r);
|
||||
mapBlocks.Add(block);
|
||||
}
|
||||
avatarPresence.ControllingClient.SendMapBlock(mapBlocks, 0);
|
||||
bool lookup = false;
|
||||
|
||||
lock (cachedMapBlocks)
|
||||
cachedMapBlocks = mapBlocks;
|
||||
{
|
||||
if (cachedMapBlocks.Count > 0 && ((cachedTime + 1800) > Util.UnixTimeSinceEpoch()))
|
||||
{
|
||||
List<MapBlockData> mapBlocks;
|
||||
|
||||
cachedTime = Util.UnixTimeSinceEpoch();
|
||||
mapBlocks = cachedMapBlocks;
|
||||
avatarPresence.ControllingClient.SendMapBlock(mapBlocks, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
lookup = true;
|
||||
}
|
||||
}
|
||||
if (lookup)
|
||||
{
|
||||
List<MapBlockData> mapBlocks = new List<MapBlockData>(); ;
|
||||
|
||||
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
|
||||
(int)(m_scene.RegionInfo.RegionLocX - 8) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.RegionLocX + 8) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.RegionLocY - 8) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.RegionLocY + 8) * (int)Constants.RegionSize);
|
||||
foreach (GridRegion r in regions)
|
||||
{
|
||||
MapBlockData block = new MapBlockData();
|
||||
MapBlockFromGridRegion(block, r);
|
||||
mapBlocks.Add(block);
|
||||
}
|
||||
avatarPresence.ControllingClient.SendMapBlock(mapBlocks, 0);
|
||||
|
||||
lock (cachedMapBlocks)
|
||||
cachedMapBlocks = mapBlocks;
|
||||
|
||||
cachedTime = Util.UnixTimeSinceEpoch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
|
||||
mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse());
|
||||
return mapResponse.ToString();
|
||||
@@ -823,7 +836,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
block.Access = 254; // means 'simulator is offline'
|
||||
response.Add(block);
|
||||
}
|
||||
remoteClient.SendMapBlock(response, 0);
|
||||
if ((flag & 2) == 2) // V2 !!!
|
||||
remoteClient.SendMapBlock(response, 2);
|
||||
else
|
||||
remoteClient.SendMapBlock(response, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -832,7 +848,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
|
||||
protected virtual List<MapBlockData> GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
|
||||
{
|
||||
List<MapBlockData> mapBlocks = new List<MapBlockData>();
|
||||
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
|
||||
@@ -846,7 +862,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
MapBlockFromGridRegion(block, r);
|
||||
mapBlocks.Add(block);
|
||||
}
|
||||
remoteClient.SendMapBlock(mapBlocks, 0);
|
||||
if ((flag & 2) == 2) // V2 !!!
|
||||
remoteClient.SendMapBlock(mapBlocks, 2);
|
||||
else
|
||||
remoteClient.SendMapBlock(mapBlocks, 0);
|
||||
|
||||
return mapBlocks;
|
||||
}
|
||||
|
||||
protected void MapBlockFromGridRegion(MapBlockData block, GridRegion r)
|
||||
|
||||
Reference in New Issue
Block a user