Update svn properties, formatting cleanup.
parent
3e1441afe1
commit
fae34bb10c
|
@ -644,7 +644,7 @@ VALUES
|
|||
using (AutoClosingSqlCommand cmd = _Database.Query(sql))
|
||||
{
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@regionUUID", regionUUID.ToString()));
|
||||
using(SqlDataReader reader = cmd.ExecuteReader())
|
||||
using (SqlDataReader reader = cmd.ExecuteReader())
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
|
|
|
@ -185,7 +185,7 @@ namespace OpenSim.Data.MySQL
|
|||
else
|
||||
m_FieldMap[name].SetValue(es, false);
|
||||
}
|
||||
else if(m_FieldMap[name].GetValue(es) is OpenMetaverse.UUID)
|
||||
else if (m_FieldMap[name].GetValue(es) is OpenMetaverse.UUID)
|
||||
{
|
||||
UUID uuid = UUID.Zero;
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace OpenSim.Data.MySQL
|
|||
m_lastConnect++;
|
||||
|
||||
// Overflow protection
|
||||
if(m_lastConnect == int.MaxValue)
|
||||
if (m_lastConnect == int.MaxValue)
|
||||
m_lastConnect = 0;
|
||||
|
||||
MySQLSuperManager x = m_dbconnections[m_lastConnect%m_maxConnections];
|
||||
|
|
|
@ -109,7 +109,7 @@ namespace OpenSim.Data.SQLite
|
|||
else
|
||||
m_FieldMap[name].SetValue(es, false);
|
||||
}
|
||||
else if(m_FieldMap[name].GetValue(es) is OpenMetaverse.UUID)
|
||||
else if (m_FieldMap[name].GetValue(es) is OpenMetaverse.UUID)
|
||||
{
|
||||
UUID uuid = UUID.Zero;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
public FileAssetClient(string dir)
|
||||
{
|
||||
if(!Directory.Exists(dir))
|
||||
if (!Directory.Exists(dir))
|
||||
{
|
||||
Directory.CreateDirectory(dir);
|
||||
}
|
||||
|
|
|
@ -325,7 +325,7 @@ namespace OpenSim.Framework
|
|||
|
||||
ulong ActiveGroupPowers { get; }
|
||||
|
||||
ulong GetGroupPowers(UUID groupID);
|
||||
ulong GetGroupPowers(UUID groupID);
|
||||
|
||||
string FirstName { get; }
|
||||
|
||||
|
|
|
@ -737,7 +737,7 @@ namespace OpenSim.Framework
|
|||
/// The extracted ulong
|
||||
/// </returns>
|
||||
public static ulong BytesToUInt64Big(byte[] bytes) {
|
||||
if(bytes.Length < 8) return 0;
|
||||
if (bytes.Length < 8) return 0;
|
||||
return ((ulong)bytes[0] << 56) | ((ulong)bytes[1] << 48) | ((ulong)bytes[2] << 40) | ((ulong)bytes[3] << 32) |
|
||||
((ulong)bytes[4] << 24) | ((ulong)bytes[5] << 16) | ((ulong)bytes[6] << 8) | (ulong)bytes[7];
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
protected UUID m_activeGroupID = UUID.Zero;
|
||||
protected string m_activeGroupName = String.Empty;
|
||||
protected ulong m_activeGroupPowers = 0;
|
||||
protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>();
|
||||
protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>();
|
||||
|
||||
/* Instantiated Designated Event Delegates */
|
||||
//- used so we don't create new objects for each incoming packet and then toss it out later */
|
||||
|
@ -302,7 +302,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
get { return m_activeGroupPowers; }
|
||||
}
|
||||
|
||||
public ulong GetGroupPowers(UUID groupID)
|
||||
public ulong GetGroupPowers(UUID groupID)
|
||||
{
|
||||
if (m_groupPowers.ContainsKey(groupID))
|
||||
return m_groupPowers[groupID];
|
||||
|
|
|
@ -161,7 +161,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
|||
string message = e.Message;
|
||||
UUID fromID = e.SenderUUID;
|
||||
|
||||
if(message.Length >= 1000) // libomv limit
|
||||
if (message.Length >= 1000) // libomv limit
|
||||
message = message.Substring(0, 1000);
|
||||
|
||||
if (e.Sender != null)
|
||||
|
|
|
@ -820,27 +820,27 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
|
|||
string secret = (string) requestData["secret"];
|
||||
|
||||
Scene userScene = GetSceneByUUID(regionId);
|
||||
if(userScene != null)
|
||||
if (userScene != null)
|
||||
{
|
||||
if (userScene.RegionInfo.regionSecret.ToString() == secret)
|
||||
{
|
||||
|
||||
IClientAPI client = LocateClientObject(agentId);
|
||||
if (client != null)
|
||||
{
|
||||
if (client != null)
|
||||
{
|
||||
|
||||
if (soundId != UUID.Zero)
|
||||
client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0);
|
||||
if (soundId != UUID.Zero)
|
||||
client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0);
|
||||
|
||||
client.SendBlueBoxMessage(UUID.Zero, UUID.Zero, "", text);
|
||||
client.SendBlueBoxMessage(UUID.Zero, UUID.Zero, "", text);
|
||||
|
||||
retparam.Add("success", true);
|
||||
}
|
||||
retparam.Add("success", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
retparam.Add("success", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
retparam.Add("success", false);
|
||||
|
|
|
@ -98,12 +98,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
float burstRate = 0.4f;
|
||||
if (radius >= 8.0f)
|
||||
{
|
||||
//float sizeOfObject = radius / 2.0f;
|
||||
burstRadius = (radius - 8.0f)/3f;
|
||||
burstRate = 1.5f;
|
||||
radius = 7.99f;
|
||||
patternFlags = Primitive.ParticleSystem.SourcePattern.Explode;
|
||||
age = 4.0f;
|
||||
//float sizeOfObject = radius / 2.0f;
|
||||
burstRadius = (radius - 8.0f)/3f;
|
||||
burstRate = 1.5f;
|
||||
radius = 7.99f;
|
||||
patternFlags = Primitive.ParticleSystem.SourcePattern.Explode;
|
||||
age = 4.0f;
|
||||
}
|
||||
SetAura(From, color, radius, burstRadius, age, burstRate, patternFlags);
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
//prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive |
|
||||
// Primitive.ParticleSystem.ParticleDataFlags.FollowSrc; //PSYS_PART_FLAGS
|
||||
//prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Beam |
|
||||
// Primitive.ParticleSystem.ParticleDataFlags.TargetPos;
|
||||
// Primitive.ParticleSystem.ParticleDataFlags.TargetPos;
|
||||
prules.PartStartColor.R = color.X; //PSYS_PART_START_COLOR
|
||||
prules.PartStartColor.G = color.Y;
|
||||
prules.PartStartColor.B = color.Z;
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
//prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive |
|
||||
// Primitive.ParticleSystem.ParticleDataFlags.FollowSrc; //PSYS_PART_FLAGS
|
||||
prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Beam |
|
||||
Primitive.ParticleSystem.ParticleDataFlags.TargetPos;
|
||||
Primitive.ParticleSystem.ParticleDataFlags.TargetPos;
|
||||
prules.PartStartColor.R = color.X; //PSYS_PART_START_COLOR
|
||||
prules.PartStartColor.G = color.Y;
|
||||
prules.PartStartColor.B = color.Z;
|
||||
|
|
|
@ -129,31 +129,31 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
/// </summary>
|
||||
private SceneObjectGroup GetGroupByPrim(uint localID)
|
||||
{
|
||||
foreach(Object currScene in m_sceneList.Values)
|
||||
foreach (Object currScene in m_sceneList.Values)
|
||||
{
|
||||
foreach (EntityBase ent in ((Scene)currScene).GetEntities())
|
||||
{
|
||||
if (ent is SceneObjectGroup)
|
||||
{
|
||||
if (((SceneObjectGroup)ent).HasChildPrim(localID))
|
||||
return (SceneObjectGroup)ent;
|
||||
}
|
||||
}
|
||||
foreach (EntityBase ent in ((Scene)currScene).GetEntities())
|
||||
{
|
||||
if (ent is SceneObjectGroup)
|
||||
{
|
||||
if (((SceneObjectGroup)ent).HasChildPrim(localID))
|
||||
return (SceneObjectGroup)ent;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void Initialize(CMModel model, CMView view, Scene scene, int channel)
|
||||
{
|
||||
lock(this)
|
||||
lock (this)
|
||||
{
|
||||
m_estateModule = scene.RequestModuleInterface<IEstateModule>();
|
||||
m_thread = new Thread( MainLoop );
|
||||
m_thread.Name = "Content Management";
|
||||
m_thread.IsBackground = true;
|
||||
m_thread.Start();
|
||||
ThreadTracker.Add(m_thread);
|
||||
m_state = State.NONE;
|
||||
m_estateModule = scene.RequestModuleInterface<IEstateModule>();
|
||||
m_thread = new Thread(MainLoop);
|
||||
m_thread.Name = "Content Management";
|
||||
m_thread.IsBackground = true;
|
||||
m_thread.Start();
|
||||
ThreadTracker.Add(m_thread);
|
||||
m_state = State.NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,41 +164,41 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
CMModel model = m_model; CMView view = m_view; int channel = m_channel;
|
||||
Work currentJob = new Work();
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
currentJob = m_WorkQueue.Dequeue();
|
||||
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- DeQueued a request");
|
||||
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Work type: " + currentJob.Type);
|
||||
switch(currentJob.Type)
|
||||
{
|
||||
case WorkType.NONE:
|
||||
break;
|
||||
case WorkType.OBJECTATTRIBUTECHANGE:
|
||||
ObjectAttributeChanged(model, view, currentJob.LocalId);
|
||||
break;
|
||||
case WorkType.PRIMITIVEADDED:
|
||||
PrimitiveAdded(model, view, currentJob);
|
||||
break;
|
||||
case WorkType.OBJECTDUPLICATED:
|
||||
ObjectDuplicated(model, view, currentJob.LocalId);
|
||||
break;
|
||||
case WorkType.OBJECTKILLED:
|
||||
ObjectKilled(model, view, (SceneObjectGroup) currentJob.Data1);
|
||||
break;
|
||||
case WorkType.UNDODID:
|
||||
UndoDid(model, view, currentJob.UUID);
|
||||
break;
|
||||
case WorkType.NEWCLIENT:
|
||||
NewClient(view, (IClientAPI) currentJob.Data1);
|
||||
break;
|
||||
case WorkType.SIMCHAT:
|
||||
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Message received: " + ((OSChatMessage) currentJob.Data1).Message);
|
||||
SimChat(model, view, (OSChatMessage) currentJob.Data1, channel);
|
||||
break;
|
||||
default:
|
||||
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- uuuuuuuuuh, what?");
|
||||
break;
|
||||
}
|
||||
currentJob = m_WorkQueue.Dequeue();
|
||||
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- DeQueued a request");
|
||||
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Work type: " + currentJob.Type);
|
||||
switch (currentJob.Type)
|
||||
{
|
||||
case WorkType.NONE:
|
||||
break;
|
||||
case WorkType.OBJECTATTRIBUTECHANGE:
|
||||
ObjectAttributeChanged(model, view, currentJob.LocalId);
|
||||
break;
|
||||
case WorkType.PRIMITIVEADDED:
|
||||
PrimitiveAdded(model, view, currentJob);
|
||||
break;
|
||||
case WorkType.OBJECTDUPLICATED:
|
||||
ObjectDuplicated(model, view, currentJob.LocalId);
|
||||
break;
|
||||
case WorkType.OBJECTKILLED:
|
||||
ObjectKilled(model, view, (SceneObjectGroup) currentJob.Data1);
|
||||
break;
|
||||
case WorkType.UNDODID:
|
||||
UndoDid(model, view, currentJob.UUID);
|
||||
break;
|
||||
case WorkType.NEWCLIENT:
|
||||
NewClient(view, (IClientAPI) currentJob.Data1);
|
||||
break;
|
||||
case WorkType.SIMCHAT:
|
||||
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Message received: " + ((OSChatMessage) currentJob.Data1).Message);
|
||||
SimChat(model, view, (OSChatMessage) currentJob.Data1, channel);
|
||||
break;
|
||||
default:
|
||||
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- uuuuuuuuuh, what?");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
private void NewClient(CMView view, IClientAPI client)
|
||||
{
|
||||
if ((m_state & State.SHOWING_CHANGES) > 0)
|
||||
view.SendMetaEntitiesToNewClient(client);
|
||||
view.SendMetaEntitiesToNewClient(client);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -219,12 +219,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
SceneObjectGroup group = null;
|
||||
if ((m_state & State.SHOWING_CHANGES) > 0)
|
||||
{
|
||||
group = GetGroupByPrim(LocalId);
|
||||
if (group != null)
|
||||
{
|
||||
view.DisplayAuras( model.UpdateNormalEntityEffects(group) ); //Might be a normal entity (green aura)
|
||||
m_view.DisplayMetaEntity(group.UUID); //Might be a meta entity (blue aura)
|
||||
}
|
||||
group = GetGroupByPrim(LocalId);
|
||||
if (group != null)
|
||||
{
|
||||
view.DisplayAuras(model.UpdateNormalEntityEffects(group)); //Might be a normal entity (green aura)
|
||||
m_view.DisplayMetaEntity(group.UUID); //Might be a meta entity (blue aura)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
private void ObjectDuplicated(CMModel model, CMView view, uint localId)
|
||||
{
|
||||
if ((m_state & State.SHOWING_CHANGES) > 0)
|
||||
view.DisplayAuras(model.CheckForNewEntitiesMissingAuras( GetGroupByPrim(localId).Scene ));
|
||||
view.DisplayAuras(model.CheckForNewEntitiesMissingAuras(GetGroupByPrim(localId).Scene));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -244,8 +244,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
if ((m_state & State.SHOWING_CHANGES) > 0)
|
||||
{
|
||||
view.RemoveOrUpdateDeletedEntity(group);
|
||||
model.RemoveOrUpdateDeletedEntity(group);
|
||||
view.RemoveOrUpdateDeletedEntity(group);
|
||||
model.RemoveOrUpdateDeletedEntity(group);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -256,8 +256,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
if ((m_state & State.SHOWING_CHANGES) > 0)
|
||||
{
|
||||
foreach(Object scene in m_sceneList.Values)
|
||||
m_view.DisplayAuras(model.CheckForNewEntitiesMissingAuras((Scene) scene));
|
||||
foreach (Object scene in m_sceneList.Values)
|
||||
m_view.DisplayAuras(model.CheckForNewEntitiesMissingAuras((Scene) scene));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -268,9 +268,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
if ((m_state & State.SHOWING_CHANGES) > 0)
|
||||
{
|
||||
ContentManagementEntity ent = model.FindMetaEntityAffectedByUndo(uuid);
|
||||
if (ent != null)
|
||||
view.DisplayEntity(ent);
|
||||
ContentManagementEntity ent = model.FindMetaEntityAffectedByUndo(uuid);
|
||||
if (ent != null)
|
||||
view.DisplayEntity(ent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -328,38 +328,38 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
/// <summary>
|
||||
/// Takes a list of scenes and forms a new orderd list according to the proximity of scenes to the second argument.
|
||||
/// </summary>
|
||||
protected static System.Collections.Generic.List<Scene> ScenesInOrderOfProximity( Hashtable sceneList, Scene scene)
|
||||
protected static System.Collections.Generic.List<Scene> ScenesInOrderOfProximity(Hashtable sceneList, Scene scene)
|
||||
{
|
||||
int somethingAddedToList = 1;
|
||||
System.Collections.Generic.List<Scene> newList = new List<Scene>();
|
||||
newList.Add(scene);
|
||||
|
||||
if (! sceneList.ContainsValue(scene))
|
||||
if (!sceneList.ContainsValue(scene))
|
||||
{
|
||||
foreach(Object sceneObj in sceneList)
|
||||
newList.Add((Scene) sceneObj);
|
||||
return newList;
|
||||
foreach (Object sceneObj in sceneList)
|
||||
newList.Add((Scene) sceneObj);
|
||||
return newList;
|
||||
}
|
||||
|
||||
while(somethingAddedToList > 0)
|
||||
while (somethingAddedToList > 0)
|
||||
{
|
||||
somethingAddedToList = 0;
|
||||
for(int i = 0; i < newList.Count; i++)
|
||||
{
|
||||
foreach(Object sceneObj in sceneList.Values)
|
||||
{
|
||||
if (newList[i].CheckNeighborRegion(((Scene)sceneObj).RegionInfo) && (! newList.Contains((Scene)sceneObj)) )
|
||||
{
|
||||
newList.Add((Scene)sceneObj);
|
||||
somethingAddedToList++;
|
||||
}
|
||||
}
|
||||
}
|
||||
somethingAddedToList = 0;
|
||||
for (int i = 0; i < newList.Count; i++)
|
||||
{
|
||||
foreach (Object sceneObj in sceneList.Values)
|
||||
{
|
||||
if (newList[i].CheckNeighborRegion(((Scene)sceneObj).RegionInfo) && (!newList.Contains((Scene)sceneObj)))
|
||||
{
|
||||
newList.Add((Scene)sceneObj);
|
||||
somethingAddedToList++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach(Object sceneObj in sceneList.Values)
|
||||
if (! newList.Contains((Scene)sceneObj))
|
||||
newList.Add((Scene)sceneObj);
|
||||
foreach (Object sceneObj in sceneList.Values)
|
||||
if (!newList.Contains((Scene)sceneObj))
|
||||
newList.Add((Scene)sceneObj);
|
||||
|
||||
return newList;
|
||||
}
|
||||
|
@ -405,9 +405,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
/// </summary>
|
||||
protected void StopManaging(UUID clientUUID)
|
||||
{
|
||||
foreach(Object sceneobj in m_sceneList.Values)
|
||||
foreach (Object sceneobj in m_sceneList.Values)
|
||||
{
|
||||
ScenePresence presence = ((Scene)sceneobj).GetScenePresence(clientUUID);
|
||||
ScenePresence presence = ((Scene)sceneobj).GetScenePresence(clientUUID);
|
||||
if (presence != null)
|
||||
{
|
||||
IClientAPI client = presence.ControllingClient;
|
||||
|
@ -427,7 +427,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
client.OnUndo -= OnUnDid;
|
||||
//client.OnUpdatePrimGroupMouseRotation += m_innerScene.UpdatePrimRotation;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -504,22 +504,22 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
/// </summary>
|
||||
protected void commit(string message, Scene scene, CMModel model, CMView view)
|
||||
{
|
||||
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity( m_sceneList, scene);
|
||||
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity(m_sceneList, scene);
|
||||
|
||||
string[] args = message.Split(new char[] {' '});
|
||||
|
||||
char[] logMessage = {' '};
|
||||
if (args.Length > 1)
|
||||
{
|
||||
logMessage = new char[message.Length - (args[0].Length)];
|
||||
message.CopyTo(args[0].Length, logMessage, 0, message.Length - (args[0].Length));
|
||||
logMessage = new char[message.Length - (args[0].Length)];
|
||||
message.CopyTo(args[0].Length, logMessage, 0, message.Length - (args[0].Length));
|
||||
}
|
||||
|
||||
m_log.Debug("[CONTENT MANAGEMENT] Saving terrain and objects of region.");
|
||||
foreach(Scene currScene in proximitySceneList)
|
||||
foreach (Scene currScene in proximitySceneList)
|
||||
{
|
||||
model.CommitRegion(currScene, new String(logMessage));
|
||||
view.SendSimChatMessage(scene, "Region Saved Successfully: " + currScene.RegionInfo.RegionName);
|
||||
model.CommitRegion(currScene, new String(logMessage));
|
||||
view.SendSimChatMessage(scene, "Region Saved Successfully: " + currScene.RegionInfo.RegionName);
|
||||
}
|
||||
|
||||
view.SendSimChatMessage(scene, "Successfully saved all regions.");
|
||||
|
@ -527,24 +527,24 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
|
||||
if ((m_state & State.SHOWING_CHANGES) > 0) //DISPLAY NEW CHANGES INSTEAD OF OLD CHANGES
|
||||
{
|
||||
view.SendSimChatMessage(scene, "Updating differences between new revision and current environment.");
|
||||
//Hide objects from users and Forget about them
|
||||
view.HideAllMetaEntities();
|
||||
view.HideAllAuras();
|
||||
model.DeleteAllMetaObjects();
|
||||
view.SendSimChatMessage(scene, "Updating differences between new revision and current environment.");
|
||||
//Hide objects from users and Forget about them
|
||||
view.HideAllMetaEntities();
|
||||
view.HideAllAuras();
|
||||
model.DeleteAllMetaObjects();
|
||||
|
||||
//Recreate them from backend files
|
||||
foreach(Scene currScene in proximitySceneList)
|
||||
{
|
||||
model.UpdateCMEntities(currScene);
|
||||
view.SendSimChatMessage(scene, "Finished updating differences between current scene and last revision: " + currScene.RegionInfo.RegionName);
|
||||
}
|
||||
//Recreate them from backend files
|
||||
foreach (Scene currScene in proximitySceneList)
|
||||
{
|
||||
model.UpdateCMEntities(currScene);
|
||||
view.SendSimChatMessage(scene, "Finished updating differences between current scene and last revision: " + currScene.RegionInfo.RegionName);
|
||||
}
|
||||
|
||||
//Display new objects to users1
|
||||
view.DisplayRecentChanges();
|
||||
view.SendSimChatMessage(scene, "Finished updating for DIFF-MODE.");
|
||||
m_state &= ~(State.DIRTY);
|
||||
m_state |= State.SHOWING_CHANGES;
|
||||
//Display new objects to users1
|
||||
view.DisplayRecentChanges();
|
||||
view.SendSimChatMessage(scene, "Finished updating for DIFF-MODE.");
|
||||
m_state &= ~(State.DIRTY);
|
||||
m_state |= State.SHOWING_CHANGES;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -553,45 +553,45 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
/// </summary>
|
||||
protected void diffmode(Scene scene, CMModel model, CMView view)
|
||||
{
|
||||
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity( m_sceneList, scene);
|
||||
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity(m_sceneList, scene);
|
||||
|
||||
if ((m_state & State.SHOWING_CHANGES) > 0) // TURN OFF
|
||||
{
|
||||
view.SendSimChatMessage(scene, "Hiding all meta objects.");
|
||||
view.HideAllMetaEntities();
|
||||
view.HideAllAuras();
|
||||
view.SendSimChatMessage(scene, "Diff-mode = OFF");
|
||||
view.SendSimChatMessage(scene, "Hiding all meta objects.");
|
||||
view.HideAllMetaEntities();
|
||||
view.HideAllAuras();
|
||||
view.SendSimChatMessage(scene, "Diff-mode = OFF");
|
||||
|
||||
m_state &= ~State.SHOWING_CHANGES;
|
||||
return;
|
||||
m_state &= ~State.SHOWING_CHANGES;
|
||||
return;
|
||||
}
|
||||
else // TURN ON
|
||||
{
|
||||
if ((m_state & State.DIRTY) != 0 || m_state == State.NONE)
|
||||
{
|
||||
view.SendSimChatMessage(scene, "Hiding meta objects and replacing with latest revision");
|
||||
//Hide objects from users and Forget about them
|
||||
view.HideAllMetaEntities();
|
||||
view.HideAllAuras();
|
||||
model.DeleteAllMetaObjects();
|
||||
//Recreate them from backend files
|
||||
foreach(Object currScene in m_sceneList.Values)
|
||||
model.UpdateCMEntities((Scene) currScene);
|
||||
}
|
||||
else if ((m_state & State.DIRTY) != 0) {
|
||||
view.SendSimChatMessage(scene, "Forming list of meta entities with latest revision");
|
||||
foreach(Scene currScene in proximitySceneList)
|
||||
model.UpdateCMEntities(currScene);
|
||||
}
|
||||
if ((m_state & State.DIRTY) != 0 || m_state == State.NONE)
|
||||
{
|
||||
view.SendSimChatMessage(scene, "Hiding meta objects and replacing with latest revision");
|
||||
//Hide objects from users and Forget about them
|
||||
view.HideAllMetaEntities();
|
||||
view.HideAllAuras();
|
||||
model.DeleteAllMetaObjects();
|
||||
//Recreate them from backend files
|
||||
foreach (Object currScene in m_sceneList.Values)
|
||||
model.UpdateCMEntities((Scene) currScene);
|
||||
}
|
||||
else if ((m_state & State.DIRTY) != 0) {
|
||||
view.SendSimChatMessage(scene, "Forming list of meta entities with latest revision");
|
||||
foreach (Scene currScene in proximitySceneList)
|
||||
model.UpdateCMEntities(currScene);
|
||||
}
|
||||
|
||||
view.SendSimChatMessage(scene, "Displaying differences between last revision and current environment");
|
||||
foreach(Scene currScene in proximitySceneList)
|
||||
model.CheckForNewEntitiesMissingAuras(currScene);
|
||||
view.DisplayRecentChanges();
|
||||
view.SendSimChatMessage(scene, "Displaying differences between last revision and current environment");
|
||||
foreach (Scene currScene in proximitySceneList)
|
||||
model.CheckForNewEntitiesMissingAuras(currScene);
|
||||
view.DisplayRecentChanges();
|
||||
|
||||
view.SendSimChatMessage(scene, "Diff-mode = ON");
|
||||
m_state |= State.SHOWING_CHANGES;
|
||||
m_state &= ~State.DIRTY;
|
||||
view.SendSimChatMessage(scene, "Diff-mode = ON");
|
||||
m_state |= State.SHOWING_CHANGES;
|
||||
m_state &= ~State.DIRTY;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -604,23 +604,23 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
if ((m_state & State.SHOWING_CHANGES) > 0)
|
||||
{
|
||||
view.HideAllAuras();
|
||||
view.HideAllMetaEntities();
|
||||
view.HideAllAuras();
|
||||
view.HideAllMetaEntities();
|
||||
}
|
||||
|
||||
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity( m_sceneList, scene);
|
||||
foreach(Scene currScene in proximitySceneList)
|
||||
model.RollbackRegion(currScene);
|
||||
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity(m_sceneList, scene);
|
||||
foreach (Scene currScene in proximitySceneList)
|
||||
model.RollbackRegion(currScene);
|
||||
|
||||
if ((m_state & State.DIRTY) != 0 )
|
||||
if ((m_state & State.DIRTY) != 0)
|
||||
{
|
||||
model.DeleteAllMetaObjects();
|
||||
foreach(Scene currScene in proximitySceneList)
|
||||
model.UpdateCMEntities(currScene);
|
||||
model.DeleteAllMetaObjects();
|
||||
foreach (Scene currScene in proximitySceneList)
|
||||
model.UpdateCMEntities(currScene);
|
||||
}
|
||||
|
||||
if ((m_state & State.SHOWING_CHANGES) > 0)
|
||||
view.DisplayRecentChanges();
|
||||
view.DisplayRecentChanges();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
@ -642,7 +642,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
|
||||
scene.EventManager.OnNewClient += StartManaging;
|
||||
scene.EventManager.OnRemovePresence += StopManaging;
|
||||
// scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
||||
// scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
||||
scene.EventManager.OnObjectBeingRemovedFromScene += GroupBeingDeleted;
|
||||
}
|
||||
|
||||
|
@ -652,9 +652,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
public void SimChat(CMModel model, CMView view, OSChatMessage e, int channel)
|
||||
{
|
||||
if (e.Channel != channel)
|
||||
return;
|
||||
return;
|
||||
if (e.Sender == null)
|
||||
return;
|
||||
return;
|
||||
|
||||
m_log.Debug("[CONTENT MANAGEMENT] Message received: " + e.Message);
|
||||
|
||||
|
@ -667,31 +667,31 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
|
||||
if (!(m_estateModule.IsManager(avatar.UUID)))
|
||||
{
|
||||
m_log.Debug("[CONTENT MANAGEMENT] Message sent from non Estate Manager ... ignoring.");
|
||||
view.SendSimChatMessage(scene, "You must be an estate manager to perform that action.");
|
||||
return;
|
||||
m_log.Debug("[CONTENT MANAGEMENT] Message sent from non Estate Manager ... ignoring.");
|
||||
view.SendSimChatMessage(scene, "You must be an estate manager to perform that action.");
|
||||
return;
|
||||
}
|
||||
|
||||
switch(args[0])
|
||||
switch (args[0])
|
||||
{
|
||||
case "ci":
|
||||
case "commit":
|
||||
commit(message, scene, model, view);
|
||||
break;
|
||||
commit(message, scene, model, view);
|
||||
break;
|
||||
case "dm":
|
||||
case "diff-mode":
|
||||
diffmode(scene, model, view);
|
||||
break;
|
||||
diffmode(scene, model, view);
|
||||
break;
|
||||
case "rb":
|
||||
case "rollback":
|
||||
rollback(scene, model, view);
|
||||
break;
|
||||
rollback(scene, model, view);
|
||||
break;
|
||||
case "help":
|
||||
m_view.DisplayHelpMenu(scene);
|
||||
break;
|
||||
m_view.DisplayHelpMenu(scene);
|
||||
break;
|
||||
default:
|
||||
view.SendSimChatMessage(scene, "Command not found: " + args[0]);
|
||||
break;
|
||||
view.SendSimChatMessage(scene, "Command not found: " + args[0]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
#region Fields
|
||||
|
||||
// private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// Any ContentManagementEntities that represent old versions of current SceneObjectGroups or
|
||||
// old versions of deleted SceneObjectGroups will be stored in this hash table.
|
||||
// The UUID keys are from the SceneObjectGroup RootPart UUIDs
|
||||
|
@ -97,7 +97,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
public bool AddAura(ContentManagementEntity aura)
|
||||
{
|
||||
if (m_NewlyCreatedEntityAura.ContainsKey(aura.UUID))
|
||||
return false;
|
||||
return false;
|
||||
m_NewlyCreatedEntityAura.Add(aura.UUID, aura);
|
||||
return true;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
public bool AddEntity(ContentManagementEntity ent)
|
||||
{
|
||||
if (m_CMEntityHash.ContainsKey(ent.UUID))
|
||||
return false;
|
||||
return false;
|
||||
m_CMEntityHash.Add(ent.UUID, ent);
|
||||
return true;
|
||||
}
|
||||
|
@ -115,23 +115,23 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
System.Collections.ArrayList missingList = new System.Collections.ArrayList();
|
||||
SceneObjectGroup temp = null;
|
||||
foreach( EntityBase currObj in currList )
|
||||
foreach (EntityBase currObj in currList)
|
||||
{
|
||||
if (! (currObj is SceneObjectGroup))
|
||||
continue;
|
||||
temp = (SceneObjectGroup) currObj;
|
||||
if (!(currObj is SceneObjectGroup))
|
||||
continue;
|
||||
temp = (SceneObjectGroup) currObj;
|
||||
|
||||
if (m_CMEntityHash.ContainsKey(temp.UUID))
|
||||
{
|
||||
foreach(SceneObjectPart part in temp.Children.Values)
|
||||
if (!((ContentManagementEntity)m_CMEntityHash[temp.UUID]).HasChildPrim(part.UUID))
|
||||
missingList.Add(part);
|
||||
}
|
||||
else //Entire group is missing from revision. (and is a new part in region)
|
||||
{
|
||||
foreach(SceneObjectPart part in temp.Children.Values)
|
||||
missingList.Add(part);
|
||||
}
|
||||
if (m_CMEntityHash.ContainsKey(temp.UUID))
|
||||
{
|
||||
foreach (SceneObjectPart part in temp.Children.Values)
|
||||
if (!((ContentManagementEntity)m_CMEntityHash[temp.UUID]).HasChildPrim(part.UUID))
|
||||
missingList.Add(part);
|
||||
}
|
||||
else //Entire group is missing from revision. (and is a new part in region)
|
||||
{
|
||||
foreach (SceneObjectPart part in temp.Children.Values)
|
||||
missingList.Add(part);
|
||||
}
|
||||
}
|
||||
return missingList;
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
ContentManagementEntity ent = new ContentManagementEntity(xml, scene, false);
|
||||
if (ent == null)
|
||||
return null;
|
||||
return null;
|
||||
m_CMEntityHash.Add(ent.UnchangedEntity.UUID, ent);
|
||||
return ent;
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
public bool RemoveEntity(UUID uuid)
|
||||
{
|
||||
if (!m_CMEntityHash.ContainsKey(uuid))
|
||||
return false;
|
||||
return false;
|
||||
m_CMEntityHash.Remove(uuid);
|
||||
return true;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
public bool RemoveNewlyCreatedEntityAura(UUID uuid)
|
||||
{
|
||||
if (!m_NewlyCreatedEntityAura.ContainsKey(uuid))
|
||||
return false;
|
||||
return false;
|
||||
m_NewlyCreatedEntityAura.Remove(uuid);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
//If so, then the current scene's parts that are new should be marked green.
|
||||
missingList = m_MetaEntityCollection.CheckForMissingEntities(scene.GetEntities());
|
||||
|
||||
foreach(Object missingPart in missingList)
|
||||
foreach (Object missingPart in missingList)
|
||||
{
|
||||
if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID))
|
||||
continue;
|
||||
|
@ -175,7 +175,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
public void RemoveOrUpdateDeletedEntity(SceneObjectGroup group)
|
||||
{
|
||||
// Deal with new parts not revisioned that have been deleted.
|
||||
foreach(SceneObjectPart part in group.Children.Values)
|
||||
foreach (SceneObjectPart part in group.Children.Values)
|
||||
if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID))
|
||||
m_MetaEntityCollection.RemoveNewlyCreatedEntityAura(part.UUID);
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
try{
|
||||
temp = new SceneObjectGroup(xml);
|
||||
temp.SetScene(scene);
|
||||
foreach(SceneObjectPart part in temp.Children.Values)
|
||||
foreach (SceneObjectPart part in temp.Children.Values)
|
||||
part.RegionHandle = scene.RegionInfo.RegionHandle;
|
||||
ReplacementList.Add(temp.UUID, (EntityBase)temp);
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
try
|
||||
{
|
||||
foreach(EntityBase entity in scene.GetEntities())
|
||||
foreach (EntityBase entity in scene.GetEntities())
|
||||
{
|
||||
if (entity == null)
|
||||
continue;
|
||||
|
@ -253,7 +253,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
break;
|
||||
}
|
||||
|
||||
foreach(UUID uuid in deleteListUUIDs.Keys)
|
||||
foreach (UUID uuid in deleteListUUIDs.Keys)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -275,7 +275,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
scene.Entities = ReplacementList;
|
||||
}
|
||||
|
||||
foreach(EntityBase ent in ReplacementList.Values)
|
||||
foreach (EntityBase ent in ReplacementList.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -340,7 +340,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
System.Collections.ArrayList auraList = new System.Collections.ArrayList();
|
||||
if (group == null)
|
||||
return null;
|
||||
foreach(SceneObjectPart part in group.Children.Values)
|
||||
foreach (SceneObjectPart part in group.Children.Values)
|
||||
{
|
||||
if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID))
|
||||
{
|
||||
|
|
|
@ -78,46 +78,46 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
// Auras To
|
||||
public void DisplayAuras(CMEntityCollection auraCollection)
|
||||
{
|
||||
foreach( Object ent in auraCollection.Auras.Values)
|
||||
((AuraMetaEntity)ent).SendFullUpdateToAll();
|
||||
foreach (Object ent in auraCollection.Auras.Values)
|
||||
((AuraMetaEntity)ent).SendFullUpdateToAll();
|
||||
}
|
||||
|
||||
// Auras To Client
|
||||
public void DisplayAuras(CMEntityCollection auraCollection, IClientAPI client)
|
||||
{
|
||||
foreach( Object ent in auraCollection.Auras.Values)
|
||||
((AuraMetaEntity)ent).SendFullUpdate(client);
|
||||
foreach (Object ent in auraCollection.Auras.Values)
|
||||
((AuraMetaEntity)ent).SendFullUpdate(client);
|
||||
}
|
||||
|
||||
// Auras from List To ALL
|
||||
public void DisplayAuras(ArrayList list)
|
||||
{
|
||||
foreach( Object ent in list)
|
||||
foreach (Object ent in list)
|
||||
{
|
||||
m_log.Debug("[CONTENT MANAGEMENT] displaying new aura riiiiiiiiiiiight NOW");
|
||||
((AuraMetaEntity)ent).SendFullUpdateToAll();
|
||||
m_log.Debug("[CONTENT MANAGEMENT] displaying new aura riiiiiiiiiiiight NOW");
|
||||
((AuraMetaEntity)ent).SendFullUpdateToAll();
|
||||
}
|
||||
}
|
||||
|
||||
// Entities to ALL
|
||||
public void DisplayEntities(CMEntityCollection entityCollection)
|
||||
{
|
||||
foreach( Object ent in entityCollection.Entities.Values)
|
||||
((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
|
||||
foreach (Object ent in entityCollection.Entities.Values)
|
||||
((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
|
||||
}
|
||||
|
||||
// Entities to Client
|
||||
public void DisplayEntities(CMEntityCollection entityCollection, IClientAPI client)
|
||||
{
|
||||
foreach( Object ent in entityCollection.Entities.Values)
|
||||
((ContentManagementEntity)ent).SendFullDiffUpdate(client);
|
||||
foreach (Object ent in entityCollection.Entities.Values)
|
||||
((ContentManagementEntity)ent).SendFullDiffUpdate(client);
|
||||
}
|
||||
|
||||
// Entities from List to ALL
|
||||
public void DisplayEntities(ArrayList list)
|
||||
{
|
||||
foreach( Object ent in list)
|
||||
((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
|
||||
foreach (Object ent in list)
|
||||
((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
|
||||
}
|
||||
|
||||
// Entity to ALL
|
||||
|
@ -138,7 +138,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
ContentManagementEntity group = m_model.GetMetaGroupByPrim(uuid);
|
||||
if (group != null)
|
||||
group.SendFullDiffUpdateToAll();
|
||||
group.SendFullDiffUpdateToAll();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -158,14 +158,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
|
||||
public void HideAllAuras()
|
||||
{
|
||||
foreach(Object obj in m_model.MetaEntityCollection.Auras.Values)
|
||||
((MetaEntity)obj).HideFromAll();
|
||||
foreach (Object obj in m_model.MetaEntityCollection.Auras.Values)
|
||||
((MetaEntity)obj).HideFromAll();
|
||||
}
|
||||
|
||||
public void HideAllMetaEntities()
|
||||
{
|
||||
foreach(Object obj in m_model.MetaEntityCollection.Entities.Values)
|
||||
((ContentManagementEntity)obj).HideFromAll();
|
||||
foreach (Object obj in m_model.MetaEntityCollection.Entities.Values)
|
||||
((ContentManagementEntity)obj).HideFromAll();
|
||||
}
|
||||
|
||||
public void Initialise(CMModel model)
|
||||
|
@ -183,12 +183,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
// Deal with revisioned parts that have been deleted.
|
||||
if (m_model.MetaEntityCollection.Entities.ContainsKey(group.UUID))
|
||||
((ContentManagementEntity)m_model.MetaEntityCollection.Entities[group.UUID]).SendFullDiffUpdateToAll();
|
||||
((ContentManagementEntity)m_model.MetaEntityCollection.Entities[group.UUID]).SendFullDiffUpdateToAll();
|
||||
|
||||
// Deal with new parts not revisioned that have been deleted.
|
||||
foreach(SceneObjectPart part in group.Children.Values)
|
||||
if (m_model.MetaEntityCollection.Auras.ContainsKey(part.UUID))
|
||||
((AuraMetaEntity)m_model.MetaEntityCollection.Auras[part.UUID]).HideFromAll();
|
||||
foreach (SceneObjectPart part in group.Children.Values)
|
||||
if (m_model.MetaEntityCollection.Auras.ContainsKey(part.UUID))
|
||||
((AuraMetaEntity)m_model.MetaEntityCollection.Auras[part.UUID]).HideFromAll();
|
||||
}
|
||||
|
||||
public void SendMetaEntitiesToNewClient(IClientAPI client)
|
||||
|
|
|
@ -104,13 +104,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Check if an entitybase list (like that returned by scene.GetEntities() ) contains a group with the rootpart uuid that matches the current uuid.
|
||||
/// Check if an entitybase list (like that returned by scene.GetEntities()) contains a group with the rootpart uuid that matches the current uuid.
|
||||
/// </summary>
|
||||
private bool ContainsKey(List<EntityBase> list, UUID uuid)
|
||||
{
|
||||
foreach( EntityBase part in list)
|
||||
if (part.UUID == uuid)
|
||||
return true;
|
||||
foreach (EntityBase part in list)
|
||||
if (part.UUID == uuid)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -118,9 +118,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
foreach (EntityBase ent in list)
|
||||
{
|
||||
if (ent is SceneObjectGroup)
|
||||
if (ent.UUID == uuid)
|
||||
return (SceneObjectGroup)ent;
|
||||
if (ent is SceneObjectGroup)
|
||||
if (ent.UUID == uuid)
|
||||
return (SceneObjectGroup)ent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -138,49 +138,49 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
System.Collections.Generic.List<EntityBase> sceneEntityList = m_Entity.Scene.GetEntities();
|
||||
DiffersFromSceneGroup = false;
|
||||
// if group is not contained in scene's list
|
||||
if(!ContainsKey(sceneEntityList, m_UnchangedEntity.UUID))
|
||||
if (!ContainsKey(sceneEntityList, m_UnchangedEntity.UUID))
|
||||
{
|
||||
foreach(SceneObjectPart part in m_UnchangedEntity.Children.Values)
|
||||
{
|
||||
// if scene list no longer contains this part, display translucent part and mark with red aura
|
||||
if(! ContainsKey(sceneEntityList, part.UUID))
|
||||
{
|
||||
// if already displaying a red aura over part, make sure its red
|
||||
if (m_AuraEntities.ContainsKey(part.UUID))
|
||||
{
|
||||
m_AuraEntities[part.UUID].SetAura(new Vector3(254,0,0), part.Scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
|
||||
m_Entity.Scene.PrimIDAllocate(),
|
||||
part.GetWorldPosition(),
|
||||
MetaEntity.TRANSLUCENT,
|
||||
new Vector3(254,0,0),
|
||||
part.Scale
|
||||
);
|
||||
m_AuraEntities.Add(part.UUID, auraGroup);
|
||||
}
|
||||
SceneObjectPart metaPart = m_Entity.GetLinkNumPart(part.LinkNum);
|
||||
SetPartTransparency(metaPart, MetaEntity.TRANSLUCENT);
|
||||
}
|
||||
// otherwise, scene will not contain the part. note: a group can not remove a part without changing group id
|
||||
}
|
||||
foreach (SceneObjectPart part in m_UnchangedEntity.Children.Values)
|
||||
{
|
||||
// if scene list no longer contains this part, display translucent part and mark with red aura
|
||||
if (!ContainsKey(sceneEntityList, part.UUID))
|
||||
{
|
||||
// if already displaying a red aura over part, make sure its red
|
||||
if (m_AuraEntities.ContainsKey(part.UUID))
|
||||
{
|
||||
m_AuraEntities[part.UUID].SetAura(new Vector3(254,0,0), part.Scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
|
||||
m_Entity.Scene.PrimIDAllocate(),
|
||||
part.GetWorldPosition(),
|
||||
MetaEntity.TRANSLUCENT,
|
||||
new Vector3(254,0,0),
|
||||
part.Scale
|
||||
);
|
||||
m_AuraEntities.Add(part.UUID, auraGroup);
|
||||
}
|
||||
SceneObjectPart metaPart = m_Entity.GetLinkNumPart(part.LinkNum);
|
||||
SetPartTransparency(metaPart, MetaEntity.TRANSLUCENT);
|
||||
}
|
||||
// otherwise, scene will not contain the part. note: a group can not remove a part without changing group id
|
||||
}
|
||||
|
||||
// a deleted part has no where to point a beam particle system,
|
||||
// if a metapart had a particle system (maybe it represented a moved part) remove it
|
||||
if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
|
||||
{
|
||||
m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
|
||||
m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
|
||||
}
|
||||
// a deleted part has no where to point a beam particle system,
|
||||
// if a metapart had a particle system (maybe it represented a moved part) remove it
|
||||
if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
|
||||
{
|
||||
m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
|
||||
m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
|
||||
}
|
||||
|
||||
DiffersFromSceneGroup = true;
|
||||
DiffersFromSceneGroup = true;
|
||||
}
|
||||
// if scene list does contain group, compare each part in group for differences and display beams and auras appropriately
|
||||
else
|
||||
{
|
||||
MarkWithDifferences((SceneObjectGroup)GetGroupByUUID(sceneEntityList, m_UnchangedEntity.UUID));
|
||||
MarkWithDifferences((SceneObjectGroup)GetGroupByUUID(sceneEntityList, m_UnchangedEntity.UUID));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
public bool HasChildPrim(UUID uuid)
|
||||
{
|
||||
if (m_UnchangedEntity.Children.ContainsKey(uuid))
|
||||
return true;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -199,28 +199,28 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
/// </summary>
|
||||
public bool HasChildPrim(uint localID)
|
||||
{
|
||||
foreach( SceneObjectPart part in m_UnchangedEntity.Children.Values)
|
||||
if ( part.LocalId == localID )
|
||||
return true;
|
||||
foreach (SceneObjectPart part in m_UnchangedEntity.Children.Values)
|
||||
if (part.LocalId == localID)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Hide(IClientAPI client)
|
||||
{
|
||||
base.Hide(client);
|
||||
foreach(MetaEntity group in m_AuraEntities.Values)
|
||||
group.Hide(client);
|
||||
foreach(MetaEntity group in m_BeamEntities.Values)
|
||||
group.Hide(client);
|
||||
foreach (MetaEntity group in m_AuraEntities.Values)
|
||||
group.Hide(client);
|
||||
foreach (MetaEntity group in m_BeamEntities.Values)
|
||||
group.Hide(client);
|
||||
}
|
||||
|
||||
public override void HideFromAll()
|
||||
{
|
||||
base.HideFromAll();
|
||||
foreach(MetaEntity group in m_AuraEntities.Values)
|
||||
group.HideFromAll();
|
||||
foreach(MetaEntity group in m_BeamEntities.Values)
|
||||
group.HideFromAll();
|
||||
foreach (MetaEntity group in m_AuraEntities.Values)
|
||||
group.HideFromAll();
|
||||
foreach (MetaEntity group in m_BeamEntities.Values)
|
||||
group.HideFromAll();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -237,89 +237,89 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
// Use "UnchangedEntity" to do comparisons because its text, transparency, and other attributes will be just as the user
|
||||
// had originally saved.
|
||||
// m_Entity will NOT necessarily be the same entity as the user had saved.
|
||||
foreach(SceneObjectPart UnchangedPart in m_UnchangedEntity.Children.Values)
|
||||
foreach (SceneObjectPart UnchangedPart in m_UnchangedEntity.Children.Values)
|
||||
{
|
||||
//This is the part that we use to show changes.
|
||||
metaEntityPart = m_Entity.GetLinkNumPart(UnchangedPart.LinkNum);
|
||||
if (sceneEntityGroup.Children.ContainsKey(UnchangedPart.UUID))
|
||||
{
|
||||
sceneEntityPart = sceneEntityGroup.Children[UnchangedPart.UUID];
|
||||
differences = Difference.FindDifferences(UnchangedPart, sceneEntityPart);
|
||||
if (differences != Diff.NONE)
|
||||
metaEntityPart.Text = "CHANGE: " + differences.ToString();
|
||||
if (differences != 0)
|
||||
{
|
||||
// Root Part that has been modified
|
||||
if ((differences&Diff.POSITION) > 0)
|
||||
{
|
||||
// If the position of any part has changed, make sure the RootPart of the
|
||||
// meta entity is pointing with a beam particle system
|
||||
if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
|
||||
{
|
||||
m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
|
||||
m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
|
||||
}
|
||||
BeamMetaEntity beamGroup = new BeamMetaEntity(m_Entity.Scene,
|
||||
m_Entity.Scene.PrimIDAllocate(),
|
||||
m_UnchangedEntity.RootPart.GetWorldPosition(),
|
||||
MetaEntity.TRANSLUCENT,
|
||||
sceneEntityPart,
|
||||
new Vector3(0,0,254)
|
||||
);
|
||||
m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup);
|
||||
}
|
||||
//This is the part that we use to show changes.
|
||||
metaEntityPart = m_Entity.GetLinkNumPart(UnchangedPart.LinkNum);
|
||||
if (sceneEntityGroup.Children.ContainsKey(UnchangedPart.UUID))
|
||||
{
|
||||
sceneEntityPart = sceneEntityGroup.Children[UnchangedPart.UUID];
|
||||
differences = Difference.FindDifferences(UnchangedPart, sceneEntityPart);
|
||||
if (differences != Diff.NONE)
|
||||
metaEntityPart.Text = "CHANGE: " + differences.ToString();
|
||||
if (differences != 0)
|
||||
{
|
||||
// Root Part that has been modified
|
||||
if ((differences&Diff.POSITION) > 0)
|
||||
{
|
||||
// If the position of any part has changed, make sure the RootPart of the
|
||||
// meta entity is pointing with a beam particle system
|
||||
if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
|
||||
{
|
||||
m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
|
||||
m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
|
||||
}
|
||||
BeamMetaEntity beamGroup = new BeamMetaEntity(m_Entity.Scene,
|
||||
m_Entity.Scene.PrimIDAllocate(),
|
||||
m_UnchangedEntity.RootPart.GetWorldPosition(),
|
||||
MetaEntity.TRANSLUCENT,
|
||||
sceneEntityPart,
|
||||
new Vector3(0,0,254)
|
||||
);
|
||||
m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup);
|
||||
}
|
||||
|
||||
if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
|
||||
{
|
||||
m_AuraEntities[UnchangedPart.UUID].HideFromAll();
|
||||
m_AuraEntities.Remove(UnchangedPart.UUID);
|
||||
}
|
||||
AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
|
||||
m_Entity.Scene.PrimIDAllocate(),
|
||||
UnchangedPart.GetWorldPosition(),
|
||||
MetaEntity.TRANSLUCENT,
|
||||
new Vector3(0,0,254),
|
||||
UnchangedPart.Scale
|
||||
);
|
||||
m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
|
||||
SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT);
|
||||
if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
|
||||
{
|
||||
m_AuraEntities[UnchangedPart.UUID].HideFromAll();
|
||||
m_AuraEntities.Remove(UnchangedPart.UUID);
|
||||
}
|
||||
AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
|
||||
m_Entity.Scene.PrimIDAllocate(),
|
||||
UnchangedPart.GetWorldPosition(),
|
||||
MetaEntity.TRANSLUCENT,
|
||||
new Vector3(0,0,254),
|
||||
UnchangedPart.Scale
|
||||
);
|
||||
m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
|
||||
SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT);
|
||||
|
||||
DiffersFromSceneGroup = true;
|
||||
}
|
||||
else // no differences between scene part and meta part
|
||||
{
|
||||
if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
|
||||
{
|
||||
m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
|
||||
m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
|
||||
}
|
||||
if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
|
||||
{
|
||||
m_AuraEntities[UnchangedPart.UUID].HideFromAll();
|
||||
m_AuraEntities.Remove(UnchangedPart.UUID);
|
||||
}
|
||||
SetPartTransparency(metaEntityPart, MetaEntity.NONE);
|
||||
}
|
||||
}
|
||||
else //The entity currently in the scene is missing parts from the metaentity saved, so mark parts red as deleted.
|
||||
{
|
||||
if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
|
||||
{
|
||||
m_AuraEntities[UnchangedPart.UUID].HideFromAll();
|
||||
m_AuraEntities.Remove(UnchangedPart.UUID);
|
||||
}
|
||||
AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
|
||||
m_Entity.Scene.PrimIDAllocate(),
|
||||
UnchangedPart.GetWorldPosition(),
|
||||
MetaEntity.TRANSLUCENT,
|
||||
new Vector3(254,0,0),
|
||||
UnchangedPart.Scale
|
||||
);
|
||||
m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
|
||||
SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT);
|
||||
DiffersFromSceneGroup = true;
|
||||
}
|
||||
else // no differences between scene part and meta part
|
||||
{
|
||||
if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
|
||||
{
|
||||
m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
|
||||
m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
|
||||
}
|
||||
if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
|
||||
{
|
||||
m_AuraEntities[UnchangedPart.UUID].HideFromAll();
|
||||
m_AuraEntities.Remove(UnchangedPart.UUID);
|
||||
}
|
||||
SetPartTransparency(metaEntityPart, MetaEntity.NONE);
|
||||
}
|
||||
}
|
||||
else //The entity currently in the scene is missing parts from the metaentity saved, so mark parts red as deleted.
|
||||
{
|
||||
if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
|
||||
{
|
||||
m_AuraEntities[UnchangedPart.UUID].HideFromAll();
|
||||
m_AuraEntities.Remove(UnchangedPart.UUID);
|
||||
}
|
||||
AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
|
||||
m_Entity.Scene.PrimIDAllocate(),
|
||||
UnchangedPart.GetWorldPosition(),
|
||||
MetaEntity.TRANSLUCENT,
|
||||
new Vector3(254,0,0),
|
||||
UnchangedPart.Scale
|
||||
);
|
||||
m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
|
||||
SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT);
|
||||
|
||||
DiffersFromSceneGroup = true;
|
||||
}
|
||||
DiffersFromSceneGroup = true;
|
||||
}
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
@ -328,8 +328,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
if (DiffersFromSceneGroup)
|
||||
{
|
||||
foreach(AuraMetaEntity group in m_AuraEntities.Values)
|
||||
group.SendFullUpdate(client);
|
||||
foreach (AuraMetaEntity group in m_AuraEntities.Values)
|
||||
group.SendFullUpdate(client);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -337,8 +337,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
if (DiffersFromSceneGroup)
|
||||
{
|
||||
foreach(AuraMetaEntity group in m_AuraEntities.Values)
|
||||
group.SendFullUpdateToAll();
|
||||
foreach (AuraMetaEntity group in m_AuraEntities.Values)
|
||||
group.SendFullUpdateToAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -346,8 +346,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
if (DiffersFromSceneGroup)
|
||||
{
|
||||
foreach(BeamMetaEntity group in m_BeamEntities.Values)
|
||||
group.SendFullUpdate(client);
|
||||
foreach (BeamMetaEntity group in m_BeamEntities.Values)
|
||||
group.SendFullUpdate(client);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -355,8 +355,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
if (DiffersFromSceneGroup)
|
||||
{
|
||||
foreach(BeamMetaEntity group in m_BeamEntities.Values)
|
||||
group.SendFullUpdateToAll();
|
||||
foreach (BeamMetaEntity group in m_BeamEntities.Values)
|
||||
group.SendFullUpdateToAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -365,9 +365,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
FindDifferences();
|
||||
if (DiffersFromSceneGroup)
|
||||
{
|
||||
SendFullUpdate(client);
|
||||
SendFullAuraUpdate(client);
|
||||
SendFullBeamUpdate(client);
|
||||
SendFullUpdate(client);
|
||||
SendFullAuraUpdate(client);
|
||||
SendFullBeamUpdate(client);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -376,9 +376,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
FindDifferences();
|
||||
if (DiffersFromSceneGroup)
|
||||
{
|
||||
SendFullUpdateToAll();
|
||||
SendFullAuraUpdateToAll();
|
||||
SendFullBeamUpdateToAll();
|
||||
SendFullUpdateToAll();
|
||||
SendFullAuraUpdateToAll();
|
||||
SendFullBeamUpdateToAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
return;
|
||||
}
|
||||
|
||||
lock(this)
|
||||
lock (this)
|
||||
{
|
||||
if (!initialised) //only init once
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
if (! m_enabled)
|
||||
return;
|
||||
|
||||
lock(this)
|
||||
lock (this)
|
||||
{
|
||||
if (!m_posted) //only post once
|
||||
{
|
||||
|
|
|
@ -88,13 +88,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
string scenedir;
|
||||
if (!Directory.Exists(m_repodir))
|
||||
Directory.CreateDirectory(m_repodir);
|
||||
Directory.CreateDirectory(m_repodir);
|
||||
|
||||
foreach (UUID region in m_scenes.Keys)
|
||||
{
|
||||
scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar;
|
||||
if (!Directory.Exists(scenedir))
|
||||
Directory.CreateDirectory(scenedir);
|
||||
scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar;
|
||||
if (!Directory.Exists(scenedir))
|
||||
Directory.CreateDirectory(scenedir);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,10 +102,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
private void SetupSerialiser()
|
||||
{
|
||||
if (m_serialiser.Count == 0)
|
||||
foreach(UUID region in m_scenes.Keys)
|
||||
m_serialiser.Add(region,
|
||||
m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
|
||||
);
|
||||
{
|
||||
foreach (UUID region in m_scenes.Keys)
|
||||
{
|
||||
m_serialiser.Add(region,
|
||||
m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
@ -120,7 +124,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
public string GetRegionObjectHeightMap(UUID regionid)
|
||||
{
|
||||
String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
|
||||
Slash.DirectorySeparatorChar + "heightmap.r32";
|
||||
Slash.DirectorySeparatorChar + "heightmap.r32";
|
||||
FileStream fs = new FileStream( filename, FileMode.Open);
|
||||
StreamReader sr = new StreamReader(fs);
|
||||
String result = sr.ReadToEnd();
|
||||
|
@ -132,7 +136,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
public string GetRegionObjectHeightMap(UUID regionid, int revision)
|
||||
{
|
||||
String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
|
||||
Slash.DirectorySeparatorChar + "heightmap.r32";
|
||||
Slash.DirectorySeparatorChar + "heightmap.r32";
|
||||
FileStream fs = new FileStream( filename, FileMode.Open);
|
||||
StreamReader sr = new StreamReader(fs);
|
||||
String result = sr.ReadToEnd();
|
||||
|
@ -145,13 +149,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
System.Collections.ArrayList objectList = new System.Collections.ArrayList();
|
||||
string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar +
|
||||
+ revision + Slash.DirectorySeparatorChar + "objects.xml";
|
||||
+ revision + Slash.DirectorySeparatorChar + "objects.xml";
|
||||
XmlDocument doc = new XmlDocument();
|
||||
XmlNode rootNode;
|
||||
//int primCount = 0;
|
||||
//SceneObjectGroup obj = null;
|
||||
|
||||
if(File.Exists(filename))
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
XmlTextReader reader = new XmlTextReader(filename);
|
||||
reader.WhitespaceHandling = WhitespaceHandling.None;
|
||||
|
@ -160,9 +164,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
rootNode = doc.FirstChild;
|
||||
foreach (XmlNode aPrimNode in rootNode.ChildNodes)
|
||||
{
|
||||
objectList.Add(aPrimNode.OuterXml);
|
||||
}
|
||||
return objectList;
|
||||
objectList.Add(aPrimNode.OuterXml);
|
||||
}
|
||||
return objectList;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -173,16 +177,15 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
m_log.Info("[FSDB]: found revisions:" + revision);
|
||||
System.Collections.ArrayList xmlList = new System.Collections.ArrayList();
|
||||
string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar +
|
||||
+ revision + Slash.DirectorySeparatorChar + "objects.xml";
|
||||
+ revision + Slash.DirectorySeparatorChar + "objects.xml";
|
||||
XmlDocument doc = new XmlDocument();
|
||||
XmlNode rootNode;
|
||||
|
||||
|
||||
m_log.Info("[FSDB]: Checking if " + filename + " exists.");
|
||||
if(File.Exists(filename))
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
Stopwatch x = new Stopwatch();
|
||||
x.Start();
|
||||
Stopwatch x = new Stopwatch();
|
||||
x.Start();
|
||||
|
||||
XmlTextReader reader = new XmlTextReader(filename);
|
||||
reader.WhitespaceHandling = WhitespaceHandling.None;
|
||||
|
@ -191,26 +194,28 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
rootNode = doc.FirstChild;
|
||||
|
||||
foreach (XmlNode aPrimNode in rootNode.ChildNodes)
|
||||
xmlList.Add(aPrimNode.OuterXml);
|
||||
{
|
||||
xmlList.Add(aPrimNode.OuterXml);
|
||||
}
|
||||
|
||||
x.Stop();
|
||||
TimeToDownload += x.ElapsedMilliseconds;
|
||||
m_log.Info("[FileSystemDatabase] Time spent retrieving xml files so far: " + TimeToDownload);
|
||||
x.Stop();
|
||||
TimeToDownload += x.ElapsedMilliseconds;
|
||||
m_log.Info("[FileSystemDatabase] Time spent retrieving xml files so far: " + TimeToDownload);
|
||||
|
||||
return xmlList;
|
||||
return xmlList;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void Initialise(Scene scene, string dir)
|
||||
{
|
||||
lock(this)
|
||||
lock (this)
|
||||
{
|
||||
if (m_repodir == null)
|
||||
m_repodir = dir;
|
||||
if (m_repodir == null)
|
||||
m_repodir = dir;
|
||||
}
|
||||
lock(m_scenes)
|
||||
m_scenes.Add(scene.RegionInfo.RegionID, scene);
|
||||
lock (m_scenes)
|
||||
m_scenes.Add(scene.RegionInfo.RegionID, scene);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID regionid)
|
||||
|
@ -224,19 +229,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
StreamReader sr = null;
|
||||
String logMessage = "";
|
||||
String logLocation = "";
|
||||
foreach(string revisionDir in directories)
|
||||
foreach (string revisionDir in directories)
|
||||
{
|
||||
try {
|
||||
logLocation = revisionDir + Slash.DirectorySeparatorChar + "log";
|
||||
fs = new FileStream( logLocation, FileMode.Open);
|
||||
sr = new StreamReader(fs);
|
||||
logMessage = sr.ReadToEnd();
|
||||
sr.Close();
|
||||
fs.Close();
|
||||
revisionDict.Add(revisionDir, logMessage);
|
||||
}
|
||||
catch (Exception)
|
||||
{}
|
||||
try
|
||||
{
|
||||
logLocation = revisionDir + Slash.DirectorySeparatorChar + "log";
|
||||
fs = new FileStream( logLocation, FileMode.Open);
|
||||
sr = new StreamReader(fs);
|
||||
logMessage = sr.ReadToEnd();
|
||||
sr.Close();
|
||||
fs.Close();
|
||||
revisionDict.Add(revisionDir, logMessage);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
return revisionDict;
|
||||
|
@ -255,8 +262,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
SetupSerialiser();
|
||||
|
||||
m_log.Info("[FSDB]: Creating repository in " + m_repodir + ".");
|
||||
CreateDirectory();
|
||||
m_log.Info("[FSDB]: Creating repository in " + m_repodir + ".");
|
||||
CreateDirectory();
|
||||
}
|
||||
|
||||
public void SaveRegion(UUID regionid, string regionName, string logMessage)
|
||||
|
@ -266,44 +273,44 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
|
||||
m_log.Info("[FSDB]: checking if scene directory exists: " + scenedir);
|
||||
if (!Directory.Exists(scenedir))
|
||||
Directory.CreateDirectory(scenedir);
|
||||
Directory.CreateDirectory(scenedir);
|
||||
|
||||
int newRevisionNum = GetMostRecentRevision(regionid)+1;
|
||||
string revisiondir = scenedir + newRevisionNum + Slash.DirectorySeparatorChar;
|
||||
|
||||
m_log.Info("[FSDB]: checking if revision directory exists: " + revisiondir);
|
||||
if (!Directory.Exists(revisiondir))
|
||||
Directory.CreateDirectory(revisiondir);
|
||||
Directory.CreateDirectory(revisiondir);
|
||||
|
||||
try {
|
||||
Stopwatch x = new Stopwatch();
|
||||
x.Start();
|
||||
if (m_scenes.ContainsKey(regionid))
|
||||
{
|
||||
m_serialiser[regionid].SerialiseRegion(m_scenes[regionid], revisiondir);
|
||||
}
|
||||
x.Stop();
|
||||
TimeToSave += x.ElapsedMilliseconds;
|
||||
m_log.Info("[FileSystemDatabase] Time spent serialising regions to files on disk for " + regionName + ": " + x.ElapsedMilliseconds);
|
||||
m_log.Info("[FileSystemDatabase] Time spent serialising regions to files on disk so far: " + TimeToSave);
|
||||
Stopwatch x = new Stopwatch();
|
||||
x.Start();
|
||||
if (m_scenes.ContainsKey(regionid))
|
||||
{
|
||||
m_serialiser[regionid].SerialiseRegion(m_scenes[regionid], revisiondir);
|
||||
}
|
||||
x.Stop();
|
||||
TimeToSave += x.ElapsedMilliseconds;
|
||||
m_log.Info("[FileSystemDatabase] Time spent serialising regions to files on disk for " + regionName + ": " + x.ElapsedMilliseconds);
|
||||
m_log.Info("[FileSystemDatabase] Time spent serialising regions to files on disk so far: " + TimeToSave);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[FSDB]: Serialisation of region failed: " + e);
|
||||
return;
|
||||
m_log.ErrorFormat("[FSDB]: Serialisation of region failed: " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// Finish by writing log message.
|
||||
FileStream file = new FileStream(revisiondir + "log", FileMode.Create, FileAccess.ReadWrite);
|
||||
StreamWriter sw = new StreamWriter(file);
|
||||
sw.Write(logMessage);
|
||||
sw.Close();
|
||||
// Finish by writing log message.
|
||||
FileStream file = new FileStream(revisiondir + "log", FileMode.Create, FileAccess.ReadWrite);
|
||||
StreamWriter sw = new StreamWriter(file);
|
||||
sw.Write(logMessage);
|
||||
sw.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[FSDB]: Failed trying to save log file " + e);
|
||||
return;
|
||||
m_log.ErrorFormat("[FSDB]: Failed trying to save log file " + e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -160,15 +160,15 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
{
|
||||
//make new uuids
|
||||
Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>();
|
||||
foreach(SceneObjectPart part in m_Entity.Children.Values)
|
||||
foreach (SceneObjectPart part in m_Entity.Children.Values)
|
||||
{
|
||||
part.ResetIDs(part.LinkNum);
|
||||
parts.Add(part.UUID, part);
|
||||
part.ResetIDs(part.LinkNum);
|
||||
parts.Add(part.UUID, part);
|
||||
}
|
||||
|
||||
// make new localids
|
||||
foreach (SceneObjectPart part in m_Entity.Children.Values)
|
||||
part.LocalId = m_Entity.Scene.PrimIDAllocate();
|
||||
part.LocalId = m_Entity.Scene.PrimIDAllocate();
|
||||
|
||||
//finalize
|
||||
m_Entity.UpdateParentIDs();
|
||||
|
@ -188,8 +188,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
//This deletes the group without removing from any databases.
|
||||
//This is important because we are not IN any database.
|
||||
//m_Entity.FakeDeleteGroup();
|
||||
foreach( SceneObjectPart part in m_Entity.Children.Values)
|
||||
client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId);
|
||||
foreach (SceneObjectPart part in m_Entity.Children.Values)
|
||||
client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -197,10 +197,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
/// </summary>
|
||||
public virtual void HideFromAll()
|
||||
{
|
||||
foreach( SceneObjectPart part in m_Entity.Children.Values)
|
||||
m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller)
|
||||
{ controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); }
|
||||
);
|
||||
foreach (SceneObjectPart part in m_Entity.Children.Values)
|
||||
m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller)
|
||||
{ controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); }
|
||||
);
|
||||
}
|
||||
|
||||
public void SendFullUpdate(IClientAPI client)
|
||||
|
@ -239,40 +239,40 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
Color4 texcolor;
|
||||
try
|
||||
{
|
||||
tex = part.Shape.Textures;
|
||||
texcolor = new Color4();
|
||||
tex = part.Shape.Textures;
|
||||
texcolor = new Color4();
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
//m_log.ErrorFormat("[Content Management]: Exception thrown while accessing textures of scene object: " + e);
|
||||
return;
|
||||
//m_log.ErrorFormat("[Content Management]: Exception thrown while accessing textures of scene object: " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
for (uint i = 0; i < tex.FaceTextures.Length; i++)
|
||||
{
|
||||
try {
|
||||
if (tex.FaceTextures[i] != null)
|
||||
{
|
||||
texcolor = tex.FaceTextures[i].RGBA;
|
||||
texcolor.A = transparencyAmount;
|
||||
tex.FaceTextures[i].RGBA = texcolor;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//m_log.ErrorFormat("[Content Management]: Exception thrown while accessing different face textures of object: " + e);
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
if (tex.FaceTextures[i] != null)
|
||||
{
|
||||
texcolor = tex.FaceTextures[i].RGBA;
|
||||
texcolor.A = transparencyAmount;
|
||||
tex.FaceTextures[i].RGBA = texcolor;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//m_log.ErrorFormat("[Content Management]: Exception thrown while accessing different face textures of object: " + e);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
try {
|
||||
texcolor = tex.DefaultTexture.RGBA;
|
||||
texcolor.A = transparencyAmount;
|
||||
tex.DefaultTexture.RGBA = texcolor;
|
||||
part.Shape.TextureEntry = tex.ToBytes();
|
||||
texcolor = tex.DefaultTexture.RGBA;
|
||||
texcolor.A = transparencyAmount;
|
||||
tex.DefaultTexture.RGBA = texcolor;
|
||||
part.Shape.TextureEntry = tex.ToBytes();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//m_log.Info("[Content Management]: Exception thrown while accessing default face texture of object: " + e);
|
||||
//m_log.Info("[Content Management]: Exception thrown while accessing default face texture of object: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -106,13 +106,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
|
||||
private static bool AreVectorsEquivalent(Vector3 first, Vector3 second)
|
||||
{
|
||||
if(TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2)
|
||||
if (TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2)
|
||||
&& TruncateSignificant(first.Y, 2) == TruncateSignificant(second.Y, 2)
|
||||
&& TruncateSignificant(first.Z, 2) == TruncateSignificant(second.Z, 2)
|
||||
)
|
||||
return true;
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
|
||||
|
@ -126,7 +126,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
private static int TruncateSignificant(float num, int digits)
|
||||
{
|
||||
return (int) Math.Ceiling((Math.Truncate(num * 10 * digits)/10*digits));
|
||||
// return (int) ((num * (10*digits))/10*digits);
|
||||
// return (int) ((num * (10*digits))/10*digits);
|
||||
}
|
||||
|
||||
// Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
|
||||
|
@ -164,47 +164,47 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
|||
Diff result = 0;
|
||||
|
||||
// VECTOR COMPARISONS
|
||||
if(! AreVectorsEquivalent(first.Acceleration, second.Acceleration))
|
||||
result |= Diff.ACCELERATION;
|
||||
if(! AreVectorsEquivalent(first.AbsolutePosition, second.AbsolutePosition))
|
||||
result |= Diff.POSITION;
|
||||
if(! AreVectorsEquivalent(first.AngularVelocity, second.AngularVelocity))
|
||||
result |= Diff.ANGULARVELOCITY;
|
||||
if(! AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition))
|
||||
result |= Diff.OFFSETPOSITION;
|
||||
if(! AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity))
|
||||
result |= Diff.ROTATIONALVELOCITY;
|
||||
if(! AreVectorsEquivalent(first.Scale, second.Scale))
|
||||
result |= Diff.SCALE;
|
||||
if(! AreVectorsEquivalent(first.Velocity, second.Velocity))
|
||||
result |= Diff.VELOCITY;
|
||||
if (!AreVectorsEquivalent(first.Acceleration, second.Acceleration))
|
||||
result |= Diff.ACCELERATION;
|
||||
if (!AreVectorsEquivalent(first.AbsolutePosition, second.AbsolutePosition))
|
||||
result |= Diff.POSITION;
|
||||
if (!AreVectorsEquivalent(first.AngularVelocity, second.AngularVelocity))
|
||||
result |= Diff.ANGULARVELOCITY;
|
||||
if (!AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition))
|
||||
result |= Diff.OFFSETPOSITION;
|
||||
if (!AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity))
|
||||
result |= Diff.ROTATIONALVELOCITY;
|
||||
if (!AreVectorsEquivalent(first.Scale, second.Scale))
|
||||
result |= Diff.SCALE;
|
||||
if (!AreVectorsEquivalent(first.Velocity, second.Velocity))
|
||||
result |= Diff.VELOCITY;
|
||||
|
||||
|
||||
// QUATERNION COMPARISONS
|
||||
if(! AreQuaternionsEquivalent(first.RotationOffset, second.RotationOffset))
|
||||
result |= Diff.ROTATIONOFFSET;
|
||||
if (!AreQuaternionsEquivalent(first.RotationOffset, second.RotationOffset))
|
||||
result |= Diff.ROTATIONOFFSET;
|
||||
|
||||
|
||||
// MISC COMPARISONS (UUID, Byte)
|
||||
if(first.ClickAction != second.ClickAction)
|
||||
result |= Diff.CLICKACTION;
|
||||
if(first.ObjectOwner != second.ObjectOwner)
|
||||
result |= Diff.OBJECTOWNER;
|
||||
if (first.ClickAction != second.ClickAction)
|
||||
result |= Diff.CLICKACTION;
|
||||
if (first.ObjectOwner != second.ObjectOwner)
|
||||
result |= Diff.OBJECTOWNER;
|
||||
|
||||
|
||||
// STRING COMPARISONS
|
||||
if(first.Description != second.Description)
|
||||
result |= Diff.DESCRIPTION;
|
||||
if(first.Material != second.Material)
|
||||
result |= Diff.MATERIAL;
|
||||
if(first.Name != second.Name)
|
||||
result |= Diff.NAME;
|
||||
if(first.SitName != second.SitName)
|
||||
result |= Diff.SITNAME;
|
||||
if(first.Text != second.Text)
|
||||
result |= Diff.TEXT;
|
||||
if(first.TouchName != second.TouchName)
|
||||
result |= Diff.TOUCHNAME;
|
||||
if (first.Description != second.Description)
|
||||
result |= Diff.DESCRIPTION;
|
||||
if (first.Material != second.Material)
|
||||
result |= Diff.MATERIAL;
|
||||
if (first.Name != second.Name)
|
||||
result |= Diff.NAME;
|
||||
if (first.SitName != second.SitName)
|
||||
result |= Diff.SITNAME;
|
||||
if (first.Text != second.Text)
|
||||
result |= Diff.TEXT;
|
||||
if (first.TouchName != second.TouchName)
|
||||
result |= Diff.TOUCHNAME;
|
||||
|
||||
x.Stop();
|
||||
TimeToDiff += x.ElapsedMilliseconds;
|
||||
|
|
|
@ -121,7 +121,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
|||
|
||||
public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID texture)
|
||||
{
|
||||
if(texture == UUID.Zero)
|
||||
if (texture == UUID.Zero)
|
||||
return;
|
||||
|
||||
switch (corner)
|
||||
|
|
|
@ -388,10 +388,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
|
|||
get { return 0; }
|
||||
}
|
||||
|
||||
public ulong GetGroupPowers(UUID groupID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
public ulong GetGroupPowers(UUID groupID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public virtual int NextAnimationSequenceNumber
|
||||
{
|
||||
|
|
|
@ -287,10 +287,10 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
get { return 0; }
|
||||
}
|
||||
|
||||
public ulong GetGroupPowers(UUID groupID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
public ulong GetGroupPowers(UUID groupID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public virtual int NextAnimationSequenceNumber
|
||||
{
|
||||
|
|
|
@ -87,71 +87,71 @@ namespace OpenSim.Region.Physics.Meshing
|
|||
//[1.0f, 1.0f, -2.4492127076447545e-016f]];
|
||||
/*
|
||||
angles3 = [
|
||||
[0.0, 1.0, 0.0],
|
||||
[0.33333333333333331, -0.49999999999999978, 0.86602540378443871],
|
||||
[0.66666666666666663, -0.50000000000000044, -0.86602540378443837],
|
||||
[1.0, 1.0, -2.4492127076447545e-016]]
|
||||
[0.0, 1.0, 0.0],
|
||||
[0.33333333333333331, -0.49999999999999978, 0.86602540378443871],
|
||||
[0.66666666666666663, -0.50000000000000044, -0.86602540378443837],
|
||||
[1.0, 1.0, -2.4492127076447545e-016]]
|
||||
|
||||
angles4 = [
|
||||
[0.0, 1.0, 0.0],
|
||||
[0.25, 0.0, 1.0],
|
||||
[0.5, -1.0, 0.0],
|
||||
[0.75, 0.0, -1.0],
|
||||
[1.0, 1.0, 0.0]]
|
||||
[0.0, 1.0, 0.0],
|
||||
[0.25, 0.0, 1.0],
|
||||
[0.5, -1.0, 0.0],
|
||||
[0.75, 0.0, -1.0],
|
||||
[1.0, 1.0, 0.0]]
|
||||
|
||||
angles24 = [
|
||||
[0.0, 0.5, 0.0],
|
||||
[0.041666666666666664, 0.48296291314453416, 0.12940952255126037],
|
||||
[0.083333333333333329, 0.43301270189221935, 0.25],
|
||||
[0.125, 0.35355339059327379, 0.35355339059327373],
|
||||
[0.16666666666666666, 0.25, 0.4330127018922193],
|
||||
[0.20833333333333331, 0.12940952255126048, 0.4829629131445341],
|
||||
[0.25, 0.0, 0.5],
|
||||
[0.29166666666666663, -0.12940952255126031, 0.48296291314453416],
|
||||
[0.33333333333333331, -0.25, 0.43301270189221935],
|
||||
[0.375, -0.35355339059327373, 0.35355339059327379],
|
||||
[0.41666666666666663, -0.43301270189221924, 0.25],
|
||||
[0.45833333333333331, -0.4829629131445341, 0.12940952255126051],
|
||||
[0.5, -0.5, 0.0],
|
||||
[0.54166666666666663, -0.48296291314453421, -0.12940952255126018],
|
||||
[0.58333333333333326, -0.43301270189221941, -0.25],
|
||||
[0.62499999999999989, -0.35355339059327395, -0.35355339059327356],
|
||||
[0.66666666666666663, -0.25, -0.43301270189221919],
|
||||
[0.70833333333333326, -0.12940952255126076, -0.48296291314453405],
|
||||
[0.75, 0.0, -0.5],
|
||||
[0.79166666666666663, 0.12940952255126015, -0.48296291314453421],
|
||||
[0.83333333333333326, 0.25, -0.43301270189221952],
|
||||
[0.875, 0.35355339059327368, -0.35355339059327384],
|
||||
[0.91666666666666663, 0.43301270189221919, -0.25],
|
||||
[0.95833333333333326, 0.48296291314453405, -0.12940952255126079],
|
||||
[1.0, 0.5, 0.0]]
|
||||
[0.0, 0.5, 0.0],
|
||||
[0.041666666666666664, 0.48296291314453416, 0.12940952255126037],
|
||||
[0.083333333333333329, 0.43301270189221935, 0.25],
|
||||
[0.125, 0.35355339059327379, 0.35355339059327373],
|
||||
[0.16666666666666666, 0.25, 0.4330127018922193],
|
||||
[0.20833333333333331, 0.12940952255126048, 0.4829629131445341],
|
||||
[0.25, 0.0, 0.5],
|
||||
[0.29166666666666663, -0.12940952255126031, 0.48296291314453416],
|
||||
[0.33333333333333331, -0.25, 0.43301270189221935],
|
||||
[0.375, -0.35355339059327373, 0.35355339059327379],
|
||||
[0.41666666666666663, -0.43301270189221924, 0.25],
|
||||
[0.45833333333333331, -0.4829629131445341, 0.12940952255126051],
|
||||
[0.5, -0.5, 0.0],
|
||||
[0.54166666666666663, -0.48296291314453421, -0.12940952255126018],
|
||||
[0.58333333333333326, -0.43301270189221941, -0.25],
|
||||
[0.62499999999999989, -0.35355339059327395, -0.35355339059327356],
|
||||
[0.66666666666666663, -0.25, -0.43301270189221919],
|
||||
[0.70833333333333326, -0.12940952255126076, -0.48296291314453405],
|
||||
[0.75, 0.0, -0.5],
|
||||
[0.79166666666666663, 0.12940952255126015, -0.48296291314453421],
|
||||
[0.83333333333333326, 0.25, -0.43301270189221952],
|
||||
[0.875, 0.35355339059327368, -0.35355339059327384],
|
||||
[0.91666666666666663, 0.43301270189221919, -0.25],
|
||||
[0.95833333333333326, 0.48296291314453405, -0.12940952255126079],
|
||||
[1.0, 0.5, 0.0]]
|
||||
|
||||
angles24 = [
|
||||
[0.0, 1.0, 0.0],
|
||||
[0.041666666666666664, 0.96592582628906831, 0.25881904510252074],
|
||||
[0.083333333333333329, 0.86602540378443871, 0.5],
|
||||
[0.125, 0.70710678118654757, 0.70710678118654746],
|
||||
[0.16666666666666667, 0.5, 0.8660254037844386],
|
||||
[0.20833333333333331, 0.25881904510252096, 0.9659258262890682],
|
||||
[0.25, 6.1230317691118863e-017, 1.0],
|
||||
[0.29166666666666663, -0.25881904510252063, 0.96592582628906831],
|
||||
[0.33333333333333333, -0.5, 0.86602540378443871],
|
||||
[0.375, -0.70710678118654746, 0.70710678118654757],
|
||||
[0.41666666666666663, -0.86602540378443849, 0.5],
|
||||
[0.45833333333333331, -0.9659258262890682, 0.25881904510252102],
|
||||
[0.5, -1.0, 1.2246063538223773e-016],
|
||||
[0.54166666666666663, -0.96592582628906842, -0.25881904510252035],
|
||||
[0.58333333333333326, -0.86602540378443882, -0.5],
|
||||
[0.62499999999999989, -0.70710678118654791, -0.70710678118654713],
|
||||
[0.66666666666666667, -0.5, -0.86602540378443837],
|
||||
[0.70833333333333326, -0.25881904510252152, -0.96592582628906809],
|
||||
[0.75, -1.8369095307335659e-016, -1.0],
|
||||
[0.79166666666666663, 0.2588190451025203, -0.96592582628906842],
|
||||
[0.83333333333333326, 0.5, -0.86602540378443904],
|
||||
[0.875, 0.70710678118654735, -0.70710678118654768],
|
||||
[0.91666666666666663, 0.86602540378443837, -0.5],
|
||||
[0.95833333333333326, 0.96592582628906809, -0.25881904510252157],
|
||||
[1.0, 1.0, -2.4492127076447545e-016]]
|
||||
[0.0, 1.0, 0.0],
|
||||
[0.041666666666666664, 0.96592582628906831, 0.25881904510252074],
|
||||
[0.083333333333333329, 0.86602540378443871, 0.5],
|
||||
[0.125, 0.70710678118654757, 0.70710678118654746],
|
||||
[0.16666666666666667, 0.5, 0.8660254037844386],
|
||||
[0.20833333333333331, 0.25881904510252096, 0.9659258262890682],
|
||||
[0.25, 6.1230317691118863e-017, 1.0],
|
||||
[0.29166666666666663, -0.25881904510252063, 0.96592582628906831],
|
||||
[0.33333333333333333, -0.5, 0.86602540378443871],
|
||||
[0.375, -0.70710678118654746, 0.70710678118654757],
|
||||
[0.41666666666666663, -0.86602540378443849, 0.5],
|
||||
[0.45833333333333331, -0.9659258262890682, 0.25881904510252102],
|
||||
[0.5, -1.0, 1.2246063538223773e-016],
|
||||
[0.54166666666666663, -0.96592582628906842, -0.25881904510252035],
|
||||
[0.58333333333333326, -0.86602540378443882, -0.5],
|
||||
[0.62499999999999989, -0.70710678118654791, -0.70710678118654713],
|
||||
[0.66666666666666667, -0.5, -0.86602540378443837],
|
||||
[0.70833333333333326, -0.25881904510252152, -0.96592582628906809],
|
||||
[0.75, -1.8369095307335659e-016, -1.0],
|
||||
[0.79166666666666663, 0.2588190451025203, -0.96592582628906842],
|
||||
[0.83333333333333326, 0.5, -0.86602540378443904],
|
||||
[0.875, 0.70710678118654735, -0.70710678118654768],
|
||||
[0.91666666666666663, 0.86602540378443837, -0.5],
|
||||
[0.95833333333333326, 0.96592582628906809, -0.25881904510252157],
|
||||
[1.0, 1.0, -2.4492127076447545e-016]]
|
||||
|
||||
*/
|
||||
|
||||
|
@ -161,10 +161,10 @@ angles24 = [
|
|||
|
||||
private Angle[] angles3 =
|
||||
{
|
||||
new Angle(0.0f, 1.0f, 0.0f),
|
||||
new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f),
|
||||
new Angle(0.66666666666666667f, -0.5f, -0.86602540378443837f),
|
||||
new Angle(1.0f, 1.0f, 0.0f)
|
||||
new Angle(0.0f, 1.0f, 0.0f),
|
||||
new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f),
|
||||
new Angle(0.66666666666666667f, -0.5f, -0.86602540378443837f),
|
||||
new Angle(1.0f, 1.0f, 0.0f)
|
||||
};
|
||||
|
||||
private Angle[] angles4 =
|
||||
|
@ -179,30 +179,30 @@ angles24 = [
|
|||
private Angle[] angles24 =
|
||||
{
|
||||
new Angle(0.0f, 1.0f, 0.0f),
|
||||
new Angle(0.041666666666666664f, 0.96592582628906831f, 0.25881904510252074f),
|
||||
new Angle(0.083333333333333329f, 0.86602540378443871f, 0.5f),
|
||||
new Angle(0.125f, 0.70710678118654757f, 0.70710678118654746f),
|
||||
new Angle(0.16666666666666667f, 0.5f, 0.8660254037844386f),
|
||||
new Angle(0.20833333333333331f, 0.25881904510252096f, 0.9659258262890682f),
|
||||
new Angle(0.25f, 0.0f, 1.0f),
|
||||
new Angle(0.29166666666666663f, -0.25881904510252063f, 0.96592582628906831f),
|
||||
new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f),
|
||||
new Angle(0.375f, -0.70710678118654746f, 0.70710678118654757f),
|
||||
new Angle(0.41666666666666663f, -0.86602540378443849f, 0.5f),
|
||||
new Angle(0.45833333333333331f, -0.9659258262890682f, 0.25881904510252102f),
|
||||
new Angle(0.5f, -1.0f, 0.0f),
|
||||
new Angle(0.54166666666666663f, -0.96592582628906842f, -0.25881904510252035f),
|
||||
new Angle(0.58333333333333326f, -0.86602540378443882f, -0.5f),
|
||||
new Angle(0.62499999999999989f, -0.70710678118654791f, -0.70710678118654713f),
|
||||
new Angle(0.66666666666666667f, -0.5f, -0.86602540378443837f),
|
||||
new Angle(0.70833333333333326f, -0.25881904510252152f, -0.96592582628906809f),
|
||||
new Angle(0.75f, 0.0f, -1.0f),
|
||||
new Angle(0.79166666666666663f, 0.2588190451025203f, -0.96592582628906842f),
|
||||
new Angle(0.83333333333333326f, 0.5f, -0.86602540378443904f),
|
||||
new Angle(0.875f, 0.70710678118654735f, -0.70710678118654768f),
|
||||
new Angle(0.91666666666666663f, 0.86602540378443837f, -0.5f),
|
||||
new Angle(0.95833333333333326f, 0.96592582628906809f, -0.25881904510252157f),
|
||||
new Angle(1.0f, 1.0f, 0.0f)
|
||||
new Angle(0.041666666666666664f, 0.96592582628906831f, 0.25881904510252074f),
|
||||
new Angle(0.083333333333333329f, 0.86602540378443871f, 0.5f),
|
||||
new Angle(0.125f, 0.70710678118654757f, 0.70710678118654746f),
|
||||
new Angle(0.16666666666666667f, 0.5f, 0.8660254037844386f),
|
||||
new Angle(0.20833333333333331f, 0.25881904510252096f, 0.9659258262890682f),
|
||||
new Angle(0.25f, 0.0f, 1.0f),
|
||||
new Angle(0.29166666666666663f, -0.25881904510252063f, 0.96592582628906831f),
|
||||
new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f),
|
||||
new Angle(0.375f, -0.70710678118654746f, 0.70710678118654757f),
|
||||
new Angle(0.41666666666666663f, -0.86602540378443849f, 0.5f),
|
||||
new Angle(0.45833333333333331f, -0.9659258262890682f, 0.25881904510252102f),
|
||||
new Angle(0.5f, -1.0f, 0.0f),
|
||||
new Angle(0.54166666666666663f, -0.96592582628906842f, -0.25881904510252035f),
|
||||
new Angle(0.58333333333333326f, -0.86602540378443882f, -0.5f),
|
||||
new Angle(0.62499999999999989f, -0.70710678118654791f, -0.70710678118654713f),
|
||||
new Angle(0.66666666666666667f, -0.5f, -0.86602540378443837f),
|
||||
new Angle(0.70833333333333326f, -0.25881904510252152f, -0.96592582628906809f),
|
||||
new Angle(0.75f, 0.0f, -1.0f),
|
||||
new Angle(0.79166666666666663f, 0.2588190451025203f, -0.96592582628906842f),
|
||||
new Angle(0.83333333333333326f, 0.5f, -0.86602540378443904f),
|
||||
new Angle(0.875f, 0.70710678118654735f, -0.70710678118654768f),
|
||||
new Angle(0.91666666666666663f, 0.86602540378443837f, -0.5f),
|
||||
new Angle(0.95833333333333326f, 0.96592582628906809f, -0.25881904510252157f),
|
||||
new Angle(1.0f, 1.0f, 0.0f)
|
||||
};
|
||||
|
||||
private Angle interpolatePoints(float newPoint, Angle p1, Angle p2)
|
||||
|
|
|
@ -7546,7 +7546,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
|
||||
// the object we are in
|
||||
UUID objectID = m_host.ParentUUID;
|
||||
if(objectID == UUID.Zero) return;
|
||||
if (objectID == UUID.Zero) return;
|
||||
|
||||
// we need the permission first, to know which avatar we want to set the camera for
|
||||
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
|
||||
|
@ -7597,7 +7597,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
|
||||
// the object we are in
|
||||
UUID objectID = m_host.ParentUUID;
|
||||
if(objectID == UUID.Zero) return;
|
||||
if (objectID == UUID.Zero) return;
|
||||
|
||||
// we need the permission first, to know which avatar we want to clear the camera for
|
||||
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
|
||||
|
|
|
@ -7418,7 +7418,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
// the object we are in
|
||||
UUID objectID = m_host.ParentUUID;
|
||||
if(objectID == UUID.Zero) return;
|
||||
if (objectID == UUID.Zero) return;
|
||||
|
||||
// we need the permission first, to know which avatar we want to set the camera for
|
||||
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
|
||||
|
@ -7469,7 +7469,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
// the object we are in
|
||||
UUID objectID = m_host.ParentUUID;
|
||||
if(objectID == UUID.Zero) return;
|
||||
if (objectID == UUID.Zero) return;
|
||||
|
||||
// we need the permission first, to know which avatar we want to clear the camera for
|
||||
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
|
||||
|
|
|
@ -686,7 +686,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
|||
{
|
||||
// If we're currently in an event, just tell it to save upon return
|
||||
//
|
||||
if(m_InEvent)
|
||||
if (m_InEvent)
|
||||
{
|
||||
m_SaveState = true;
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue