Update svn properties, formatting cleanup.
parent
3e1441afe1
commit
fae34bb10c
|
@ -644,7 +644,7 @@ VALUES
|
||||||
using (AutoClosingSqlCommand cmd = _Database.Query(sql))
|
using (AutoClosingSqlCommand cmd = _Database.Query(sql))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(_Database.CreateParameter("@regionUUID", regionUUID.ToString()));
|
cmd.Parameters.Add(_Database.CreateParameter("@regionUUID", regionUUID.ToString()));
|
||||||
using(SqlDataReader reader = cmd.ExecuteReader())
|
using (SqlDataReader reader = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
if (reader.Read())
|
if (reader.Read())
|
||||||
{
|
{
|
||||||
|
|
|
@ -185,7 +185,7 @@ namespace OpenSim.Data.MySQL
|
||||||
else
|
else
|
||||||
m_FieldMap[name].SetValue(es, false);
|
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;
|
UUID uuid = UUID.Zero;
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ namespace OpenSim.Data.MySQL
|
||||||
m_lastConnect++;
|
m_lastConnect++;
|
||||||
|
|
||||||
// Overflow protection
|
// Overflow protection
|
||||||
if(m_lastConnect == int.MaxValue)
|
if (m_lastConnect == int.MaxValue)
|
||||||
m_lastConnect = 0;
|
m_lastConnect = 0;
|
||||||
|
|
||||||
MySQLSuperManager x = m_dbconnections[m_lastConnect%m_maxConnections];
|
MySQLSuperManager x = m_dbconnections[m_lastConnect%m_maxConnections];
|
||||||
|
|
|
@ -109,7 +109,7 @@ namespace OpenSim.Data.SQLite
|
||||||
else
|
else
|
||||||
m_FieldMap[name].SetValue(es, false);
|
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;
|
UUID uuid = UUID.Zero;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
|
|
||||||
public FileAssetClient(string dir)
|
public FileAssetClient(string dir)
|
||||||
{
|
{
|
||||||
if(!Directory.Exists(dir))
|
if (!Directory.Exists(dir))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(dir);
|
Directory.CreateDirectory(dir);
|
||||||
}
|
}
|
||||||
|
|
|
@ -737,7 +737,7 @@ namespace OpenSim.Framework
|
||||||
/// The extracted ulong
|
/// The extracted ulong
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public static ulong BytesToUInt64Big(byte[] bytes) {
|
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) |
|
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];
|
((ulong)bytes[4] << 24) | ((ulong)bytes[5] << 16) | ((ulong)bytes[6] << 8) | (ulong)bytes[7];
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,7 +161,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
string message = e.Message;
|
string message = e.Message;
|
||||||
UUID fromID = e.SenderUUID;
|
UUID fromID = e.SenderUUID;
|
||||||
|
|
||||||
if(message.Length >= 1000) // libomv limit
|
if (message.Length >= 1000) // libomv limit
|
||||||
message = message.Substring(0, 1000);
|
message = message.Substring(0, 1000);
|
||||||
|
|
||||||
if (e.Sender != null)
|
if (e.Sender != null)
|
||||||
|
|
|
@ -820,7 +820,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
|
||||||
string secret = (string) requestData["secret"];
|
string secret = (string) requestData["secret"];
|
||||||
|
|
||||||
Scene userScene = GetSceneByUUID(regionId);
|
Scene userScene = GetSceneByUUID(regionId);
|
||||||
if(userScene != null)
|
if (userScene != null)
|
||||||
{
|
{
|
||||||
if (userScene.RegionInfo.regionSecret.ToString() == secret)
|
if (userScene.RegionInfo.regionSecret.ToString() == secret)
|
||||||
{
|
{
|
||||||
|
|
|
@ -129,7 +129,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private SceneObjectGroup GetGroupByPrim(uint localID)
|
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())
|
foreach (EntityBase ent in ((Scene)currScene).GetEntities())
|
||||||
{
|
{
|
||||||
|
@ -145,10 +145,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
|
|
||||||
private void Initialize(CMModel model, CMView view, Scene scene, int channel)
|
private void Initialize(CMModel model, CMView view, Scene scene, int channel)
|
||||||
{
|
{
|
||||||
lock(this)
|
lock (this)
|
||||||
{
|
{
|
||||||
m_estateModule = scene.RequestModuleInterface<IEstateModule>();
|
m_estateModule = scene.RequestModuleInterface<IEstateModule>();
|
||||||
m_thread = new Thread( MainLoop );
|
m_thread = new Thread(MainLoop);
|
||||||
m_thread.Name = "Content Management";
|
m_thread.Name = "Content Management";
|
||||||
m_thread.IsBackground = true;
|
m_thread.IsBackground = true;
|
||||||
m_thread.Start();
|
m_thread.Start();
|
||||||
|
@ -164,12 +164,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
{
|
{
|
||||||
CMModel model = m_model; CMView view = m_view; int channel = m_channel;
|
CMModel model = m_model; CMView view = m_view; int channel = m_channel;
|
||||||
Work currentJob = new Work();
|
Work currentJob = new Work();
|
||||||
while(true)
|
while (true)
|
||||||
{
|
{
|
||||||
currentJob = m_WorkQueue.Dequeue();
|
currentJob = m_WorkQueue.Dequeue();
|
||||||
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- DeQueued a request");
|
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- DeQueued a request");
|
||||||
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Work type: " + currentJob.Type);
|
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Work type: " + currentJob.Type);
|
||||||
switch(currentJob.Type)
|
switch (currentJob.Type)
|
||||||
{
|
{
|
||||||
case WorkType.NONE:
|
case WorkType.NONE:
|
||||||
break;
|
break;
|
||||||
|
@ -222,7 +222,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
group = GetGroupByPrim(LocalId);
|
group = GetGroupByPrim(LocalId);
|
||||||
if (group != null)
|
if (group != null)
|
||||||
{
|
{
|
||||||
view.DisplayAuras( model.UpdateNormalEntityEffects(group) ); //Might be a normal entity (green aura)
|
view.DisplayAuras(model.UpdateNormalEntityEffects(group)); //Might be a normal entity (green aura)
|
||||||
m_view.DisplayMetaEntity(group.UUID); //Might be a meta entity (blue 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)
|
private void ObjectDuplicated(CMModel model, CMView view, uint localId)
|
||||||
{
|
{
|
||||||
if ((m_state & State.SHOWING_CHANGES) > 0)
|
if ((m_state & State.SHOWING_CHANGES) > 0)
|
||||||
view.DisplayAuras(model.CheckForNewEntitiesMissingAuras( GetGroupByPrim(localId).Scene ));
|
view.DisplayAuras(model.CheckForNewEntitiesMissingAuras(GetGroupByPrim(localId).Scene));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -256,7 +256,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
{
|
{
|
||||||
if ((m_state & State.SHOWING_CHANGES) > 0)
|
if ((m_state & State.SHOWING_CHANGES) > 0)
|
||||||
{
|
{
|
||||||
foreach(Object scene in m_sceneList.Values)
|
foreach (Object scene in m_sceneList.Values)
|
||||||
m_view.DisplayAuras(model.CheckForNewEntitiesMissingAuras((Scene) scene));
|
m_view.DisplayAuras(model.CheckForNewEntitiesMissingAuras((Scene) scene));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -328,27 +328,27 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Takes a list of scenes and forms a new orderd list according to the proximity of scenes to the second argument.
|
/// Takes a list of scenes and forms a new orderd list according to the proximity of scenes to the second argument.
|
||||||
/// </summary>
|
/// </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;
|
int somethingAddedToList = 1;
|
||||||
System.Collections.Generic.List<Scene> newList = new List<Scene>();
|
System.Collections.Generic.List<Scene> newList = new List<Scene>();
|
||||||
newList.Add(scene);
|
newList.Add(scene);
|
||||||
|
|
||||||
if (! sceneList.ContainsValue(scene))
|
if (!sceneList.ContainsValue(scene))
|
||||||
{
|
{
|
||||||
foreach(Object sceneObj in sceneList)
|
foreach (Object sceneObj in sceneList)
|
||||||
newList.Add((Scene) sceneObj);
|
newList.Add((Scene) sceneObj);
|
||||||
return newList;
|
return newList;
|
||||||
}
|
}
|
||||||
|
|
||||||
while(somethingAddedToList > 0)
|
while (somethingAddedToList > 0)
|
||||||
{
|
{
|
||||||
somethingAddedToList = 0;
|
somethingAddedToList = 0;
|
||||||
for(int i = 0; i < newList.Count; i++)
|
for (int i = 0; i < newList.Count; i++)
|
||||||
{
|
{
|
||||||
foreach(Object sceneObj in sceneList.Values)
|
foreach (Object sceneObj in sceneList.Values)
|
||||||
{
|
{
|
||||||
if (newList[i].CheckNeighborRegion(((Scene)sceneObj).RegionInfo) && (! newList.Contains((Scene)sceneObj)) )
|
if (newList[i].CheckNeighborRegion(((Scene)sceneObj).RegionInfo) && (!newList.Contains((Scene)sceneObj)))
|
||||||
{
|
{
|
||||||
newList.Add((Scene)sceneObj);
|
newList.Add((Scene)sceneObj);
|
||||||
somethingAddedToList++;
|
somethingAddedToList++;
|
||||||
|
@ -357,8 +357,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(Object sceneObj in sceneList.Values)
|
foreach (Object sceneObj in sceneList.Values)
|
||||||
if (! newList.Contains((Scene)sceneObj))
|
if (!newList.Contains((Scene)sceneObj))
|
||||||
newList.Add((Scene)sceneObj);
|
newList.Add((Scene)sceneObj);
|
||||||
|
|
||||||
return newList;
|
return newList;
|
||||||
|
@ -405,7 +405,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected void StopManaging(UUID clientUUID)
|
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)
|
if (presence != null)
|
||||||
|
@ -504,7 +504,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected void commit(string message, Scene scene, CMModel model, CMView view)
|
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[] {' '});
|
string[] args = message.Split(new char[] {' '});
|
||||||
|
|
||||||
|
@ -516,7 +516,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.Debug("[CONTENT MANAGEMENT] Saving terrain and objects of region.");
|
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));
|
model.CommitRegion(currScene, new String(logMessage));
|
||||||
view.SendSimChatMessage(scene, "Region Saved Successfully: " + currScene.RegionInfo.RegionName);
|
view.SendSimChatMessage(scene, "Region Saved Successfully: " + currScene.RegionInfo.RegionName);
|
||||||
|
@ -534,7 +534,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
model.DeleteAllMetaObjects();
|
model.DeleteAllMetaObjects();
|
||||||
|
|
||||||
//Recreate them from backend files
|
//Recreate them from backend files
|
||||||
foreach(Scene currScene in proximitySceneList)
|
foreach (Scene currScene in proximitySceneList)
|
||||||
{
|
{
|
||||||
model.UpdateCMEntities(currScene);
|
model.UpdateCMEntities(currScene);
|
||||||
view.SendSimChatMessage(scene, "Finished updating differences between current scene and last revision: " + currScene.RegionInfo.RegionName);
|
view.SendSimChatMessage(scene, "Finished updating differences between current scene and last revision: " + currScene.RegionInfo.RegionName);
|
||||||
|
@ -553,7 +553,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected void diffmode(Scene scene, CMModel model, CMView view)
|
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
|
if ((m_state & State.SHOWING_CHANGES) > 0) // TURN OFF
|
||||||
{
|
{
|
||||||
|
@ -575,17 +575,17 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
view.HideAllAuras();
|
view.HideAllAuras();
|
||||||
model.DeleteAllMetaObjects();
|
model.DeleteAllMetaObjects();
|
||||||
//Recreate them from backend files
|
//Recreate them from backend files
|
||||||
foreach(Object currScene in m_sceneList.Values)
|
foreach (Object currScene in m_sceneList.Values)
|
||||||
model.UpdateCMEntities((Scene) currScene);
|
model.UpdateCMEntities((Scene) currScene);
|
||||||
}
|
}
|
||||||
else if ((m_state & State.DIRTY) != 0) {
|
else if ((m_state & State.DIRTY) != 0) {
|
||||||
view.SendSimChatMessage(scene, "Forming list of meta entities with latest revision");
|
view.SendSimChatMessage(scene, "Forming list of meta entities with latest revision");
|
||||||
foreach(Scene currScene in proximitySceneList)
|
foreach (Scene currScene in proximitySceneList)
|
||||||
model.UpdateCMEntities(currScene);
|
model.UpdateCMEntities(currScene);
|
||||||
}
|
}
|
||||||
|
|
||||||
view.SendSimChatMessage(scene, "Displaying differences between last revision and current environment");
|
view.SendSimChatMessage(scene, "Displaying differences between last revision and current environment");
|
||||||
foreach(Scene currScene in proximitySceneList)
|
foreach (Scene currScene in proximitySceneList)
|
||||||
model.CheckForNewEntitiesMissingAuras(currScene);
|
model.CheckForNewEntitiesMissingAuras(currScene);
|
||||||
view.DisplayRecentChanges();
|
view.DisplayRecentChanges();
|
||||||
|
|
||||||
|
@ -608,14 +608,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
view.HideAllMetaEntities();
|
view.HideAllMetaEntities();
|
||||||
}
|
}
|
||||||
|
|
||||||
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity( m_sceneList, scene);
|
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity(m_sceneList, scene);
|
||||||
foreach(Scene currScene in proximitySceneList)
|
foreach (Scene currScene in proximitySceneList)
|
||||||
model.RollbackRegion(currScene);
|
model.RollbackRegion(currScene);
|
||||||
|
|
||||||
if ((m_state & State.DIRTY) != 0 )
|
if ((m_state & State.DIRTY) != 0)
|
||||||
{
|
{
|
||||||
model.DeleteAllMetaObjects();
|
model.DeleteAllMetaObjects();
|
||||||
foreach(Scene currScene in proximitySceneList)
|
foreach (Scene currScene in proximitySceneList)
|
||||||
model.UpdateCMEntities(currScene);
|
model.UpdateCMEntities(currScene);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -672,7 +672,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(args[0])
|
switch (args[0])
|
||||||
{
|
{
|
||||||
case "ci":
|
case "ci":
|
||||||
case "commit":
|
case "commit":
|
||||||
|
|
|
@ -115,21 +115,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
{
|
{
|
||||||
System.Collections.ArrayList missingList = new System.Collections.ArrayList();
|
System.Collections.ArrayList missingList = new System.Collections.ArrayList();
|
||||||
SceneObjectGroup temp = null;
|
SceneObjectGroup temp = null;
|
||||||
foreach( EntityBase currObj in currList )
|
foreach (EntityBase currObj in currList)
|
||||||
{
|
{
|
||||||
if (! (currObj is SceneObjectGroup))
|
if (!(currObj is SceneObjectGroup))
|
||||||
continue;
|
continue;
|
||||||
temp = (SceneObjectGroup) currObj;
|
temp = (SceneObjectGroup) currObj;
|
||||||
|
|
||||||
if (m_CMEntityHash.ContainsKey(temp.UUID))
|
if (m_CMEntityHash.ContainsKey(temp.UUID))
|
||||||
{
|
{
|
||||||
foreach(SceneObjectPart part in temp.Children.Values)
|
foreach (SceneObjectPart part in temp.Children.Values)
|
||||||
if (!((ContentManagementEntity)m_CMEntityHash[temp.UUID]).HasChildPrim(part.UUID))
|
if (!((ContentManagementEntity)m_CMEntityHash[temp.UUID]).HasChildPrim(part.UUID))
|
||||||
missingList.Add(part);
|
missingList.Add(part);
|
||||||
}
|
}
|
||||||
else //Entire group is missing from revision. (and is a new part in region)
|
else //Entire group is missing from revision. (and is a new part in region)
|
||||||
{
|
{
|
||||||
foreach(SceneObjectPart part in temp.Children.Values)
|
foreach (SceneObjectPart part in temp.Children.Values)
|
||||||
missingList.Add(part);
|
missingList.Add(part);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.
|
//If so, then the current scene's parts that are new should be marked green.
|
||||||
missingList = m_MetaEntityCollection.CheckForMissingEntities(scene.GetEntities());
|
missingList = m_MetaEntityCollection.CheckForMissingEntities(scene.GetEntities());
|
||||||
|
|
||||||
foreach(Object missingPart in missingList)
|
foreach (Object missingPart in missingList)
|
||||||
{
|
{
|
||||||
if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID))
|
if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID))
|
||||||
continue;
|
continue;
|
||||||
|
@ -175,7 +175,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
public void RemoveOrUpdateDeletedEntity(SceneObjectGroup group)
|
public void RemoveOrUpdateDeletedEntity(SceneObjectGroup group)
|
||||||
{
|
{
|
||||||
// Deal with new parts not revisioned that have been deleted.
|
// 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))
|
if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID))
|
||||||
m_MetaEntityCollection.RemoveNewlyCreatedEntityAura(part.UUID);
|
m_MetaEntityCollection.RemoveNewlyCreatedEntityAura(part.UUID);
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
try{
|
try{
|
||||||
temp = new SceneObjectGroup(xml);
|
temp = new SceneObjectGroup(xml);
|
||||||
temp.SetScene(scene);
|
temp.SetScene(scene);
|
||||||
foreach(SceneObjectPart part in temp.Children.Values)
|
foreach (SceneObjectPart part in temp.Children.Values)
|
||||||
part.RegionHandle = scene.RegionInfo.RegionHandle;
|
part.RegionHandle = scene.RegionInfo.RegionHandle;
|
||||||
ReplacementList.Add(temp.UUID, (EntityBase)temp);
|
ReplacementList.Add(temp.UUID, (EntityBase)temp);
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
foreach(EntityBase entity in scene.GetEntities())
|
foreach (EntityBase entity in scene.GetEntities())
|
||||||
{
|
{
|
||||||
if (entity == null)
|
if (entity == null)
|
||||||
continue;
|
continue;
|
||||||
|
@ -253,7 +253,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(UUID uuid in deleteListUUIDs.Keys)
|
foreach (UUID uuid in deleteListUUIDs.Keys)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -275,7 +275,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
scene.Entities = ReplacementList;
|
scene.Entities = ReplacementList;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(EntityBase ent in ReplacementList.Values)
|
foreach (EntityBase ent in ReplacementList.Values)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -340,7 +340,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
System.Collections.ArrayList auraList = new System.Collections.ArrayList();
|
System.Collections.ArrayList auraList = new System.Collections.ArrayList();
|
||||||
if (group == null)
|
if (group == null)
|
||||||
return null;
|
return null;
|
||||||
foreach(SceneObjectPart part in group.Children.Values)
|
foreach (SceneObjectPart part in group.Children.Values)
|
||||||
{
|
{
|
||||||
if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID))
|
if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID))
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,21 +78,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
// Auras To
|
// Auras To
|
||||||
public void DisplayAuras(CMEntityCollection auraCollection)
|
public void DisplayAuras(CMEntityCollection auraCollection)
|
||||||
{
|
{
|
||||||
foreach( Object ent in auraCollection.Auras.Values)
|
foreach (Object ent in auraCollection.Auras.Values)
|
||||||
((AuraMetaEntity)ent).SendFullUpdateToAll();
|
((AuraMetaEntity)ent).SendFullUpdateToAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auras To Client
|
// Auras To Client
|
||||||
public void DisplayAuras(CMEntityCollection auraCollection, IClientAPI client)
|
public void DisplayAuras(CMEntityCollection auraCollection, IClientAPI client)
|
||||||
{
|
{
|
||||||
foreach( Object ent in auraCollection.Auras.Values)
|
foreach (Object ent in auraCollection.Auras.Values)
|
||||||
((AuraMetaEntity)ent).SendFullUpdate(client);
|
((AuraMetaEntity)ent).SendFullUpdate(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auras from List To ALL
|
// Auras from List To ALL
|
||||||
public void DisplayAuras(ArrayList list)
|
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");
|
m_log.Debug("[CONTENT MANAGEMENT] displaying new aura riiiiiiiiiiiight NOW");
|
||||||
((AuraMetaEntity)ent).SendFullUpdateToAll();
|
((AuraMetaEntity)ent).SendFullUpdateToAll();
|
||||||
|
@ -102,21 +102,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
// Entities to ALL
|
// Entities to ALL
|
||||||
public void DisplayEntities(CMEntityCollection entityCollection)
|
public void DisplayEntities(CMEntityCollection entityCollection)
|
||||||
{
|
{
|
||||||
foreach( Object ent in entityCollection.Entities.Values)
|
foreach (Object ent in entityCollection.Entities.Values)
|
||||||
((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
|
((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Entities to Client
|
// Entities to Client
|
||||||
public void DisplayEntities(CMEntityCollection entityCollection, IClientAPI client)
|
public void DisplayEntities(CMEntityCollection entityCollection, IClientAPI client)
|
||||||
{
|
{
|
||||||
foreach( Object ent in entityCollection.Entities.Values)
|
foreach (Object ent in entityCollection.Entities.Values)
|
||||||
((ContentManagementEntity)ent).SendFullDiffUpdate(client);
|
((ContentManagementEntity)ent).SendFullDiffUpdate(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Entities from List to ALL
|
// Entities from List to ALL
|
||||||
public void DisplayEntities(ArrayList list)
|
public void DisplayEntities(ArrayList list)
|
||||||
{
|
{
|
||||||
foreach( Object ent in list)
|
foreach (Object ent in list)
|
||||||
((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
|
((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,13 +158,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
|
|
||||||
public void HideAllAuras()
|
public void HideAllAuras()
|
||||||
{
|
{
|
||||||
foreach(Object obj in m_model.MetaEntityCollection.Auras.Values)
|
foreach (Object obj in m_model.MetaEntityCollection.Auras.Values)
|
||||||
((MetaEntity)obj).HideFromAll();
|
((MetaEntity)obj).HideFromAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HideAllMetaEntities()
|
public void HideAllMetaEntities()
|
||||||
{
|
{
|
||||||
foreach(Object obj in m_model.MetaEntityCollection.Entities.Values)
|
foreach (Object obj in m_model.MetaEntityCollection.Entities.Values)
|
||||||
((ContentManagementEntity)obj).HideFromAll();
|
((ContentManagementEntity)obj).HideFromAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
((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.
|
// 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_model.MetaEntityCollection.Auras.ContainsKey(part.UUID))
|
if (m_model.MetaEntityCollection.Auras.ContainsKey(part.UUID))
|
||||||
((AuraMetaEntity)m_model.MetaEntityCollection.Auras[part.UUID]).HideFromAll();
|
((AuraMetaEntity)m_model.MetaEntityCollection.Auras[part.UUID]).HideFromAll();
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,11 +104,11 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
#region Private Methods
|
#region Private Methods
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
private bool ContainsKey(List<EntityBase> list, UUID uuid)
|
private bool ContainsKey(List<EntityBase> list, UUID uuid)
|
||||||
{
|
{
|
||||||
foreach( EntityBase part in list)
|
foreach (EntityBase part in list)
|
||||||
if (part.UUID == uuid)
|
if (part.UUID == uuid)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
|
@ -138,12 +138,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
System.Collections.Generic.List<EntityBase> sceneEntityList = m_Entity.Scene.GetEntities();
|
System.Collections.Generic.List<EntityBase> sceneEntityList = m_Entity.Scene.GetEntities();
|
||||||
DiffersFromSceneGroup = false;
|
DiffersFromSceneGroup = false;
|
||||||
// if group is not contained in scene's list
|
// 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)
|
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 scene list no longer contains this part, display translucent part and mark with red aura
|
||||||
if(! ContainsKey(sceneEntityList, part.UUID))
|
if (!ContainsKey(sceneEntityList, part.UUID))
|
||||||
{
|
{
|
||||||
// if already displaying a red aura over part, make sure its red
|
// if already displaying a red aura over part, make sure its red
|
||||||
if (m_AuraEntities.ContainsKey(part.UUID))
|
if (m_AuraEntities.ContainsKey(part.UUID))
|
||||||
|
@ -199,8 +199,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HasChildPrim(uint localID)
|
public bool HasChildPrim(uint localID)
|
||||||
{
|
{
|
||||||
foreach( SceneObjectPart part in m_UnchangedEntity.Children.Values)
|
foreach (SceneObjectPart part in m_UnchangedEntity.Children.Values)
|
||||||
if ( part.LocalId == localID )
|
if (part.LocalId == localID)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -208,18 +208,18 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
public override void Hide(IClientAPI client)
|
public override void Hide(IClientAPI client)
|
||||||
{
|
{
|
||||||
base.Hide(client);
|
base.Hide(client);
|
||||||
foreach(MetaEntity group in m_AuraEntities.Values)
|
foreach (MetaEntity group in m_AuraEntities.Values)
|
||||||
group.Hide(client);
|
group.Hide(client);
|
||||||
foreach(MetaEntity group in m_BeamEntities.Values)
|
foreach (MetaEntity group in m_BeamEntities.Values)
|
||||||
group.Hide(client);
|
group.Hide(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void HideFromAll()
|
public override void HideFromAll()
|
||||||
{
|
{
|
||||||
base.HideFromAll();
|
base.HideFromAll();
|
||||||
foreach(MetaEntity group in m_AuraEntities.Values)
|
foreach (MetaEntity group in m_AuraEntities.Values)
|
||||||
group.HideFromAll();
|
group.HideFromAll();
|
||||||
foreach(MetaEntity group in m_BeamEntities.Values)
|
foreach (MetaEntity group in m_BeamEntities.Values)
|
||||||
group.HideFromAll();
|
group.HideFromAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
// Use "UnchangedEntity" to do comparisons because its text, transparency, and other attributes will be just as the user
|
// Use "UnchangedEntity" to do comparisons because its text, transparency, and other attributes will be just as the user
|
||||||
// had originally saved.
|
// had originally saved.
|
||||||
// m_Entity will NOT necessarily be the same entity as the user had 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.
|
//This is the part that we use to show changes.
|
||||||
metaEntityPart = m_Entity.GetLinkNumPart(UnchangedPart.LinkNum);
|
metaEntityPart = m_Entity.GetLinkNumPart(UnchangedPart.LinkNum);
|
||||||
|
@ -328,7 +328,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
{
|
{
|
||||||
if (DiffersFromSceneGroup)
|
if (DiffersFromSceneGroup)
|
||||||
{
|
{
|
||||||
foreach(AuraMetaEntity group in m_AuraEntities.Values)
|
foreach (AuraMetaEntity group in m_AuraEntities.Values)
|
||||||
group.SendFullUpdate(client);
|
group.SendFullUpdate(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
{
|
{
|
||||||
if (DiffersFromSceneGroup)
|
if (DiffersFromSceneGroup)
|
||||||
{
|
{
|
||||||
foreach(AuraMetaEntity group in m_AuraEntities.Values)
|
foreach (AuraMetaEntity group in m_AuraEntities.Values)
|
||||||
group.SendFullUpdateToAll();
|
group.SendFullUpdateToAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -346,7 +346,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
{
|
{
|
||||||
if (DiffersFromSceneGroup)
|
if (DiffersFromSceneGroup)
|
||||||
{
|
{
|
||||||
foreach(BeamMetaEntity group in m_BeamEntities.Values)
|
foreach (BeamMetaEntity group in m_BeamEntities.Values)
|
||||||
group.SendFullUpdate(client);
|
group.SendFullUpdate(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -355,7 +355,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
{
|
{
|
||||||
if (DiffersFromSceneGroup)
|
if (DiffersFromSceneGroup)
|
||||||
{
|
{
|
||||||
foreach(BeamMetaEntity group in m_BeamEntities.Values)
|
foreach (BeamMetaEntity group in m_BeamEntities.Values)
|
||||||
group.SendFullUpdateToAll();
|
group.SendFullUpdateToAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,7 +122,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lock(this)
|
lock (this)
|
||||||
{
|
{
|
||||||
if (!initialised) //only init once
|
if (!initialised) //only init once
|
||||||
{
|
{
|
||||||
|
@ -148,7 +148,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
if (! m_enabled)
|
if (! m_enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
lock(this)
|
lock (this)
|
||||||
{
|
{
|
||||||
if (!m_posted) //only post once
|
if (!m_posted) //only post once
|
||||||
{
|
{
|
||||||
|
|
|
@ -102,11 +102,15 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
private void SetupSerialiser()
|
private void SetupSerialiser()
|
||||||
{
|
{
|
||||||
if (m_serialiser.Count == 0)
|
if (m_serialiser.Count == 0)
|
||||||
foreach(UUID region in m_scenes.Keys)
|
{
|
||||||
|
foreach (UUID region in m_scenes.Keys)
|
||||||
|
{
|
||||||
m_serialiser.Add(region,
|
m_serialiser.Add(region,
|
||||||
m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
|
m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion Private Methods
|
#endregion Private Methods
|
||||||
|
|
||||||
|
@ -151,7 +155,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
//int primCount = 0;
|
//int primCount = 0;
|
||||||
//SceneObjectGroup obj = null;
|
//SceneObjectGroup obj = null;
|
||||||
|
|
||||||
if(File.Exists(filename))
|
if (File.Exists(filename))
|
||||||
{
|
{
|
||||||
XmlTextReader reader = new XmlTextReader(filename);
|
XmlTextReader reader = new XmlTextReader(filename);
|
||||||
reader.WhitespaceHandling = WhitespaceHandling.None;
|
reader.WhitespaceHandling = WhitespaceHandling.None;
|
||||||
|
@ -177,9 +181,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
XmlDocument doc = new XmlDocument();
|
XmlDocument doc = new XmlDocument();
|
||||||
XmlNode rootNode;
|
XmlNode rootNode;
|
||||||
|
|
||||||
|
|
||||||
m_log.Info("[FSDB]: Checking if " + filename + " exists.");
|
m_log.Info("[FSDB]: Checking if " + filename + " exists.");
|
||||||
if(File.Exists(filename))
|
if (File.Exists(filename))
|
||||||
{
|
{
|
||||||
Stopwatch x = new Stopwatch();
|
Stopwatch x = new Stopwatch();
|
||||||
x.Start();
|
x.Start();
|
||||||
|
@ -191,7 +194,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
rootNode = doc.FirstChild;
|
rootNode = doc.FirstChild;
|
||||||
|
|
||||||
foreach (XmlNode aPrimNode in rootNode.ChildNodes)
|
foreach (XmlNode aPrimNode in rootNode.ChildNodes)
|
||||||
|
{
|
||||||
xmlList.Add(aPrimNode.OuterXml);
|
xmlList.Add(aPrimNode.OuterXml);
|
||||||
|
}
|
||||||
|
|
||||||
x.Stop();
|
x.Stop();
|
||||||
TimeToDownload += x.ElapsedMilliseconds;
|
TimeToDownload += x.ElapsedMilliseconds;
|
||||||
|
@ -204,12 +209,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
|
|
||||||
public void Initialise(Scene scene, string dir)
|
public void Initialise(Scene scene, string dir)
|
||||||
{
|
{
|
||||||
lock(this)
|
lock (this)
|
||||||
{
|
{
|
||||||
if (m_repodir == null)
|
if (m_repodir == null)
|
||||||
m_repodir = dir;
|
m_repodir = dir;
|
||||||
}
|
}
|
||||||
lock(m_scenes)
|
lock (m_scenes)
|
||||||
m_scenes.Add(scene.RegionInfo.RegionID, scene);
|
m_scenes.Add(scene.RegionInfo.RegionID, scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,9 +229,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
StreamReader sr = null;
|
StreamReader sr = null;
|
||||||
String logMessage = "";
|
String logMessage = "";
|
||||||
String logLocation = "";
|
String logLocation = "";
|
||||||
foreach(string revisionDir in directories)
|
foreach (string revisionDir in directories)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
try {
|
|
||||||
logLocation = revisionDir + Slash.DirectorySeparatorChar + "log";
|
logLocation = revisionDir + Slash.DirectorySeparatorChar + "log";
|
||||||
fs = new FileStream( logLocation, FileMode.Open);
|
fs = new FileStream( logLocation, FileMode.Open);
|
||||||
sr = new StreamReader(fs);
|
sr = new StreamReader(fs);
|
||||||
|
@ -236,7 +242,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
revisionDict.Add(revisionDir, logMessage);
|
revisionDict.Add(revisionDir, logMessage);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return revisionDict;
|
return revisionDict;
|
||||||
|
|
|
@ -160,7 +160,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
{
|
{
|
||||||
//make new uuids
|
//make new uuids
|
||||||
Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>();
|
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);
|
part.ResetIDs(part.LinkNum);
|
||||||
parts.Add(part.UUID, part);
|
parts.Add(part.UUID, part);
|
||||||
|
@ -188,7 +188,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
//This deletes the group without removing from any databases.
|
//This deletes the group without removing from any databases.
|
||||||
//This is important because we are not IN any database.
|
//This is important because we are not IN any database.
|
||||||
//m_Entity.FakeDeleteGroup();
|
//m_Entity.FakeDeleteGroup();
|
||||||
foreach( SceneObjectPart part in m_Entity.Children.Values)
|
foreach (SceneObjectPart part in m_Entity.Children.Values)
|
||||||
client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId);
|
client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void HideFromAll()
|
public virtual void HideFromAll()
|
||||||
{
|
{
|
||||||
foreach( SceneObjectPart part in m_Entity.Children.Values)
|
foreach (SceneObjectPart part in m_Entity.Children.Values)
|
||||||
m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller)
|
m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller)
|
||||||
{ controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); }
|
{ controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); }
|
||||||
);
|
);
|
||||||
|
|
|
@ -106,7 +106,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
|
|
||||||
private static bool AreVectorsEquivalent(Vector3 first, Vector3 second)
|
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.Y, 2) == TruncateSignificant(second.Y, 2)
|
||||||
&& TruncateSignificant(first.Z, 2) == TruncateSignificant(second.Z, 2)
|
&& TruncateSignificant(first.Z, 2) == TruncateSignificant(second.Z, 2)
|
||||||
)
|
)
|
||||||
|
@ -164,46 +164,46 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
Diff result = 0;
|
Diff result = 0;
|
||||||
|
|
||||||
// VECTOR COMPARISONS
|
// VECTOR COMPARISONS
|
||||||
if(! AreVectorsEquivalent(first.Acceleration, second.Acceleration))
|
if (!AreVectorsEquivalent(first.Acceleration, second.Acceleration))
|
||||||
result |= Diff.ACCELERATION;
|
result |= Diff.ACCELERATION;
|
||||||
if(! AreVectorsEquivalent(first.AbsolutePosition, second.AbsolutePosition))
|
if (!AreVectorsEquivalent(first.AbsolutePosition, second.AbsolutePosition))
|
||||||
result |= Diff.POSITION;
|
result |= Diff.POSITION;
|
||||||
if(! AreVectorsEquivalent(first.AngularVelocity, second.AngularVelocity))
|
if (!AreVectorsEquivalent(first.AngularVelocity, second.AngularVelocity))
|
||||||
result |= Diff.ANGULARVELOCITY;
|
result |= Diff.ANGULARVELOCITY;
|
||||||
if(! AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition))
|
if (!AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition))
|
||||||
result |= Diff.OFFSETPOSITION;
|
result |= Diff.OFFSETPOSITION;
|
||||||
if(! AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity))
|
if (!AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity))
|
||||||
result |= Diff.ROTATIONALVELOCITY;
|
result |= Diff.ROTATIONALVELOCITY;
|
||||||
if(! AreVectorsEquivalent(first.Scale, second.Scale))
|
if (!AreVectorsEquivalent(first.Scale, second.Scale))
|
||||||
result |= Diff.SCALE;
|
result |= Diff.SCALE;
|
||||||
if(! AreVectorsEquivalent(first.Velocity, second.Velocity))
|
if (!AreVectorsEquivalent(first.Velocity, second.Velocity))
|
||||||
result |= Diff.VELOCITY;
|
result |= Diff.VELOCITY;
|
||||||
|
|
||||||
|
|
||||||
// QUATERNION COMPARISONS
|
// QUATERNION COMPARISONS
|
||||||
if(! AreQuaternionsEquivalent(first.RotationOffset, second.RotationOffset))
|
if (!AreQuaternionsEquivalent(first.RotationOffset, second.RotationOffset))
|
||||||
result |= Diff.ROTATIONOFFSET;
|
result |= Diff.ROTATIONOFFSET;
|
||||||
|
|
||||||
|
|
||||||
// MISC COMPARISONS (UUID, Byte)
|
// MISC COMPARISONS (UUID, Byte)
|
||||||
if(first.ClickAction != second.ClickAction)
|
if (first.ClickAction != second.ClickAction)
|
||||||
result |= Diff.CLICKACTION;
|
result |= Diff.CLICKACTION;
|
||||||
if(first.ObjectOwner != second.ObjectOwner)
|
if (first.ObjectOwner != second.ObjectOwner)
|
||||||
result |= Diff.OBJECTOWNER;
|
result |= Diff.OBJECTOWNER;
|
||||||
|
|
||||||
|
|
||||||
// STRING COMPARISONS
|
// STRING COMPARISONS
|
||||||
if(first.Description != second.Description)
|
if (first.Description != second.Description)
|
||||||
result |= Diff.DESCRIPTION;
|
result |= Diff.DESCRIPTION;
|
||||||
if(first.Material != second.Material)
|
if (first.Material != second.Material)
|
||||||
result |= Diff.MATERIAL;
|
result |= Diff.MATERIAL;
|
||||||
if(first.Name != second.Name)
|
if (first.Name != second.Name)
|
||||||
result |= Diff.NAME;
|
result |= Diff.NAME;
|
||||||
if(first.SitName != second.SitName)
|
if (first.SitName != second.SitName)
|
||||||
result |= Diff.SITNAME;
|
result |= Diff.SITNAME;
|
||||||
if(first.Text != second.Text)
|
if (first.Text != second.Text)
|
||||||
result |= Diff.TEXT;
|
result |= Diff.TEXT;
|
||||||
if(first.TouchName != second.TouchName)
|
if (first.TouchName != second.TouchName)
|
||||||
result |= Diff.TOUCHNAME;
|
result |= Diff.TOUCHNAME;
|
||||||
|
|
||||||
x.Stop();
|
x.Stop();
|
||||||
|
|
|
@ -121,7 +121,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
||||||
|
|
||||||
public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID texture)
|
public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID texture)
|
||||||
{
|
{
|
||||||
if(texture == UUID.Zero)
|
if (texture == UUID.Zero)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (corner)
|
switch (corner)
|
||||||
|
|
|
@ -7546,7 +7546,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
|
|
||||||
// the object we are in
|
// the object we are in
|
||||||
UUID objectID = m_host.ParentUUID;
|
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
|
// we need the permission first, to know which avatar we want to set the camera for
|
||||||
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
|
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
|
||||||
|
@ -7597,7 +7597,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
|
|
||||||
// the object we are in
|
// the object we are in
|
||||||
UUID objectID = m_host.ParentUUID;
|
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
|
// we need the permission first, to know which avatar we want to clear the camera for
|
||||||
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
|
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
|
||||||
|
|
|
@ -7418,7 +7418,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
// the object we are in
|
// the object we are in
|
||||||
UUID objectID = m_host.ParentUUID;
|
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
|
// we need the permission first, to know which avatar we want to set the camera for
|
||||||
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
|
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
|
||||||
|
@ -7469,7 +7469,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
// the object we are in
|
// the object we are in
|
||||||
UUID objectID = m_host.ParentUUID;
|
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
|
// we need the permission first, to know which avatar we want to clear the camera for
|
||||||
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
|
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 we're currently in an event, just tell it to save upon return
|
||||||
//
|
//
|
||||||
if(m_InEvent)
|
if (m_InEvent)
|
||||||
{
|
{
|
||||||
m_SaveState = true;
|
m_SaveState = true;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue