Merge branch 'careminster-presence-refactor' of www.3dhosting.de:/var/git/careminster into careminster-presence-refactor
commit
6e7f1a3ac1
|
@ -95,6 +95,7 @@ what it is today.
|
||||||
* Mic Bowman
|
* Mic Bowman
|
||||||
* Michelle Argus
|
* Michelle Argus
|
||||||
* Michael Cortez (The Flotsam Project, http://osflotsam.org/)
|
* Michael Cortez (The Flotsam Project, http://osflotsam.org/)
|
||||||
|
* Micheil Merlin
|
||||||
* Mike Osias (IBM)
|
* Mike Osias (IBM)
|
||||||
* Mike Pitman (IBM)
|
* Mike Pitman (IBM)
|
||||||
* mikkopa/_someone - RealXtend
|
* mikkopa/_someone - RealXtend
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace OpenSim.Data
|
||||||
{
|
{
|
||||||
public abstract AssetBase GetAsset(UUID uuid);
|
public abstract AssetBase GetAsset(UUID uuid);
|
||||||
|
|
||||||
public abstract void StoreAsset(AssetBase asset);
|
public abstract bool StoreAsset(AssetBase asset);
|
||||||
public abstract bool ExistsAsset(UUID uuid);
|
public abstract bool ExistsAsset(UUID uuid);
|
||||||
|
|
||||||
public abstract List<AssetMetadata> FetchAssetMetadataSet(int start, int count);
|
public abstract List<AssetMetadata> FetchAssetMetadataSet(int start, int count);
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace OpenSim.Data
|
||||||
public interface IAssetDataPlugin : IPlugin
|
public interface IAssetDataPlugin : IPlugin
|
||||||
{
|
{
|
||||||
AssetBase GetAsset(UUID uuid);
|
AssetBase GetAsset(UUID uuid);
|
||||||
void StoreAsset(AssetBase asset);
|
bool StoreAsset(AssetBase asset);
|
||||||
bool ExistsAsset(UUID uuid);
|
bool ExistsAsset(UUID uuid);
|
||||||
List<AssetMetadata> FetchAssetMetadataSet(int start, int count);
|
List<AssetMetadata> FetchAssetMetadataSet(int start, int count);
|
||||||
void Initialise(string connect);
|
void Initialise(string connect);
|
||||||
|
|
|
@ -143,7 +143,7 @@ namespace OpenSim.Data.MSSQL
|
||||||
/// Create asset in m_database
|
/// Create asset in m_database
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="asset">the asset</param>
|
/// <param name="asset">the asset</param>
|
||||||
override public void StoreAsset(AssetBase asset)
|
override public bool StoreAsset(AssetBase asset)
|
||||||
{
|
{
|
||||||
|
|
||||||
string sql =
|
string sql =
|
||||||
|
@ -192,10 +192,12 @@ namespace OpenSim.Data.MSSQL
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
m_log.Error("[ASSET DB]: Error storing item :" + e.Message);
|
m_log.Error("[ASSET DB]: Error storing item :" + e.Message);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,6 @@ namespace OpenSim.Data
|
||||||
/// really want is the assembly of your database class.
|
/// really want is the assembly of your database class.
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public class Migration
|
public class Migration
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
@ -173,8 +172,6 @@ namespace OpenSim.Data
|
||||||
ExecuteScript(_conn, script);
|
ExecuteScript(_conn, script);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void Update()
|
public void Update()
|
||||||
{
|
{
|
||||||
InitMigrationsTable();
|
InitMigrationsTable();
|
||||||
|
@ -186,8 +183,8 @@ namespace OpenSim.Data
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// to prevent people from killing long migrations.
|
// to prevent people from killing long migrations.
|
||||||
m_log.InfoFormat("[MIGRATIONS] Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]);
|
m_log.InfoFormat("[MIGRATIONS]: Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]);
|
||||||
m_log.Info("[MIGRATIONS] NOTE: this may take a while, don't interupt this process!");
|
m_log.Info("[MIGRATIONS]: NOTE - this may take a while, don't interrupt this process!");
|
||||||
|
|
||||||
foreach (KeyValuePair<int, string[]> kvp in migrations)
|
foreach (KeyValuePair<int, string[]> kvp in migrations)
|
||||||
{
|
{
|
||||||
|
@ -206,7 +203,7 @@ namespace OpenSim.Data
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", e.Message.Replace("\n", " "));
|
m_log.DebugFormat("[MIGRATIONS]: Cmd was {0}", e.Message.Replace("\n", " "));
|
||||||
m_log.Debug("[MIGRATIONS]: An error has occurred in the migration. This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.");
|
m_log.Debug("[MIGRATIONS]: An error has occurred in the migration. This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.");
|
||||||
ExecuteScript("ROLLBACK;");
|
ExecuteScript("ROLLBACK;");
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,7 @@ namespace OpenSim.Data.MySQL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="asset">Asset UUID to create</param>
|
/// <param name="asset">Asset UUID to create</param>
|
||||||
/// <remarks>On failure : Throw an exception and attempt to reconnect to database</remarks>
|
/// <remarks>On failure : Throw an exception and attempt to reconnect to database</remarks>
|
||||||
override public void StoreAsset(AssetBase asset)
|
override public bool StoreAsset(AssetBase asset)
|
||||||
{
|
{
|
||||||
lock (m_dbLock)
|
lock (m_dbLock)
|
||||||
{
|
{
|
||||||
|
@ -201,12 +201,14 @@ namespace OpenSim.Data.MySQL
|
||||||
cmd.Parameters.AddWithValue("?data", asset.Data);
|
cmd.Parameters.AddWithValue("?data", asset.Data);
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
cmd.Dispose();
|
cmd.Dispose();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[ASSET DB]: MySQL failure creating asset {0} with name \"{1}\". Error: {2}",
|
m_log.ErrorFormat("[ASSET DB]: MySQL failure creating asset {0} with name \"{1}\". Error: {2}",
|
||||||
asset.FullID, asset.Name, e.Message);
|
asset.FullID, asset.Name, e.Message);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,11 +64,19 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
public bool StoreFolder(XInventoryFolder folder)
|
public bool StoreFolder(XInventoryFolder folder)
|
||||||
{
|
{
|
||||||
|
if (folder.folderName.Length > 64)
|
||||||
|
folder.folderName = folder.folderName.Substring(0, 64);
|
||||||
|
|
||||||
return m_Folders.Store(folder);
|
return m_Folders.Store(folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool StoreItem(XInventoryItem item)
|
public bool StoreItem(XInventoryItem item)
|
||||||
{
|
{
|
||||||
|
if (item.inventoryName.Length > 64)
|
||||||
|
item.inventoryName = item.inventoryName.Substring(0, 64);
|
||||||
|
if (item.inventoryDescription.Length > 128)
|
||||||
|
item.inventoryDescription = item.inventoryDescription.Substring(0, 128);
|
||||||
|
|
||||||
return m_Items.Store(item);
|
return m_Items.Store(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ namespace OpenSim.Data.SQLite
|
||||||
/// Create an asset
|
/// Create an asset
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="asset">Asset Base</param>
|
/// <param name="asset">Asset Base</param>
|
||||||
override public void StoreAsset(AssetBase asset)
|
override public bool StoreAsset(AssetBase asset)
|
||||||
{
|
{
|
||||||
//m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());
|
//m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());
|
||||||
if (ExistsAsset(asset.FullID))
|
if (ExistsAsset(asset.FullID))
|
||||||
|
@ -141,6 +141,7 @@ namespace OpenSim.Data.SQLite
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
|
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
|
||||||
|
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,6 +162,7 @@ namespace OpenSim.Data.SQLite
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
|
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
|
||||||
|
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,11 +66,19 @@ namespace OpenSim.Data.SQLite
|
||||||
|
|
||||||
public bool StoreFolder(XInventoryFolder folder)
|
public bool StoreFolder(XInventoryFolder folder)
|
||||||
{
|
{
|
||||||
|
if (folder.folderName.Length > 64)
|
||||||
|
folder.folderName = folder.folderName.Substring(0, 64);
|
||||||
|
|
||||||
return m_Folders.Store(folder);
|
return m_Folders.Store(folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool StoreItem(XInventoryItem item)
|
public bool StoreItem(XInventoryItem item)
|
||||||
{
|
{
|
||||||
|
if (item.inventoryName.Length > 64)
|
||||||
|
item.inventoryName = item.inventoryName.Substring(0, 64);
|
||||||
|
if (item.inventoryDescription.Length > 128)
|
||||||
|
item.inventoryDescription = item.inventoryDescription.Substring(0, 128);
|
||||||
|
|
||||||
return m_Items.Store(item);
|
return m_Items.Store(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ namespace OpenSim.Data.SQLiteLegacy
|
||||||
/// Create an asset
|
/// Create an asset
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="asset">Asset Base</param>
|
/// <param name="asset">Asset Base</param>
|
||||||
override public void StoreAsset(AssetBase asset)
|
override public bool StoreAsset(AssetBase asset)
|
||||||
{
|
{
|
||||||
//m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());
|
//m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());
|
||||||
if (ExistsAsset(asset.FullID))
|
if (ExistsAsset(asset.FullID))
|
||||||
|
@ -139,6 +139,7 @@ namespace OpenSim.Data.SQLiteLegacy
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
|
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
|
||||||
|
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,6 +158,7 @@ namespace OpenSim.Data.SQLiteLegacy
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
|
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
|
||||||
|
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,8 @@ namespace OpenSim.Framework
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private AssetMetadata m_metadata;
|
private AssetMetadata m_metadata;
|
||||||
|
|
||||||
|
private int m_uploadAttempts;
|
||||||
|
|
||||||
// This is needed for .NET serialization!!!
|
// This is needed for .NET serialization!!!
|
||||||
// Do NOT "Optimize" away!
|
// Do NOT "Optimize" away!
|
||||||
public AssetBase()
|
public AssetBase()
|
||||||
|
@ -197,6 +199,12 @@ namespace OpenSim.Framework
|
||||||
set { m_metadata.Type = value; }
|
set { m_metadata.Type = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int UploadAttempts
|
||||||
|
{
|
||||||
|
get { return m_uploadAttempts; }
|
||||||
|
set { m_uploadAttempts = value; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Is this a region only asset, or does this exist on the asset server also
|
/// Is this a region only asset, or does this exist on the asset server also
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -814,7 +814,7 @@ namespace OpenSim.Framework.Capabilities
|
||||||
|
|
||||||
if (mm != null)
|
if (mm != null)
|
||||||
{
|
{
|
||||||
if (!mm.UploadCovered(client))
|
if (!mm.UploadCovered(client, mm.UploadCharge))
|
||||||
{
|
{
|
||||||
if (client != null)
|
if (client != null)
|
||||||
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
||||||
|
|
|
@ -35,35 +35,15 @@ namespace OpenSim.Framework
|
||||||
bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID,
|
bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID,
|
||||||
int amount);
|
int amount);
|
||||||
|
|
||||||
int GetBalance(IClientAPI client);
|
int GetBalance(UUID agentID);
|
||||||
void ApplyUploadCharge(UUID agentID);
|
bool UploadCovered(IClientAPI client, int amount);
|
||||||
bool UploadCovered(IClientAPI client);
|
|
||||||
void ApplyGroupCreationCharge(UUID agentID);
|
|
||||||
bool GroupCreationCovered(IClientAPI client);
|
|
||||||
bool AmountCovered(IClientAPI client, int amount);
|
bool AmountCovered(IClientAPI client, int amount);
|
||||||
void ApplyCharge(UUID agentID, int amount, string text);
|
void ApplyCharge(UUID agentID, int amount, string text);
|
||||||
|
void ApplyUploadCharge(UUID agentID, int amount, string text);
|
||||||
|
|
||||||
EconomyData GetEconomyData();
|
int UploadCharge { get; }
|
||||||
|
int GroupCreationCharge { get; }
|
||||||
|
|
||||||
event ObjectPaid OnObjectPaid;
|
event ObjectPaid OnObjectPaid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct EconomyData
|
|
||||||
{
|
|
||||||
public int ObjectCapacity;
|
|
||||||
public int ObjectCount;
|
|
||||||
public int PriceEnergyUnit;
|
|
||||||
public int PriceGroupCreate;
|
|
||||||
public int PriceObjectClaim;
|
|
||||||
public float PriceObjectRent;
|
|
||||||
public float PriceObjectScaleFactor;
|
|
||||||
public int PriceParcelClaim;
|
|
||||||
public float PriceParcelClaimFactor;
|
|
||||||
public int PriceParcelRent;
|
|
||||||
public int PricePublicObjectDecay;
|
|
||||||
public int PricePublicObjectDelete;
|
|
||||||
public int PriceRentLight;
|
|
||||||
public int PriceUpload;
|
|
||||||
public int TeleportMinPrice;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public enum ParcelMediaCommandEnum
|
public enum ParcelMediaCommandEnum : int
|
||||||
{
|
{
|
||||||
Stop = 0,
|
Stop = 0,
|
||||||
Pause = 1,
|
Pause = 1,
|
||||||
|
|
|
@ -1196,7 +1196,7 @@ namespace OpenSim.Framework
|
||||||
prim.Textures = this.Textures;
|
prim.Textures = this.Textures;
|
||||||
|
|
||||||
prim.Properties = new Primitive.ObjectProperties();
|
prim.Properties = new Primitive.ObjectProperties();
|
||||||
prim.Properties.Name = "Primitive";
|
prim.Properties.Name = "Object";
|
||||||
prim.Properties.Description = "";
|
prim.Properties.Description = "";
|
||||||
prim.Properties.CreatorID = UUID.Zero;
|
prim.Properties.CreatorID = UUID.Zero;
|
||||||
prim.Properties.GroupID = UUID.Zero;
|
prim.Properties.GroupID = UUID.Zero;
|
||||||
|
|
|
@ -40,6 +40,7 @@ using OpenSim.Framework.Console;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
|
[Serializable]
|
||||||
public class RegionLightShareData : ICloneable
|
public class RegionLightShareData : ICloneable
|
||||||
{
|
{
|
||||||
public UUID regionID = UUID.Zero;
|
public UUID regionID = UUID.Zero;
|
||||||
|
|
|
@ -56,12 +56,28 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
/// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting
|
/// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting
|
||||||
/// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
|
/// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
|
||||||
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
|
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
|
||||||
|
{
|
||||||
|
return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, 100);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Perform a synchronous REST request.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="verb"></param>
|
||||||
|
/// <param name="requestUrl"></param>
|
||||||
|
/// <param name="obj"> </param>
|
||||||
|
/// <param name="timeout"> </param>
|
||||||
|
/// <returns></returns>
|
||||||
|
///
|
||||||
|
/// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting
|
||||||
|
/// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
|
||||||
|
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout)
|
||||||
{
|
{
|
||||||
Type type = typeof (TRequest);
|
Type type = typeof (TRequest);
|
||||||
TResponse deserial = default(TResponse);
|
TResponse deserial = default(TResponse);
|
||||||
|
|
||||||
WebRequest request = WebRequest.Create(requestUrl);
|
WebRequest request = WebRequest.Create(requestUrl);
|
||||||
request.Method = verb;
|
request.Method = verb;
|
||||||
|
request.Timeout = pTimeout * 1000;
|
||||||
|
|
||||||
if ((verb == "POST") || (verb == "PUT"))
|
if ((verb == "POST") || (verb == "PUT"))
|
||||||
{
|
{
|
||||||
|
@ -81,7 +97,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
|
|
||||||
int length = (int) buffer.Length;
|
int length = (int) buffer.Length;
|
||||||
request.ContentLength = length;
|
request.ContentLength = length;
|
||||||
|
|
||||||
Stream requestStream = null;
|
Stream requestStream = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
|
@ -36,33 +37,30 @@ namespace OpenSim.Framework
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class UndoStack<T>
|
public class UndoStack<T>
|
||||||
{
|
{
|
||||||
private int m_new = 1;
|
private List<T> m_undolist;
|
||||||
private int m_old = 0;
|
private int m_max;
|
||||||
private T[] m_Undos;
|
|
||||||
|
|
||||||
public UndoStack(int capacity)
|
public UndoStack(int capacity)
|
||||||
{
|
{
|
||||||
m_Undos = new T[capacity + 1];
|
m_undolist = new List<T>();
|
||||||
|
m_max = capacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsFull
|
public bool IsFull
|
||||||
{
|
{
|
||||||
get { return m_new == m_old; }
|
get { return m_undolist.Count >= m_max; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Capacity
|
public int Capacity
|
||||||
{
|
{
|
||||||
get { return m_Undos.Length - 1; }
|
get { return m_max; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Count
|
public int Count
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
int count = m_new - m_old - 1;
|
return m_undolist.Count;
|
||||||
if (count < 0)
|
|
||||||
count += m_Undos.Length;
|
|
||||||
return count;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,45 +68,39 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
if (IsFull)
|
if (IsFull)
|
||||||
{
|
{
|
||||||
m_old++;
|
m_undolist.RemoveAt(0);
|
||||||
if (m_old >= m_Undos.Length)
|
|
||||||
m_old -= m_Undos.Length;
|
|
||||||
}
|
}
|
||||||
if (++m_new >= m_Undos.Length)
|
m_undolist.Add(item);
|
||||||
m_new -= m_Undos.Length;
|
|
||||||
m_Undos[m_new] = item;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public T Pop()
|
public T Pop()
|
||||||
{
|
{
|
||||||
if (Count > 0)
|
if (m_undolist.Count > 0)
|
||||||
{
|
{
|
||||||
T deleted = m_Undos[m_new];
|
int ind = m_undolist.Count - 1;
|
||||||
m_Undos[m_new--] = default(T);
|
T item = m_undolist[ind];
|
||||||
if (m_new < 0)
|
m_undolist.RemoveAt(ind);
|
||||||
m_new += m_Undos.Length;
|
return item;
|
||||||
return deleted;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new InvalidOperationException("Cannot pop from emtpy stack");
|
throw new InvalidOperationException("Cannot pop from empty stack");
|
||||||
}
|
}
|
||||||
|
|
||||||
public T Peek()
|
public T Peek()
|
||||||
{
|
{
|
||||||
return m_Undos[m_new];
|
if (m_undolist.Count > 0)
|
||||||
|
{
|
||||||
|
return m_undolist[m_undolist.Count - 1];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return default(T);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Clear()
|
public void Clear()
|
||||||
{
|
{
|
||||||
if (Count > 0)
|
m_undolist.Clear();
|
||||||
{
|
|
||||||
for (int i = 0; i < m_Undos.Length; i++)
|
|
||||||
{
|
|
||||||
m_Undos[i] = default(T);
|
|
||||||
}
|
|
||||||
m_new = 1;
|
|
||||||
m_old = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2208,6 +2208,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
OutPacket(sound, ThrottleOutPacketType.Task);
|
OutPacket(sound, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendTransferAbort(TransferRequestPacket transferRequest)
|
||||||
|
{
|
||||||
|
TransferAbortPacket abort = (TransferAbortPacket)PacketPool.Instance.GetPacket(PacketType.TransferAbort);
|
||||||
|
abort.TransferInfo.TransferID = transferRequest.TransferInfo.TransferID;
|
||||||
|
abort.TransferInfo.ChannelType = transferRequest.TransferInfo.ChannelType;
|
||||||
|
m_log.Debug("[Assets] Aborting transfer; asset request failed");
|
||||||
|
OutPacket(abort, ThrottleOutPacketType.Task);
|
||||||
|
}
|
||||||
|
|
||||||
public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
|
public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
|
||||||
{
|
{
|
||||||
SoundTriggerPacket sound = (SoundTriggerPacket)PacketPool.Instance.GetPacket(PacketType.SoundTrigger);
|
SoundTriggerPacket sound = (SoundTriggerPacket)PacketPool.Instance.GetPacket(PacketType.SoundTrigger);
|
||||||
|
@ -6307,8 +6316,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (handlerObjectDuplicate != null)
|
if (handlerObjectDuplicate != null)
|
||||||
{
|
{
|
||||||
handlerObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset,
|
handlerObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset,
|
||||||
dupe.SharedData.DuplicateFlags, AgentandGroupData.AgentID,
|
dupe.SharedData.DuplicateFlags, AgentId,
|
||||||
AgentandGroupData.GroupID);
|
m_activeGroupID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6898,7 +6907,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (handlerObjectDuplicateOnRay != null)
|
if (handlerObjectDuplicateOnRay != null)
|
||||||
{
|
{
|
||||||
handlerObjectDuplicateOnRay(dupeOnRay.ObjectData[i].ObjectLocalID, dupeOnRay.AgentData.DuplicateFlags,
|
handlerObjectDuplicateOnRay(dupeOnRay.ObjectData[i].ObjectLocalID, dupeOnRay.AgentData.DuplicateFlags,
|
||||||
dupeOnRay.AgentData.AgentID, dupeOnRay.AgentData.GroupID, dupeOnRay.AgentData.RayTargetID, dupeOnRay.AgentData.RayEnd,
|
AgentId, m_activeGroupID, dupeOnRay.AgentData.RayTargetID, dupeOnRay.AgentData.RayEnd,
|
||||||
dupeOnRay.AgentData.RayStart, dupeOnRay.AgentData.BypassRaycast, dupeOnRay.AgentData.RayEndIsIntersection,
|
dupeOnRay.AgentData.RayStart, dupeOnRay.AgentData.BypassRaycast, dupeOnRay.AgentData.RayEndIsIntersection,
|
||||||
dupeOnRay.AgentData.CopyCenters, dupeOnRay.AgentData.CopyRotates);
|
dupeOnRay.AgentData.CopyCenters, dupeOnRay.AgentData.CopyRotates);
|
||||||
}
|
}
|
||||||
|
@ -11502,7 +11511,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
// m_log.DebugFormat("[CLIENT]: {0} requesting asset {1}", Name, requestID);
|
// m_log.DebugFormat("[CLIENT]: {0} requesting asset {1}", Name, requestID);
|
||||||
|
|
||||||
|
|
||||||
|
//Note, the bool returned from the below function is useless since it is always false.
|
||||||
m_assetService.Get(requestID.ToString(), transferRequest, AssetReceived);
|
m_assetService.Get(requestID.ToString(), transferRequest, AssetReceived);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -11552,7 +11564,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
//m_log.DebugFormat("[ASSET CACHE]: Asset transfer request for asset which is {0} already known to be missing. Dropping", requestID);
|
//m_log.DebugFormat("[ASSET CACHE]: Asset transfer request for asset which is {0} already known to be missing. Dropping", requestID);
|
||||||
|
|
||||||
// FIXME: We never tell the client about assets which do not exist when requested by this transfer mechanism, which can't be right.
|
//We need to send a TransferAbort here, so the client doesn't wait forever for the asset,
|
||||||
|
//which causes it to not request any more for a while. Which is bad.
|
||||||
|
SendTransferAbort(transferRequest);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -900,7 +900,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
// Start the IClientAPI
|
// Start the IClientAPI
|
||||||
// Spin it off so that it doesn't clog up the LLUDPServer
|
// Spin it off so that it doesn't clog up the LLUDPServer
|
||||||
Util.FireAndForget(delegate(object o) { client.Start(); });
|
//Util.FireAndForget(delegate(object o) { client.Start(); });
|
||||||
|
|
||||||
|
// NOTE: DO NOT CALL THIS ASYNCHRONOUSLY!!!!!
|
||||||
|
// This method will ultimately cause the modules to hook
|
||||||
|
// client events in OnNewClient. If they can't do this
|
||||||
|
// before further packets are processed, packets WILL BE LOST.
|
||||||
|
// This includes the all-important EconomyDataRequest!
|
||||||
|
// So using FireAndForget here WILL screw up money. Badly.
|
||||||
|
// You have been warned!
|
||||||
|
client.Start();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -243,7 +243,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
|
|
||||||
if (mm != null)
|
if (mm != null)
|
||||||
{
|
{
|
||||||
if (!mm.UploadCovered(remoteClient))
|
if (!mm.UploadCovered(remoteClient, mm.UploadCharge))
|
||||||
{
|
{
|
||||||
remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
@ -190,7 +190,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
||||||
end = Utils.Clamp(end, 1, texture.Data.Length);
|
end = Utils.Clamp(end, 1, texture.Data.Length);
|
||||||
start = Utils.Clamp(start, 0, end - 1);
|
start = Utils.Clamp(start, 0, end - 1);
|
||||||
|
|
||||||
m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
|
//m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
|
||||||
|
|
||||||
if (end - start < texture.Data.Length)
|
if (end - start < texture.Data.Length)
|
||||||
response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent;
|
response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent;
|
||||||
|
|
|
@ -769,8 +769,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
bool canEditObjectsChanged = ((rights ^ userFlags) & (int)FriendRights.CanModifyObjects) != 0;
|
bool canEditObjectsChanged = ((rights ^ userFlags) & (int)FriendRights.CanModifyObjects) != 0;
|
||||||
if (canEditObjectsChanged)
|
if (canEditObjectsChanged)
|
||||||
friendClient.SendChangeUserRights(userID, friendID, rights);
|
friendClient.SendChangeUserRights(userID, friendID, rights);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update local cache
|
||||||
|
//m_Friends[friendID].Friends = m_FriendsService.GetFriends(friendID);
|
||||||
|
foreach (FriendInfo finfo in m_Friends[friendID].Friends)
|
||||||
|
if (finfo.Friend == userID.ToString())
|
||||||
|
finfo.TheirFlags = rights;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,11 +156,30 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dialog == (byte)InstantMessageDialog.MessageFromAgent ||
|
DateTime dt = DateTime.UtcNow;
|
||||||
dialog == (byte)InstantMessageDialog.MessageFromObject)
|
|
||||||
|
// Ticks from UtcNow, but make it look like local. Evil, huh?
|
||||||
|
dt = DateTime.SpecifyKind(dt, DateTimeKind.Local);
|
||||||
|
|
||||||
|
try
|
||||||
{
|
{
|
||||||
im.offline = 1;
|
// Convert that to the PST timezone
|
||||||
|
TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("America/Los_Angeles");
|
||||||
|
dt = TimeZoneInfo.ConvertTime(dt, timeZoneInfo);
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
m_log.Info("[OFFLINE MESSAGING]: No PST timezone found on this machine. Saving with local timestamp.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// And make it look local again to fool the unix time util
|
||||||
|
dt = DateTime.SpecifyKind(dt, DateTimeKind.Utc);
|
||||||
|
|
||||||
|
im.timestamp = (uint)Util.ToUnixTime(dt);
|
||||||
|
|
||||||
|
// If client is null, this message comes from storage and IS offline
|
||||||
|
if (client != null)
|
||||||
|
im.offline = 0;
|
||||||
|
|
||||||
if (m_TransferModule != null)
|
if (m_TransferModule != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -192,6 +192,17 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
// Needed for proper state management for stored group
|
// Needed for proper state management for stored group
|
||||||
// invitations
|
// invitations
|
||||||
//
|
//
|
||||||
|
|
||||||
|
im.offline = 1;
|
||||||
|
|
||||||
|
// Reconstruct imSessionID
|
||||||
|
if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
|
||||||
|
{
|
||||||
|
UUID fromAgentID = new UUID(im.fromAgentID);
|
||||||
|
UUID sessionID = fromAgentID ^ client.AgentId;
|
||||||
|
im.imSessionID = new Guid(sessionID.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
Scene s = FindScene(client.AgentId);
|
Scene s = FindScene(client.AgentId);
|
||||||
if (s != null)
|
if (s != null)
|
||||||
s.EventManager.TriggerIncomingInstantMessage(im);
|
s.EventManager.TriggerIncomingInstantMessage(im);
|
||||||
|
@ -201,11 +212,14 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
|
|
||||||
private void UndeliveredMessage(GridInstantMessage im)
|
private void UndeliveredMessage(GridInstantMessage im)
|
||||||
{
|
{
|
||||||
if (im.dialog == 19)
|
if (im.dialog != (byte)InstantMessageDialog.MessageFromObject &&
|
||||||
im.offline = 1; // We want them pushed out to the server
|
im.dialog != (byte)InstantMessageDialog.MessageFromAgent &&
|
||||||
if ((im.offline != 0)
|
im.dialog != (byte)InstantMessageDialog.GroupNotice &&
|
||||||
&& (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages)))
|
im.dialog != (byte)InstantMessageDialog.InventoryOffered)
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// It's not delivered. Make sure the scope id is saved
|
// It's not delivered. Make sure the scope id is saved
|
||||||
// We don't need the imSessionID here anymore, overwrite it
|
// We don't need the imSessionID here anymore, overwrite it
|
||||||
Scene scene = FindScene(new UUID(im.fromAgentID));
|
Scene scene = FindScene(new UUID(im.fromAgentID));
|
||||||
|
@ -232,6 +246,5 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DO NOT OVERRIDE THIS METHOD
|
||||||
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
|
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
|
||||||
SceneObjectGroup objectGroup, IClientAPI remoteClient)
|
SceneObjectGroup objectGroup, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
|
|
|
@ -286,22 +286,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
{
|
{
|
||||||
// Deleting someone else's item
|
// Deleting someone else's item
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
if (remoteClient == null ||
|
if (remoteClient == null ||
|
||||||
objectGroup.OwnerID != remoteClient.AgentId)
|
objectGroup.OwnerID != remoteClient.AgentId)
|
||||||
{
|
{
|
||||||
// Folder skeleton may not be loaded and we
|
|
||||||
// have to wait for the inventory to find
|
|
||||||
// the destination folder
|
|
||||||
//
|
|
||||||
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
|
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Assume inventory skeleton was loaded during login
|
|
||||||
// and all folders can be found
|
|
||||||
//
|
|
||||||
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
|
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -332,7 +324,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
|
|
||||||
if (folder == null) // None of the above
|
if (folder == null) // None of the above
|
||||||
{
|
{
|
||||||
//folder = userInfo.RootFolder.FindFolder(folderID);
|
|
||||||
folder = new InventoryFolderBase(folderID);
|
folder = new InventoryFolderBase(folderID);
|
||||||
|
|
||||||
if (folder == null) // Nowhere to put it
|
if (folder == null) // Nowhere to put it
|
||||||
|
|
|
@ -40,7 +40,7 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||||
{
|
{
|
||||||
public class EmailModule : IEmailModule
|
public class EmailModule : IRegionModule, IEmailModule
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Log
|
// Log
|
||||||
|
|
|
@ -142,7 +142,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
|
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
|
||||||
return urlcode;
|
return urlcode;
|
||||||
}
|
}
|
||||||
string url = "http://" + m_ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + "/lslhttp/" + urlcode.ToString() + "/";
|
string url = "http://" + m_ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + "/lslhttp/" + urlcode.ToString();
|
||||||
|
|
||||||
UrlData urlData = new UrlData();
|
UrlData urlData = new UrlData();
|
||||||
urlData.hostID = host.UUID;
|
urlData.hostID = host.UUID;
|
||||||
|
@ -152,10 +152,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
urlData.urlcode = urlcode;
|
urlData.urlcode = urlcode;
|
||||||
urlData.requests = new Dictionary<UUID, RequestData>();
|
urlData.requests = new Dictionary<UUID, RequestData>();
|
||||||
|
|
||||||
|
|
||||||
m_UrlMap[url] = urlData;
|
m_UrlMap[url] = urlData;
|
||||||
|
|
||||||
string uri = "/lslhttp/" + urlcode.ToString() + "/";
|
string uri = "/lslhttp/" + urlcode.ToString();
|
||||||
|
|
||||||
m_HttpServer.AddPollServiceHTTPHandler(uri,HandleHttpPoll,
|
m_HttpServer.AddPollServiceHTTPHandler(uri,HandleHttpPoll,
|
||||||
new PollServiceEventArgs(HttpRequestHandler,HasEvents, GetEvents, NoEvents,
|
new PollServiceEventArgs(HttpRequestHandler,HasEvents, GetEvents, NoEvents,
|
||||||
|
@ -386,6 +385,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HttpRequestHandler(UUID requestID, Hashtable request)
|
public void HttpRequestHandler(UUID requestID, Hashtable request)
|
||||||
{
|
{
|
||||||
lock (request)
|
lock (request)
|
||||||
|
@ -400,8 +400,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
|
|
||||||
int pos1 = uri.IndexOf("/");// /lslhttp
|
int pos1 = uri.IndexOf("/");// /lslhttp
|
||||||
int pos2 = uri.IndexOf("/", pos1 + 1);// /lslhttp/
|
int pos2 = uri.IndexOf("/", pos1 + 1);// /lslhttp/
|
||||||
int pos3 = uri.IndexOf("/", pos2 + 1);// /lslhttp/<UUID>/
|
int pos3 = pos2 + 37; // /lslhttp/urlcode
|
||||||
string uri_tmp = uri.Substring(0, pos3 + 1);
|
string uri_tmp = uri.Substring(0, pos3);
|
||||||
//HTTP server code doesn't provide us with QueryStrings
|
//HTTP server code doesn't provide us with QueryStrings
|
||||||
string pathInfo;
|
string pathInfo;
|
||||||
string queryString;
|
string queryString;
|
||||||
|
|
|
@ -96,7 +96,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
|
||||||
|
|
||||||
Object[] args = new Object[] { m_Config, MainServer.Instance, "HGInventoryService" };
|
Object[] args = new Object[] { m_Config, MainServer.Instance, "HGInventoryService" };
|
||||||
|
|
||||||
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:HGInventoryServiceInConnector", args);
|
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:XInventoryInConnector", args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1303,18 +1303,31 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data)
|
public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data)
|
||||||
{
|
{
|
||||||
|
lock (m_landList)
|
||||||
|
{
|
||||||
|
//Remove all the land objects in the sim and then process our new data
|
||||||
|
foreach (int n in m_landList.Keys)
|
||||||
|
{
|
||||||
|
m_scene.EventManager.TriggerLandObjectRemoved(m_landList[n].LandData.GlobalID);
|
||||||
|
}
|
||||||
|
m_landIDList.Initialize();
|
||||||
|
m_landList.Clear();
|
||||||
|
|
||||||
for (int i = 0; i < data.Count; i++)
|
for (int i = 0; i < data.Count; i++)
|
||||||
{
|
{
|
||||||
IncomingLandObjectFromStorage(data[i]);
|
IncomingLandObjectFromStorage(data[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void IncomingLandObjectFromStorage(LandData data)
|
public void IncomingLandObjectFromStorage(LandData data)
|
||||||
{
|
{
|
||||||
|
|
||||||
ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
|
ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
|
||||||
new_land.LandData = data.Copy();
|
new_land.LandData = data.Copy();
|
||||||
new_land.SetLandBitmapFromByteArray();
|
new_land.SetLandBitmapFromByteArray();
|
||||||
AddLandObject(new_land);
|
AddLandObject(new_land);
|
||||||
|
new_land.SendLandUpdateToAvatarsOverMe();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
|
public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
|
||||||
|
|
|
@ -544,6 +544,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||||
m_scene.PhysicsScene.SetTerrain(m_channel.GetFloatsSerialised());
|
m_scene.PhysicsScene.SetTerrain(m_channel.GetFloatsSerialised());
|
||||||
m_scene.SaveTerrain();
|
m_scene.SaveTerrain();
|
||||||
|
|
||||||
|
m_scene.EventManager.TriggerTerrainUpdate();
|
||||||
|
|
||||||
// Clients who look at the map will never see changes after they looked at the map, so i've commented this out.
|
// Clients who look at the map will never see changes after they looked at the map, so i've commented this out.
|
||||||
//m_scene.CreateTerrainTexture(true);
|
//m_scene.CreateTerrainTexture(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -805,7 +805,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
imgstream = new MemoryStream();
|
imgstream = new MemoryStream();
|
||||||
|
|
||||||
// non-async because we know we have the asset immediately.
|
// non-async because we know we have the asset immediately.
|
||||||
AssetBase mapasset = m_scene.AssetService.Get(m_scene.RegionInfo.lastMapUUID.ToString());
|
AssetBase mapasset = m_scene.AssetService.Get(m_scene.RegionInfo.RegionSettings.TerrainImageID.ToString());
|
||||||
|
|
||||||
// Decode image to System.Drawing.Image
|
// Decode image to System.Drawing.Image
|
||||||
if (OpenJPEG.DecodeToImage(mapasset.Data, out managedImage, out image))
|
if (OpenJPEG.DecodeToImage(mapasset.Data, out managedImage, out image))
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
public int numLeft;
|
public int numLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IEmailModule : IRegionModule
|
public interface IEmailModule
|
||||||
{
|
{
|
||||||
void SendEmail(UUID objectID, string address, string subject, string body);
|
void SendEmail(UUID objectID, string address, string subject, string body);
|
||||||
Email GetNextEmail(UUID objectID, string sender, string subject);
|
Email GetNextEmail(UUID objectID, string sender, string subject);
|
||||||
|
|
|
@ -55,8 +55,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public delegate void OnTerrainTickDelegate();
|
public delegate void OnTerrainTickDelegate();
|
||||||
|
|
||||||
|
public delegate void OnTerrainUpdateDelegate();
|
||||||
|
|
||||||
public event OnTerrainTickDelegate OnTerrainTick;
|
public event OnTerrainTickDelegate OnTerrainTick;
|
||||||
|
|
||||||
|
public event OnTerrainUpdateDelegate OnTerrainUpdate;
|
||||||
|
|
||||||
public delegate void OnBackupDelegate(IRegionDataStore datastore, bool forceBackup);
|
public delegate void OnBackupDelegate(IRegionDataStore datastore, bool forceBackup);
|
||||||
|
|
||||||
public event OnBackupDelegate OnBackup;
|
public event OnBackupDelegate OnBackup;
|
||||||
|
@ -716,6 +720,26 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void TriggerTerrainUpdate()
|
||||||
|
{
|
||||||
|
OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate;
|
||||||
|
if (handlerTerrainUpdate != null)
|
||||||
|
{
|
||||||
|
foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
d();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}",
|
||||||
|
e.Message, e.StackTrace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void TriggerTerrainTick()
|
public void TriggerTerrainTick()
|
||||||
{
|
{
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
IMoneyModule money=RequestModuleInterface<IMoneyModule>();
|
IMoneyModule money=RequestModuleInterface<IMoneyModule>();
|
||||||
if (money != null)
|
if (money != null)
|
||||||
{
|
{
|
||||||
money.ApplyUploadCharge(agentID);
|
money.ApplyUploadCharge(agentID, money.UploadCharge, "Asset upload");
|
||||||
}
|
}
|
||||||
|
|
||||||
AddInventoryItem(agentID, item);
|
AddInventoryItem(agentID, item);
|
||||||
|
@ -400,9 +400,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (Permissions.PropagatePermissions() && recipient != senderId)
|
if (Permissions.PropagatePermissions() && recipient != senderId)
|
||||||
{
|
{
|
||||||
// First, make sore base is limited to the next perms
|
// First, make sore base is limited to the next perms
|
||||||
itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions;
|
itemCopy.BasePermissions = item.BasePermissions & (item.NextPermissions | (uint)PermissionMask.Move);
|
||||||
// By default, current equals base
|
// By default, current equals base
|
||||||
itemCopy.CurrentPermissions = itemCopy.BasePermissions;
|
itemCopy.CurrentPermissions = itemCopy.BasePermissions & item.CurrentPermissions;
|
||||||
|
|
||||||
// If this is an object, replace current perms
|
// If this is an object, replace current perms
|
||||||
// with folded perms
|
// with folded perms
|
||||||
|
@ -413,7 +413,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure there is no escalation
|
// Ensure there is no escalation
|
||||||
itemCopy.CurrentPermissions &= item.NextPermissions;
|
itemCopy.CurrentPermissions &= (item.NextPermissions | (uint)PermissionMask.Move);
|
||||||
|
|
||||||
// Need slam bit on xfer
|
// Need slam bit on xfer
|
||||||
itemCopy.CurrentPermissions |= 8;
|
itemCopy.CurrentPermissions |= 8;
|
||||||
|
@ -916,14 +916,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions())
|
if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions())
|
||||||
{
|
{
|
||||||
agentItem.BasePermissions = taskItem.BasePermissions & taskItem.NextPermissions;
|
agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||||
if (taskItem.InvType == (int)InventoryType.Object)
|
if (taskItem.InvType == (int)InventoryType.Object)
|
||||||
agentItem.CurrentPermissions = agentItem.BasePermissions & ((taskItem.CurrentPermissions & 7) << 13);
|
agentItem.CurrentPermissions = agentItem.BasePermissions & (((taskItem.CurrentPermissions & 7) << 13) | (taskItem.CurrentPermissions & (uint)PermissionMask.Move));
|
||||||
agentItem.CurrentPermissions = agentItem.BasePermissions ;
|
else
|
||||||
|
agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions;
|
||||||
|
|
||||||
agentItem.CurrentPermissions |= 8;
|
agentItem.CurrentPermissions |= 8;
|
||||||
agentItem.NextPermissions = taskItem.NextPermissions;
|
agentItem.NextPermissions = taskItem.NextPermissions;
|
||||||
agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions;
|
agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||||
agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions;
|
agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1105,13 +1106,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (Permissions.PropagatePermissions())
|
if (Permissions.PropagatePermissions())
|
||||||
{
|
{
|
||||||
destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions &
|
destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions &
|
||||||
srcTaskItem.NextPermissions;
|
(srcTaskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||||
destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions &
|
destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions &
|
||||||
srcTaskItem.NextPermissions;
|
(srcTaskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||||
destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions &
|
destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions &
|
||||||
srcTaskItem.NextPermissions;
|
(srcTaskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||||
destTaskItem.BasePermissions = srcTaskItem.BasePermissions &
|
destTaskItem.BasePermissions = srcTaskItem.BasePermissions &
|
||||||
srcTaskItem.NextPermissions;
|
(srcTaskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||||
destTaskItem.CurrentPermissions |= 8; // Slam!
|
destTaskItem.CurrentPermissions |= 8; // Slam!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1285,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
if (part.Inventory.UpdateInventoryItem(itemInfo))
|
if (part.Inventory.UpdateInventoryItem(itemInfo))
|
||||||
{
|
{
|
||||||
remoteClient.SendAgentAlertMessage("Notecard saved", false);
|
// remoteClient.SendAgentAlertMessage("Notecard saved", false);
|
||||||
part.GetProperties(remoteClient);
|
part.GetProperties(remoteClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1377,7 +1378,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
|
|
||||||
AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType,
|
AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType,
|
||||||
Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}"),
|
Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n\n touch_start(integer num)\n {\n }\n}"),
|
||||||
remoteClient.AgentId);
|
remoteClient.AgentId);
|
||||||
AssetService.Store(asset);
|
AssetService.Store(asset);
|
||||||
|
|
||||||
|
@ -1592,18 +1593,36 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// for when deleting the object from it
|
// for when deleting the object from it
|
||||||
ForceSceneObjectBackup(grp);
|
ForceSceneObjectBackup(grp);
|
||||||
|
|
||||||
|
if (remoteClient == null)
|
||||||
|
{
|
||||||
|
// Autoreturn has a null client. Nothing else does. So
|
||||||
|
// allow only returns
|
||||||
|
if (action != DeRezAction.Return)
|
||||||
|
return;
|
||||||
|
|
||||||
|
permissionToTakeCopy = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (action == DeRezAction.TakeCopy)
|
||||||
|
{
|
||||||
if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId))
|
if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId))
|
||||||
permissionToTakeCopy = false;
|
permissionToTakeCopy = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
permissionToTakeCopy = false;
|
||||||
|
}
|
||||||
if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId))
|
if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId))
|
||||||
permissionToTake = false;
|
permissionToTake = false;
|
||||||
|
|
||||||
if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId))
|
if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId))
|
||||||
permissionToDelete = false;
|
permissionToDelete = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle god perms
|
// Handle god perms
|
||||||
if (Permissions.IsGod(remoteClient.AgentId))
|
if (remoteClient != null && Permissions.IsGod(remoteClient.AgentId))
|
||||||
{
|
{
|
||||||
permissionToTake = true;
|
permissionToTake = true;
|
||||||
permissionToTakeCopy = true;
|
permissionToTakeCopy = true;
|
||||||
|
@ -1614,7 +1633,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (action == DeRezAction.SaveToExistingUserInventoryItem)
|
if (action == DeRezAction.SaveToExistingUserInventoryItem)
|
||||||
permissionToDelete = false;
|
permissionToDelete = false;
|
||||||
|
|
||||||
// if we want to take a copy,, we also don't want to delete
|
// if we want to take a copy, we also don't want to delete
|
||||||
// Note: after this point, the permissionToTakeCopy flag
|
// Note: after this point, the permissionToTakeCopy flag
|
||||||
// becomes irrelevant. It already includes the permissionToTake
|
// becomes irrelevant. It already includes the permissionToTake
|
||||||
// permission and after excluding no copy items here, we can
|
// permission and after excluding no copy items here, we can
|
||||||
|
@ -1625,6 +1644,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (!permissionToTakeCopy)
|
if (!permissionToTakeCopy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
permissionToTake = true;
|
||||||
// Don't delete
|
// Don't delete
|
||||||
permissionToDelete = false;
|
permissionToDelete = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1770,6 +1770,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public void StoreWindlightProfile(RegionLightShareData wl)
|
public void StoreWindlightProfile(RegionLightShareData wl)
|
||||||
{
|
{
|
||||||
m_regInfo.WindlightSettings = wl;
|
m_regInfo.WindlightSettings = wl;
|
||||||
|
wl.Save();
|
||||||
m_storageManager.DataStore.StoreRegionWindlightSettings(wl);
|
m_storageManager.DataStore.StoreRegionWindlightSettings(wl);
|
||||||
m_eventManager.TriggerOnSaveNewWindlightProfile();
|
m_eventManager.TriggerOnSaveNewWindlightProfile();
|
||||||
}
|
}
|
||||||
|
@ -2183,6 +2184,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void DeleteAllSceneObjects()
|
public void DeleteAllSceneObjects()
|
||||||
{
|
{
|
||||||
|
DeleteAllSceneObjects(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delete every object from the scene. This does not include attachments worn by avatars.
|
||||||
|
/// </summary>
|
||||||
|
public void DeleteAllSceneObjects(bool exceptNoCopy)
|
||||||
|
{
|
||||||
|
List<SceneObjectGroup> toReturn = new List<SceneObjectGroup>();
|
||||||
lock (Entities)
|
lock (Entities)
|
||||||
{
|
{
|
||||||
ICollection<EntityBase> entities = new List<EntityBase>(Entities);
|
ICollection<EntityBase> entities = new List<EntityBase>(Entities);
|
||||||
|
@ -2192,12 +2202,25 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (e is SceneObjectGroup)
|
if (e is SceneObjectGroup)
|
||||||
{
|
{
|
||||||
SceneObjectGroup sog = (SceneObjectGroup)e;
|
SceneObjectGroup sog = (SceneObjectGroup)e;
|
||||||
if (!sog.IsAttachment)
|
if (sog != null && !sog.IsAttachment)
|
||||||
|
{
|
||||||
|
if (!exceptNoCopy || ((sog.GetEffectivePermissions() & (uint)PermissionMask.Copy) != 0))
|
||||||
|
{
|
||||||
DeleteSceneObject((SceneObjectGroup)e, false);
|
DeleteSceneObject((SceneObjectGroup)e, false);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
toReturn.Add((SceneObjectGroup)e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (toReturn.Count > 0)
|
||||||
|
{
|
||||||
|
returnObjects(toReturn.ToArray(), UUID.Zero);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Synchronously delete the given object from the scene.
|
/// Synchronously delete the given object from the scene.
|
||||||
|
|
|
@ -1848,9 +1848,31 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (m_parentScene.Permissions.CanDuplicateObject(original.Children.Count, original.UUID, AgentID, original.AbsolutePosition))
|
if (m_parentScene.Permissions.CanDuplicateObject(original.Children.Count, original.UUID, AgentID, original.AbsolutePosition))
|
||||||
{
|
{
|
||||||
SceneObjectGroup copy = original.Copy(AgentID, GroupID, true);
|
SceneObjectGroup copy = original.Copy(true);
|
||||||
copy.AbsolutePosition = copy.AbsolutePosition + offset;
|
copy.AbsolutePosition = copy.AbsolutePosition + offset;
|
||||||
|
|
||||||
|
if (original.OwnerID != AgentID)
|
||||||
|
{
|
||||||
|
copy.SetOwnerId(AgentID);
|
||||||
|
copy.SetRootPartOwner(copy.RootPart, AgentID, GroupID);
|
||||||
|
|
||||||
|
List<SceneObjectPart> partList =
|
||||||
|
new List<SceneObjectPart>(copy.Children.Values);
|
||||||
|
|
||||||
|
if (m_parentScene.Permissions.PropagatePermissions())
|
||||||
|
{
|
||||||
|
foreach (SceneObjectPart child in partList)
|
||||||
|
{
|
||||||
|
child.Inventory.ChangeInventoryOwner(AgentID);
|
||||||
|
child.TriggerScriptChangedEvent(Changed.OWNER);
|
||||||
|
child.ApplyNextOwnerPermissions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
copy.RootPart.ObjectSaleType = 0;
|
||||||
|
copy.RootPart.SalePrice = 10;
|
||||||
|
}
|
||||||
|
|
||||||
Entities.Add(copy);
|
Entities.Add(copy);
|
||||||
|
|
||||||
// Since we copy from a source group that is in selected
|
// Since we copy from a source group that is in selected
|
||||||
|
|
|
@ -349,7 +349,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public virtual Quaternion Rotation
|
public virtual Quaternion Rotation
|
||||||
{
|
{
|
||||||
get { return m_rotation; }
|
get { return m_rotation; }
|
||||||
set { m_rotation = value; }
|
set {
|
||||||
|
lockPartsForRead(true);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
foreach(SceneObjectPart p in m_parts.Values)
|
||||||
|
{
|
||||||
|
p.StoreUndoState(UndoType.STATE_GROUP_ROTATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
lockPartsForRead(false);
|
||||||
|
}
|
||||||
|
m_rotation = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Quaternion GroupRotation
|
public Quaternion GroupRotation
|
||||||
|
@ -431,7 +445,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
lockPartsForRead(true);
|
lockPartsForRead(true);
|
||||||
|
foreach (SceneObjectPart part in m_parts.Values)
|
||||||
|
{
|
||||||
|
part.IgnoreUndoUpdate = true;
|
||||||
|
}
|
||||||
if (RootPart.GetStatusSandbox())
|
if (RootPart.GetStatusSandbox())
|
||||||
{
|
{
|
||||||
if (Util.GetDistanceTo(RootPart.StatusSandboxPos, value) > 10)
|
if (Util.GetDistanceTo(RootPart.StatusSandboxPos, value) > 10)
|
||||||
|
@ -443,12 +460,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
foreach (SceneObjectPart part in m_parts.Values)
|
||||||
{
|
{
|
||||||
|
part.IgnoreUndoUpdate = false;
|
||||||
|
part.StoreUndoState(UndoType.STATE_GROUP_POSITION);
|
||||||
part.GroupPosition = val;
|
part.GroupPosition = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
lockPartsForRead(false);
|
lockPartsForRead(false);
|
||||||
|
|
||||||
//if (m_rootPart.PhysActor != null)
|
//if (m_rootPart.PhysActor != null)
|
||||||
|
@ -724,7 +741,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
foreach (SceneObjectPart part in m_parts.Values)
|
||||||
{
|
{
|
||||||
|
|
||||||
Vector3 partscale = part.Scale;
|
Vector3 partscale = part.Scale;
|
||||||
Vector3 partoffset = part.OffsetPosition;
|
Vector3 partoffset = part.OffsetPosition;
|
||||||
|
|
||||||
|
@ -1471,7 +1487,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public virtual void OnGrabPart(SceneObjectPart part, Vector3 offsetPos, IClientAPI remoteClient)
|
public virtual void OnGrabPart(SceneObjectPart part, Vector3 offsetPos, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
part.StoreUndoState();
|
part.StoreUndoState(UndoType.STATE_PRIM_ALL);
|
||||||
part.OnGrab(offsetPos, remoteClient);
|
part.OnGrab(offsetPos, remoteClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1700,7 +1716,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
"[SCENE]: Storing {0}, {1} in {2}",
|
"[SCENE]: Storing {0}, {1} in {2}",
|
||||||
Name, UUID, m_scene.RegionInfo.RegionName);
|
Name, UUID, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false);
|
SceneObjectGroup backup_group = Copy(false);
|
||||||
backup_group.RootPart.Velocity = RootPart.Velocity;
|
backup_group.RootPart.Velocity = RootPart.Velocity;
|
||||||
backup_group.RootPart.Acceleration = RootPart.Acceleration;
|
backup_group.RootPart.Acceleration = RootPart.Acceleration;
|
||||||
backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity;
|
backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity;
|
||||||
|
@ -1758,7 +1774,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Duplicates this object, including operations such as physics set up and attaching to the backup event.
|
/// Duplicates this object, including operations such as physics set up and attaching to the backup event.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public SceneObjectGroup Copy(UUID cAgentID, UUID cGroupID, bool userExposed)
|
public SceneObjectGroup Copy(bool userExposed)
|
||||||
{
|
{
|
||||||
SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone();
|
SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone();
|
||||||
dupe.m_isBackedUp = false;
|
dupe.m_isBackedUp = false;
|
||||||
|
@ -1781,7 +1797,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z);
|
dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z);
|
||||||
|
|
||||||
if (!userExposed)
|
if (!userExposed)
|
||||||
|
{
|
||||||
dupe.RootPart.IsAttachment = previousAttachmentStatus;
|
dupe.RootPart.IsAttachment = previousAttachmentStatus;
|
||||||
|
}
|
||||||
|
|
||||||
dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
|
dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
|
||||||
dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
|
dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
|
||||||
|
@ -1806,16 +1824,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true);
|
dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we've made a copy that replaces this one, we need to
|
|
||||||
// switch the owner to the person who did the copying
|
|
||||||
// Second Life copies an object and duplicates the first one in it's place
|
|
||||||
// So, we have to make a copy of this one, set it in it's place then set the owner on this one
|
|
||||||
if (userExposed)
|
|
||||||
{
|
|
||||||
SetRootPartOwner(m_rootPart, cAgentID, cGroupID);
|
|
||||||
m_rootPart.ScheduleFullUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
List<SceneObjectPart> partList;
|
List<SceneObjectPart> partList;
|
||||||
|
|
||||||
lockPartsForRead(true);
|
lockPartsForRead(true);
|
||||||
|
@ -1837,12 +1845,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed);
|
SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed);
|
||||||
|
|
||||||
newPart.LinkNum = part.LinkNum;
|
newPart.LinkNum = part.LinkNum;
|
||||||
|
|
||||||
if (userExposed)
|
|
||||||
{
|
|
||||||
SetPartOwner(newPart, cAgentID, cGroupID);
|
|
||||||
newPart.ScheduleFullUpdate();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3146,7 +3148,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectPart part = GetChildPart(localID);
|
SceneObjectPart part = GetChildPart(localID);
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
part.IgnoreUndoUpdate = true;
|
|
||||||
if (scale.X > m_scene.m_maxNonphys)
|
if (scale.X > m_scene.m_maxNonphys)
|
||||||
scale.X = m_scene.m_maxNonphys;
|
scale.X = m_scene.m_maxNonphys;
|
||||||
if (scale.Y > m_scene.m_maxNonphys)
|
if (scale.Y > m_scene.m_maxNonphys)
|
||||||
|
@ -3232,8 +3233,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
y *= a;
|
y *= a;
|
||||||
z *= a;
|
z *= a;
|
||||||
}
|
}
|
||||||
obPart.IgnoreUndoUpdate = false;
|
|
||||||
obPart.StoreUndoState();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3243,16 +3243,24 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Vector3 prevScale = part.Scale;
|
Vector3 prevScale = part.Scale;
|
||||||
prevScale.X *= x;
|
prevScale.X *= x;
|
||||||
prevScale.Y *= y;
|
prevScale.Y *= y;
|
||||||
prevScale.Z *= z;
|
prevScale.Z *= z;;
|
||||||
|
|
||||||
|
part.IgnoreUndoUpdate = false;
|
||||||
|
part.StoreUndoState(UndoType.STATE_GROUP_SCALE);
|
||||||
|
part.IgnoreUndoUpdate = true;
|
||||||
part.Resize(prevScale);
|
part.Resize(prevScale);
|
||||||
|
part.IgnoreUndoUpdate = false;
|
||||||
|
|
||||||
lockPartsForRead(true);
|
lockPartsForRead(true);
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart obPart in m_parts.Values)
|
foreach (SceneObjectPart obPart in m_parts.Values)
|
||||||
{
|
{
|
||||||
obPart.IgnoreUndoUpdate = true;
|
|
||||||
if (obPart.UUID != m_rootPart.UUID)
|
if (obPart.UUID != m_rootPart.UUID)
|
||||||
{
|
{
|
||||||
|
obPart.IgnoreUndoUpdate = false;
|
||||||
|
obPart.StoreUndoState(UndoType.STATE_GROUP_SCALE);
|
||||||
|
obPart.IgnoreUndoUpdate = true;
|
||||||
|
|
||||||
Vector3 currentpos = new Vector3(obPart.OffsetPosition);
|
Vector3 currentpos = new Vector3(obPart.OffsetPosition);
|
||||||
currentpos.X *= x;
|
currentpos.X *= x;
|
||||||
currentpos.Y *= y;
|
currentpos.Y *= y;
|
||||||
|
@ -3265,7 +3273,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
obPart.UpdateOffSet(currentpos);
|
obPart.UpdateOffSet(currentpos);
|
||||||
}
|
}
|
||||||
obPart.IgnoreUndoUpdate = false;
|
obPart.IgnoreUndoUpdate = false;
|
||||||
obPart.StoreUndoState();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lockPartsForRead(false);
|
lockPartsForRead(false);
|
||||||
|
@ -3277,7 +3284,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
part.IgnoreUndoUpdate = false;
|
part.IgnoreUndoUpdate = false;
|
||||||
part.StoreUndoState();
|
|
||||||
HasGroupChanged = true;
|
HasGroupChanged = true;
|
||||||
ScheduleGroupForTerseUpdate();
|
ScheduleGroupForTerseUpdate();
|
||||||
}
|
}
|
||||||
|
@ -3293,14 +3299,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="pos"></param>
|
/// <param name="pos"></param>
|
||||||
public void UpdateGroupPosition(Vector3 pos)
|
public void UpdateGroupPosition(Vector3 pos)
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in Children.Values)
|
|
||||||
{
|
|
||||||
part.StoreUndoState();
|
|
||||||
}
|
|
||||||
if (m_scene.EventManager.TriggerGroupMove(UUID, pos))
|
if (m_scene.EventManager.TriggerGroupMove(UUID, pos))
|
||||||
{
|
{
|
||||||
if (IsAttachment)
|
if (IsAttachment)
|
||||||
{
|
{
|
||||||
|
m_rootPart.StoreUndoState(UndoType.STATE_GROUP_POSITION);
|
||||||
m_rootPart.AttachedPos = pos;
|
m_rootPart.AttachedPos = pos;
|
||||||
}
|
}
|
||||||
if (RootPart.GetStatusSandbox())
|
if (RootPart.GetStatusSandbox())
|
||||||
|
@ -3333,7 +3336,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectPart part = GetChildPart(localID);
|
SceneObjectPart part = GetChildPart(localID);
|
||||||
foreach (SceneObjectPart parts in Children.Values)
|
foreach (SceneObjectPart parts in Children.Values)
|
||||||
{
|
{
|
||||||
parts.StoreUndoState();
|
parts.StoreUndoState(UndoType.STATE_PRIM_POSITION);
|
||||||
}
|
}
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
|
@ -3358,7 +3361,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in Children.Values)
|
foreach (SceneObjectPart part in Children.Values)
|
||||||
{
|
{
|
||||||
part.StoreUndoState();
|
part.StoreUndoState(UndoType.STATE_PRIM_POSITION);
|
||||||
}
|
}
|
||||||
Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z);
|
Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z);
|
||||||
Vector3 oldPos =
|
Vector3 oldPos =
|
||||||
|
@ -3383,11 +3386,28 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
lockPartsForRead(false);
|
lockPartsForRead(false);
|
||||||
|
|
||||||
|
//We have to set undoing here because otherwise an undo state will be saved
|
||||||
|
if (!m_rootPart.Undoing)
|
||||||
|
{
|
||||||
|
m_rootPart.Undoing = true;
|
||||||
AbsolutePosition = newPos;
|
AbsolutePosition = newPos;
|
||||||
|
m_rootPart.Undoing = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AbsolutePosition = newPos;
|
||||||
|
}
|
||||||
|
|
||||||
HasGroupChanged = true;
|
HasGroupChanged = true;
|
||||||
|
if (m_rootPart.Undoing)
|
||||||
|
{
|
||||||
|
ScheduleGroupForFullUpdate();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
ScheduleGroupForTerseUpdate();
|
ScheduleGroupForTerseUpdate();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void OffsetForNewRegion(Vector3 offset)
|
public void OffsetForNewRegion(Vector3 offset)
|
||||||
{
|
{
|
||||||
|
@ -3406,7 +3426,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart parts in Children.Values)
|
foreach (SceneObjectPart parts in Children.Values)
|
||||||
{
|
{
|
||||||
parts.StoreUndoState();
|
parts.StoreUndoState(UndoType.STATE_GROUP_ROTATION);
|
||||||
}
|
}
|
||||||
m_rootPart.UpdateRotation(rot);
|
m_rootPart.UpdateRotation(rot);
|
||||||
|
|
||||||
|
@ -3430,7 +3450,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart parts in Children.Values)
|
foreach (SceneObjectPart parts in Children.Values)
|
||||||
{
|
{
|
||||||
parts.StoreUndoState();
|
parts.StoreUndoState(UndoType.STATE_GROUP_ROTATION);
|
||||||
}
|
}
|
||||||
m_rootPart.UpdateRotation(rot);
|
m_rootPart.UpdateRotation(rot);
|
||||||
|
|
||||||
|
@ -3457,7 +3477,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectPart part = GetChildPart(localID);
|
SceneObjectPart part = GetChildPart(localID);
|
||||||
foreach (SceneObjectPart parts in Children.Values)
|
foreach (SceneObjectPart parts in Children.Values)
|
||||||
{
|
{
|
||||||
parts.StoreUndoState();
|
parts.StoreUndoState(UndoType.STATE_PRIM_ROTATION);
|
||||||
}
|
}
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
|
@ -3485,15 +3505,24 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (part.UUID == m_rootPart.UUID)
|
if (part.UUID == m_rootPart.UUID)
|
||||||
{
|
{
|
||||||
UpdateRootRotation(rot);
|
UpdateRootRotation(rot);
|
||||||
|
if (!m_rootPart.Undoing)
|
||||||
|
{
|
||||||
|
m_rootPart.Undoing = true;
|
||||||
AbsolutePosition = pos;
|
AbsolutePosition = pos;
|
||||||
|
m_rootPart.Undoing = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
AbsolutePosition = pos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
part.StoreUndoState(UndoType.STATE_PRIM_ROTATION);
|
||||||
part.IgnoreUndoUpdate = true;
|
part.IgnoreUndoUpdate = true;
|
||||||
part.UpdateRotation(rot);
|
part.UpdateRotation(rot);
|
||||||
part.OffsetPosition = pos;
|
part.OffsetPosition = pos;
|
||||||
part.IgnoreUndoUpdate = false;
|
part.IgnoreUndoUpdate = false;
|
||||||
part.StoreUndoState();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3507,7 +3536,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Quaternion axRot = rot;
|
Quaternion axRot = rot;
|
||||||
Quaternion oldParentRot = m_rootPart.RotationOffset;
|
Quaternion oldParentRot = m_rootPart.RotationOffset;
|
||||||
|
|
||||||
m_rootPart.StoreUndoState();
|
m_rootPart.StoreUndoState(UndoType.STATE_PRIM_ROTATION);
|
||||||
|
bool cancelUndo = false;
|
||||||
|
if (!m_rootPart.Undoing)
|
||||||
|
{
|
||||||
|
m_rootPart.Undoing = true;
|
||||||
|
cancelUndo = true;
|
||||||
|
}
|
||||||
m_rootPart.UpdateRotation(rot);
|
m_rootPart.UpdateRotation(rot);
|
||||||
if (m_rootPart.PhysActor != null)
|
if (m_rootPart.PhysActor != null)
|
||||||
{
|
{
|
||||||
|
@ -3531,18 +3566,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
newRot *= Quaternion.Inverse(axRot);
|
newRot *= Quaternion.Inverse(axRot);
|
||||||
prim.RotationOffset = newRot;
|
prim.RotationOffset = newRot;
|
||||||
prim.ScheduleTerseUpdate();
|
prim.ScheduleTerseUpdate();
|
||||||
|
prim.IgnoreUndoUpdate = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (cancelUndo == true)
|
||||||
foreach (SceneObjectPart childpart in Children.Values)
|
|
||||||
{
|
{
|
||||||
if (childpart != m_rootPart)
|
m_rootPart.Undoing = false;
|
||||||
{
|
|
||||||
childpart.IgnoreUndoUpdate = false;
|
|
||||||
childpart.StoreUndoState();
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
lockPartsForRead(false);
|
lockPartsForRead(false);
|
||||||
|
|
||||||
m_rootPart.ScheduleTerseUpdate();
|
m_rootPart.ScheduleTerseUpdate();
|
||||||
|
@ -3911,7 +3941,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public virtual ISceneObject CloneForNewScene()
|
public virtual ISceneObject CloneForNewScene()
|
||||||
{
|
{
|
||||||
SceneObjectGroup sog = Copy(this.OwnerID, this.GroupID, false);
|
SceneObjectGroup sog = Copy(false);
|
||||||
sog.m_isDeleted = false;
|
sog.m_isDeleted = false;
|
||||||
return sog;
|
return sog;
|
||||||
}
|
}
|
||||||
|
|
|
@ -358,7 +358,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
|
UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
|
||||||
Quaternion rotationOffset, Vector3 offsetPosition)
|
Quaternion rotationOffset, Vector3 offsetPosition)
|
||||||
{
|
{
|
||||||
m_name = "Primitive";
|
m_name = "Object";
|
||||||
|
|
||||||
Rezzed = DateTime.UtcNow;
|
Rezzed = DateTime.UtcNow;
|
||||||
_creationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
|
_creationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
|
||||||
|
@ -697,7 +697,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
get { return m_offsetPosition; }
|
get { return m_offsetPosition; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
StoreUndoState();
|
StoreUndoState(UndoType.STATE_PRIM_POSITION);
|
||||||
m_offsetPosition = value;
|
m_offsetPosition = value;
|
||||||
|
|
||||||
if (ParentGroup != null && !ParentGroup.IsDeleted)
|
if (ParentGroup != null && !ParentGroup.IsDeleted)
|
||||||
|
@ -759,7 +759,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
StoreUndoState();
|
StoreUndoState(UndoType.STATE_PRIM_ROTATION);
|
||||||
m_rotationOffset = value;
|
m_rotationOffset = value;
|
||||||
|
|
||||||
PhysicsActor actor = PhysActor;
|
PhysicsActor actor = PhysActor;
|
||||||
|
@ -958,7 +958,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
get { return m_shape.Scale; }
|
get { return m_shape.Scale; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
StoreUndoState();
|
StoreUndoState(UndoType.STATE_PRIM_SCALE);
|
||||||
if (m_shape != null)
|
if (m_shape != null)
|
||||||
{
|
{
|
||||||
m_shape.Scale = value;
|
m_shape.Scale = value;
|
||||||
|
@ -1522,7 +1522,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
m_redo.Clear();
|
m_redo.Clear();
|
||||||
}
|
}
|
||||||
StoreUndoState();
|
StoreUndoState(UndoType.STATE_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte ConvertScriptUintToByte(uint indata)
|
public byte ConvertScriptUintToByte(uint indata)
|
||||||
|
@ -1625,7 +1625,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
PrimitiveBaseShape shape = PrimitiveBaseShape.Create();
|
PrimitiveBaseShape shape = PrimitiveBaseShape.Create();
|
||||||
part.Shape = shape;
|
part.Shape = shape;
|
||||||
|
|
||||||
part.Name = "Primitive";
|
part.Name = "Object";
|
||||||
part._ownerID = UUID.Random();
|
part._ownerID = UUID.Random();
|
||||||
|
|
||||||
return part;
|
return part;
|
||||||
|
@ -2721,7 +2721,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="scale"></param>
|
/// <param name="scale"></param>
|
||||||
public void Resize(Vector3 scale)
|
public void Resize(Vector3 scale)
|
||||||
{
|
{
|
||||||
StoreUndoState();
|
StoreUndoState(UndoType.STATE_PRIM_SCALE);
|
||||||
m_shape.Scale = scale;
|
m_shape.Scale = scale;
|
||||||
|
|
||||||
ParentGroup.HasGroupChanged = true;
|
ParentGroup.HasGroupChanged = true;
|
||||||
|
@ -3504,10 +3504,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_parentGroup.ScheduleGroupForTerseUpdate();
|
m_parentGroup.ScheduleGroupForTerseUpdate();
|
||||||
//m_parentGroup.ScheduleGroupForFullUpdate();
|
//m_parentGroup.ScheduleGroupForFullUpdate();
|
||||||
}
|
}
|
||||||
|
public void StoreUndoState(UndoType type)
|
||||||
public void StoreUndoState()
|
|
||||||
{
|
{
|
||||||
if (!Undoing)
|
if (!Undoing && (m_parentGroup == null || m_parentGroup.RootPart == null || !m_parentGroup.RootPart.Undoing))
|
||||||
{
|
{
|
||||||
if (!IgnoreUndoUpdate)
|
if (!IgnoreUndoUpdate)
|
||||||
{
|
{
|
||||||
|
@ -3518,17 +3517,25 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (m_undo.Count > 0)
|
if (m_undo.Count > 0)
|
||||||
{
|
{
|
||||||
UndoState last = m_undo.Peek();
|
UndoState last = m_undo.Peek();
|
||||||
if (last != null)
|
|
||||||
{
|
|
||||||
if (last.Compare(this))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_parentGroup.GetSceneMaxUndo() > 0)
|
if (m_parentGroup.GetSceneMaxUndo() > 0)
|
||||||
{
|
{
|
||||||
UndoState nUndo = new UndoState(this);
|
UndoState lastUndo = m_undo.Peek();
|
||||||
|
|
||||||
|
UndoState nUndo = new UndoState(this, type);
|
||||||
|
|
||||||
|
if (lastUndo != null)
|
||||||
|
{
|
||||||
|
TimeSpan ts = DateTime.Now.Subtract(lastUndo.LastUpdated);
|
||||||
|
if (ts.TotalMilliseconds < 500)
|
||||||
|
{
|
||||||
|
//Delete the last entry since it was less than 500 milliseconds ago
|
||||||
|
nUndo.Merge(lastUndo);
|
||||||
|
m_undo.Pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
m_undo.Push(nUndo);
|
m_undo.Push(nUndo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4005,11 +4012,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (m_undo.Count > 0)
|
if (m_undo.Count > 0)
|
||||||
{
|
{
|
||||||
UndoState nUndo = null;
|
UndoState nUndo = null;
|
||||||
|
UndoState goback = m_undo.Pop();
|
||||||
if (m_parentGroup.GetSceneMaxUndo() > 0)
|
if (m_parentGroup.GetSceneMaxUndo() > 0)
|
||||||
{
|
{
|
||||||
nUndo = new UndoState(this);
|
nUndo = new UndoState(this, goback.Type);
|
||||||
}
|
}
|
||||||
UndoState goback = m_undo.Pop();
|
|
||||||
|
|
||||||
if (goback != null)
|
if (goback != null)
|
||||||
{
|
{
|
||||||
goback.PlaybackState(this);
|
goback.PlaybackState(this);
|
||||||
|
@ -4024,13 +4033,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
lock (m_redo)
|
lock (m_redo)
|
||||||
{
|
{
|
||||||
|
UndoState gofwd = m_redo.Pop();
|
||||||
if (m_parentGroup.GetSceneMaxUndo() > 0)
|
if (m_parentGroup.GetSceneMaxUndo() > 0)
|
||||||
{
|
{
|
||||||
UndoState nUndo = new UndoState(this);
|
UndoState nUndo = new UndoState(this, gofwd.Type);
|
||||||
|
|
||||||
m_undo.Push(nUndo);
|
m_undo.Push(nUndo);
|
||||||
}
|
}
|
||||||
UndoState gofwd = m_redo.Pop();
|
|
||||||
if (gofwd != null)
|
if (gofwd != null)
|
||||||
gofwd.PlayfwdState(this);
|
gofwd.PlayfwdState(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3730,10 +3730,13 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
|
||||||
{
|
{
|
||||||
CollidingMessage.Colliders = colliding;
|
CollidingMessage.Colliders = colliding;
|
||||||
|
|
||||||
foreach (SceneObjectGroup att in Attachments)
|
lock (m_attachments)
|
||||||
|
{
|
||||||
|
foreach (SceneObjectGroup att in m_attachments)
|
||||||
Scene.EventManager.TriggerScriptColliding(att.LocalId, CollidingMessage);
|
Scene.EventManager.TriggerScriptColliding(att.LocalId, CollidingMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (m_invulnerable)
|
if (m_invulnerable)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -105,7 +105,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
sceneObject.AddPart(part);
|
sceneObject.AddPart(part);
|
||||||
part.LinkNum = linkNum;
|
part.LinkNum = linkNum;
|
||||||
part.TrimPermissions();
|
part.TrimPermissions();
|
||||||
part.StoreUndoState();
|
part.StoreUndoState(UndoType.STATE_ALL);
|
||||||
reader.Close();
|
reader.Close();
|
||||||
sr.Close();
|
sr.Close();
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
if (originalLinkNum != 0)
|
if (originalLinkNum != 0)
|
||||||
part.LinkNum = originalLinkNum;
|
part.LinkNum = originalLinkNum;
|
||||||
|
|
||||||
part.StoreUndoState();
|
part.StoreUndoState(UndoType.STATE_ALL);
|
||||||
reader.Close();
|
reader.Close();
|
||||||
sr.Close();
|
sr.Close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,48 +27,125 @@
|
||||||
|
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Scenes
|
namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
|
[Flags]
|
||||||
|
public enum UndoType
|
||||||
|
{
|
||||||
|
STATE_PRIM_POSITION = 1,
|
||||||
|
STATE_PRIM_ROTATION = 2,
|
||||||
|
STATE_PRIM_SCALE = 4,
|
||||||
|
STATE_PRIM_ALL = 7,
|
||||||
|
STATE_GROUP_POSITION = 8,
|
||||||
|
STATE_GROUP_ROTATION = 16,
|
||||||
|
STATE_GROUP_SCALE = 32,
|
||||||
|
STATE_GROUP_ALL = 56,
|
||||||
|
STATE_ALL = 63
|
||||||
|
}
|
||||||
|
|
||||||
public class UndoState
|
public class UndoState
|
||||||
{
|
{
|
||||||
public Vector3 Position = Vector3.Zero;
|
public Vector3 Position = Vector3.Zero;
|
||||||
public Vector3 Scale = Vector3.Zero;
|
public Vector3 Scale = Vector3.Zero;
|
||||||
public Quaternion Rotation = Quaternion.Identity;
|
public Quaternion Rotation = Quaternion.Identity;
|
||||||
|
public Vector3 GroupPosition = Vector3.Zero;
|
||||||
|
public Quaternion GroupRotation = Quaternion.Identity;
|
||||||
|
public Vector3 GroupScale = Vector3.Zero;
|
||||||
|
public DateTime LastUpdated = DateTime.Now;
|
||||||
|
public UndoType Type;
|
||||||
|
|
||||||
public UndoState(SceneObjectPart part)
|
public UndoState(SceneObjectPart part, UndoType type)
|
||||||
{
|
{
|
||||||
|
Type = type;
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
if (part.ParentID == 0)
|
if (part.ParentID == 0)
|
||||||
{
|
{
|
||||||
Position = part.ParentGroup.AbsolutePosition;
|
GroupScale = part.ParentGroup.RootPart.Shape.Scale;
|
||||||
|
|
||||||
|
//FUBAR WARNING: Do NOT get the group's absoluteposition here
|
||||||
|
//or you'll experience a loop and/or a stack issue
|
||||||
|
GroupPosition = part.ParentGroup.RootPart.AbsolutePosition;
|
||||||
|
GroupRotation = part.ParentGroup.GroupRotation;
|
||||||
|
Position = part.ParentGroup.RootPart.AbsolutePosition;
|
||||||
Rotation = part.RotationOffset;
|
Rotation = part.RotationOffset;
|
||||||
Scale = part.Shape.Scale;
|
Scale = part.Shape.Scale;
|
||||||
|
LastUpdated = DateTime.Now;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
GroupScale = part.Shape.Scale;
|
||||||
|
|
||||||
|
//FUBAR WARNING: Do NOT get the group's absoluteposition here
|
||||||
|
//or you'll experience a loop and/or a stack issue
|
||||||
|
GroupPosition = part.ParentGroup.RootPart.AbsolutePosition;
|
||||||
|
GroupRotation = part.ParentGroup.Rotation;
|
||||||
Position = part.OffsetPosition;
|
Position = part.OffsetPosition;
|
||||||
Rotation = part.RotationOffset;
|
Rotation = part.RotationOffset;
|
||||||
Scale = part.Shape.Scale;
|
Scale = part.Shape.Scale;
|
||||||
|
LastUpdated = DateTime.Now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void Merge(UndoState last)
|
||||||
|
{
|
||||||
|
if ((Type & UndoType.STATE_GROUP_POSITION) == 0 || ((last.Type & UndoType.STATE_GROUP_POSITION) >= (Type & UndoType.STATE_GROUP_POSITION)))
|
||||||
|
{
|
||||||
|
GroupPosition = last.GroupPosition;
|
||||||
|
Position = last.Position;
|
||||||
|
}
|
||||||
|
if ((Type & UndoType.STATE_GROUP_SCALE) == 0 || ((last.Type & UndoType.STATE_GROUP_SCALE) >= (Type & UndoType.STATE_GROUP_SCALE)))
|
||||||
|
{
|
||||||
|
GroupScale = last.GroupScale;
|
||||||
|
Scale = last.Scale;
|
||||||
|
}
|
||||||
|
if ((Type & UndoType.STATE_GROUP_ROTATION) == 0 || ((last.Type & UndoType.STATE_GROUP_ROTATION) >= (Type & UndoType.STATE_GROUP_ROTATION)))
|
||||||
|
{
|
||||||
|
GroupRotation = last.GroupRotation;
|
||||||
|
Rotation = last.Rotation;
|
||||||
|
}
|
||||||
|
if ((Type & UndoType.STATE_PRIM_POSITION) == 0 || ((last.Type & UndoType.STATE_PRIM_POSITION) >= (Type & UndoType.STATE_PRIM_POSITION)))
|
||||||
|
{
|
||||||
|
Position = last.Position;
|
||||||
|
}
|
||||||
|
if ((Type & UndoType.STATE_PRIM_SCALE) == 0 || ((last.Type & UndoType.STATE_PRIM_SCALE) >= (Type & UndoType.STATE_PRIM_SCALE)))
|
||||||
|
{
|
||||||
|
Scale = last.Scale;
|
||||||
|
}
|
||||||
|
if ((Type & UndoType.STATE_PRIM_ROTATION) == 0 || ((last.Type & UndoType.STATE_PRIM_ROTATION) >= (Type & UndoType.STATE_PRIM_ROTATION)))
|
||||||
|
{
|
||||||
|
Rotation = last.Rotation;
|
||||||
|
}
|
||||||
|
Type = Type | last.Type;
|
||||||
|
}
|
||||||
|
public bool Compare(UndoState undo)
|
||||||
|
{
|
||||||
|
if (undo == null || Position == null) return false;
|
||||||
|
if (undo.Position == Position && undo.Rotation == Rotation && undo.Scale == Scale && undo.GroupPosition == GroupPosition && undo.GroupScale == GroupScale && undo.GroupRotation == GroupRotation)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
public bool Compare(SceneObjectPart part)
|
public bool Compare(SceneObjectPart part)
|
||||||
{
|
{
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
if (part.ParentID == 0)
|
if (part.ParentID == 0)
|
||||||
{
|
{
|
||||||
if (Position == part.ParentGroup.AbsolutePosition && Rotation == part.ParentGroup.Rotation)
|
if (Position == part.ParentGroup.RootPart.AbsolutePosition && Rotation == part.ParentGroup.Rotation && GroupPosition == part.ParentGroup.RootPart.AbsolutePosition && part.ParentGroup.Rotation == GroupRotation && part.Shape.Scale == GroupScale)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Position == part.OffsetPosition && Rotation == part.RotationOffset && Scale == part.Shape.Scale)
|
if (Position == part.OffsetPosition && Rotation == part.RotationOffset && Scale == part.Shape.Scale && GroupPosition == part.ParentGroup.RootPart.AbsolutePosition && part.ParentGroup.Rotation == GroupRotation && part.Shape.Scale == GroupScale)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
@ -78,62 +155,70 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PlaybackState(SceneObjectPart part)
|
private void RestoreState(SceneObjectPart part)
|
||||||
{
|
{
|
||||||
|
bool GroupChange = false;
|
||||||
|
if ((Type & UndoType.STATE_GROUP_POSITION) != 0
|
||||||
|
|| (Type & UndoType.STATE_GROUP_ROTATION) != 0
|
||||||
|
|| (Type & UndoType.STATE_GROUP_SCALE) != 0)
|
||||||
|
{
|
||||||
|
GroupChange = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
part.Undoing = true;
|
part.Undoing = true;
|
||||||
|
|
||||||
if (part.ParentID == 0)
|
if (part.ParentID == 0 && GroupChange == false)
|
||||||
{
|
{
|
||||||
if (Position != Vector3.Zero)
|
if (Position != Vector3.Zero)
|
||||||
part.ParentGroup.AbsolutePosition = Position;
|
|
||||||
part.RotationOffset = Rotation;
|
part.ParentGroup.UpdateSinglePosition(Position, part.LocalId);
|
||||||
|
part.ParentGroup.UpdateSingleRotation(Rotation, part.LocalId);
|
||||||
if (Scale != Vector3.Zero)
|
if (Scale != Vector3.Zero)
|
||||||
part.Resize(Scale);
|
part.Resize(Scale);
|
||||||
part.ParentGroup.ScheduleGroupForTerseUpdate();
|
part.ParentGroup.ScheduleGroupForTerseUpdate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Position != Vector3.Zero)
|
if (GroupChange)
|
||||||
|
{
|
||||||
|
part.ParentGroup.RootPart.Undoing = true;
|
||||||
|
if (GroupPosition != Vector3.Zero)
|
||||||
|
{
|
||||||
|
//Calculate the scale...
|
||||||
|
Vector3 gs = part.Shape.Scale;
|
||||||
|
float scale = GroupScale.Z / gs.Z;
|
||||||
|
|
||||||
|
//Scale first since it can affect our position
|
||||||
|
part.ParentGroup.GroupResize(gs * scale, part.LocalId);
|
||||||
|
part.ParentGroup.AbsolutePosition = GroupPosition;
|
||||||
|
part.ParentGroup.UpdateGroupRotationR(GroupRotation);
|
||||||
|
|
||||||
|
}
|
||||||
|
part.ParentGroup.RootPart.Undoing = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Position != Vector3.Zero) //We can use this for all the updates since all are set
|
||||||
|
{
|
||||||
part.OffsetPosition = Position;
|
part.OffsetPosition = Position;
|
||||||
part.UpdateRotation(Rotation);
|
part.UpdateRotation(Rotation);
|
||||||
if (Scale != Vector3.Zero)
|
|
||||||
part.Resize(Scale); part.ScheduleTerseUpdate();
|
part.Resize(Scale); part.ScheduleTerseUpdate();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
part.Undoing = false;
|
part.Undoing = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void PlaybackState(SceneObjectPart part)
|
||||||
|
{
|
||||||
|
RestoreState(part);
|
||||||
|
}
|
||||||
public void PlayfwdState(SceneObjectPart part)
|
public void PlayfwdState(SceneObjectPart part)
|
||||||
{
|
{
|
||||||
if (part != null)
|
RestoreState(part);
|
||||||
{
|
|
||||||
part.Undoing = true;
|
|
||||||
|
|
||||||
if (part.ParentID == 0)
|
|
||||||
{
|
|
||||||
if (Position != Vector3.Zero)
|
|
||||||
part.ParentGroup.AbsolutePosition = Position;
|
|
||||||
if (Rotation != Quaternion.Identity)
|
|
||||||
part.UpdateRotation(Rotation);
|
|
||||||
if (Scale != Vector3.Zero)
|
|
||||||
part.Resize(Scale);
|
|
||||||
part.ParentGroup.ScheduleGroupForTerseUpdate();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (Position != Vector3.Zero)
|
|
||||||
part.OffsetPosition = Position;
|
|
||||||
if (Rotation != Quaternion.Identity)
|
|
||||||
part.UpdateRotation(Rotation);
|
|
||||||
if (Scale != Vector3.Zero)
|
|
||||||
part.Resize(Scale);
|
|
||||||
part.ScheduleTerseUpdate();
|
|
||||||
}
|
|
||||||
part.Undoing = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class LandUndoState
|
public class LandUndoState
|
||||||
|
@ -161,3 +246,4 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -722,11 +722,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
if (money != null)
|
if (money != null)
|
||||||
{
|
{
|
||||||
// do the transaction, that is if the agent has got sufficient funds
|
// do the transaction, that is if the agent has got sufficient funds
|
||||||
if (!money.GroupCreationCovered(remoteClient)) {
|
if (!money.AmountCovered(remoteClient, money.GroupCreationCharge)) {
|
||||||
remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group.");
|
remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group.");
|
||||||
return UUID.Zero;
|
return UUID.Zero;
|
||||||
}
|
}
|
||||||
money.ApplyGroupCreationCharge(GetRequestingAgentID(remoteClient));
|
money.ApplyCharge(GetRequestingAgentID(remoteClient), money.GroupCreationCharge, "Group Creation");
|
||||||
}
|
}
|
||||||
UUID groupID = m_groupData.CreateGroup(GetRequestingAgentID(remoteClient), name, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish, GetRequestingAgentID(remoteClient));
|
UUID groupID = m_groupData.CreateGroup(GetRequestingAgentID(remoteClient), name, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish, GetRequestingAgentID(remoteClient));
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
|
||||||
public ContentManagementEntity(SceneObjectGroup Unchanged, bool physics)
|
public ContentManagementEntity(SceneObjectGroup Unchanged, bool physics)
|
||||||
: base(Unchanged, false)
|
: base(Unchanged, false)
|
||||||
{
|
{
|
||||||
m_UnchangedEntity = Unchanged.Copy(Unchanged.RootPart.OwnerID, Unchanged.RootPart.GroupID, false);
|
m_UnchangedEntity = Unchanged.Copy(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ContentManagementEntity(string objectXML, Scene scene, bool physics)
|
public ContentManagementEntity(string objectXML, Scene scene, bool physics)
|
||||||
|
|
|
@ -80,7 +80,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public MetaEntity(SceneObjectGroup orig, bool physics)
|
public MetaEntity(SceneObjectGroup orig, bool physics)
|
||||||
{
|
{
|
||||||
m_Entity = orig.Copy(orig.RootPart.OwnerID, orig.RootPart.GroupID, false);
|
m_Entity = orig.Copy(false);
|
||||||
Initialize(physics);
|
Initialize(physics);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,16 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
|
||||||
|
|
||||||
public event ObjectPaid OnObjectPaid;
|
public event ObjectPaid OnObjectPaid;
|
||||||
|
|
||||||
|
public int UploadCharge
|
||||||
|
{
|
||||||
|
get { return 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GroupCreationCharge
|
||||||
|
{
|
||||||
|
get { return 0; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Startup
|
/// Startup
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -188,17 +198,12 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
|
||||||
// Please do not refactor these to be just one method
|
// Please do not refactor these to be just one method
|
||||||
// Existing implementations need the distinction
|
// Existing implementations need the distinction
|
||||||
//
|
//
|
||||||
public void ApplyUploadCharge(UUID agentID)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ApplyGroupCreationCharge(UUID agentID)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ApplyCharge(UUID agentID, int amount, string text)
|
public void ApplyCharge(UUID agentID, int amount, string text)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
public void ApplyUploadCharge(UUID agentID, int amount, string text)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount)
|
public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount)
|
||||||
{
|
{
|
||||||
|
@ -268,27 +273,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public EconomyData GetEconomyData()
|
|
||||||
{
|
|
||||||
EconomyData edata = new EconomyData();
|
|
||||||
edata.ObjectCapacity = ObjectCapacity;
|
|
||||||
edata.ObjectCount = ObjectCount;
|
|
||||||
edata.PriceEnergyUnit = PriceEnergyUnit;
|
|
||||||
edata.PriceGroupCreate = PriceGroupCreate;
|
|
||||||
edata.PriceObjectClaim = PriceObjectClaim;
|
|
||||||
edata.PriceObjectRent = PriceObjectRent;
|
|
||||||
edata.PriceObjectScaleFactor = PriceObjectScaleFactor;
|
|
||||||
edata.PriceParcelClaim = PriceParcelClaim;
|
|
||||||
edata.PriceParcelClaimFactor = PriceParcelClaimFactor;
|
|
||||||
edata.PriceParcelRent = PriceParcelRent;
|
|
||||||
edata.PricePublicObjectDecay = PricePublicObjectDecay;
|
|
||||||
edata.PricePublicObjectDelete = PricePublicObjectDelete;
|
|
||||||
edata.PriceRentLight = PriceRentLight;
|
|
||||||
edata.PriceUpload = PriceUpload;
|
|
||||||
edata.TeleportMinPrice = TeleportMinPrice;
|
|
||||||
return edata;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void GetClientFunds(IClientAPI client)
|
private void GetClientFunds(IClientAPI client)
|
||||||
{
|
{
|
||||||
CheckExistAndRefreshFunds(client.AgentId);
|
CheckExistAndRefreshFunds(client.AgentId);
|
||||||
|
@ -790,7 +774,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
|
||||||
//m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString());
|
//m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetBalance(IClientAPI client)
|
public int GetBalance(UUID agentID)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -798,16 +782,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
|
||||||
// Please do not refactor these to be just one method
|
// Please do not refactor these to be just one method
|
||||||
// Existing implementations need the distinction
|
// Existing implementations need the distinction
|
||||||
//
|
//
|
||||||
public bool UploadCovered(IClientAPI client)
|
public bool UploadCovered(IClientAPI client, int amount)
|
||||||
{
|
{
|
||||||
return AmountCovered(client, PriceUpload);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool GroupCreationCovered(IClientAPI client)
|
|
||||||
{
|
|
||||||
return AmountCovered(client, PriceGroupCreate);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool AmountCovered(IClientAPI client, int amount)
|
public bool AmountCovered(IClientAPI client, int amount)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -675,7 +675,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
m_dir.Z = vel_now.Z; // Preserve the accumulated falling velocity
|
m_dir.Z = vel_now.Z; // Preserve the accumulated falling velocity
|
||||||
|
|
||||||
d.Vector3 pos = d.BodyGetPosition(Body);
|
d.Vector3 pos = d.BodyGetPosition(Body);
|
||||||
Vector3 accel = new Vector3(-(m_dir.X - m_lastLinearVelocityVector.X / 0.1f), -(m_dir.Y - m_lastLinearVelocityVector.Y / 0.1f), m_dir.Z - m_lastLinearVelocityVector.Z / 0.1f);
|
// Vector3 accel = new Vector3(-(m_dir.X - m_lastLinearVelocityVector.X / 0.1f), -(m_dir.Y - m_lastLinearVelocityVector.Y / 0.1f), m_dir.Z - m_lastLinearVelocityVector.Z / 0.1f);
|
||||||
Vector3 posChange = new Vector3();
|
Vector3 posChange = new Vector3();
|
||||||
posChange.X = pos.X - m_lastPositionVector.X;
|
posChange.X = pos.X - m_lastPositionVector.X;
|
||||||
posChange.Y = pos.Y - m_lastPositionVector.Y;
|
posChange.Y = pos.Y - m_lastPositionVector.Y;
|
||||||
|
|
|
@ -1576,19 +1576,19 @@ Console.WriteLine(" JointCreateFixed");
|
||||||
//Console.WriteLine("Move " + m_primName);
|
//Console.WriteLine("Move " + m_primName);
|
||||||
if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009
|
if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009
|
||||||
// NON-'VEHICLES' are dealt with here
|
// NON-'VEHICLES' are dealt with here
|
||||||
if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f))
|
// if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f))
|
||||||
{
|
// {
|
||||||
d.Vector3 avel2 = d.BodyGetAngularVel(Body);
|
// d.Vector3 avel2 = d.BodyGetAngularVel(Body);
|
||||||
/*
|
// /*
|
||||||
if (m_angularlock.X == 1)
|
// if (m_angularlock.X == 1)
|
||||||
avel2.X = 0;
|
// avel2.X = 0;
|
||||||
if (m_angularlock.Y == 1)
|
// if (m_angularlock.Y == 1)
|
||||||
avel2.Y = 0;
|
// avel2.Y = 0;
|
||||||
if (m_angularlock.Z == 1)
|
// if (m_angularlock.Z == 1)
|
||||||
avel2.Z = 0;
|
// avel2.Z = 0;
|
||||||
d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z);
|
// d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z);
|
||||||
*/
|
// */
|
||||||
}
|
// }
|
||||||
//float PID_P = 900.0f;
|
//float PID_P = 900.0f;
|
||||||
|
|
||||||
float m_mass = CalculateMass();
|
float m_mass = CalculateMass();
|
||||||
|
|
|
@ -3252,7 +3252,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here
|
msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here
|
||||||
// m_log.Debug("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message);
|
// m_log.Debug("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message);
|
||||||
// m_log.Debug("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString());
|
// m_log.Debug("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString());
|
||||||
msg.timestamp = (uint)Util.UnixTimeSinceEpoch();// timestamp;
|
DateTime dt = DateTime.UtcNow;
|
||||||
|
|
||||||
|
// Ticks from UtcNow, but make it look like local. Evil, huh?
|
||||||
|
dt = DateTime.SpecifyKind(dt, DateTimeKind.Local);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Convert that to the PST timezone
|
||||||
|
TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("America/Los_Angeles");
|
||||||
|
dt = TimeZoneInfo.ConvertTime(dt, timeZoneInfo);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// No logging here, as it could be VERY spammy
|
||||||
|
}
|
||||||
|
|
||||||
|
// And make it look local again to fool the unix time util
|
||||||
|
dt = DateTime.SpecifyKind(dt, DateTimeKind.Utc);
|
||||||
|
|
||||||
|
msg.timestamp = (uint)Util.ToUnixTime(dt);
|
||||||
|
|
||||||
//if (client != null)
|
//if (client != null)
|
||||||
//{
|
//{
|
||||||
msg.fromAgentName = m_host.Name;//client.FirstName + " " + client.LastName;// fromAgentName;
|
msg.fromAgentName = m_host.Name;//client.FirstName + " " + client.LastName;// fromAgentName;
|
||||||
|
@ -5247,7 +5267,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
case ',':
|
case ',':
|
||||||
if (parens == 0)
|
if (parens == 0)
|
||||||
{
|
{
|
||||||
result.Add(src.Substring(start,length).Trim());
|
result.Add(new LSL_String(src.Substring(start,length).Trim()));
|
||||||
start += length+1;
|
start += length+1;
|
||||||
length = 0;
|
length = 0;
|
||||||
}
|
}
|
||||||
|
@ -9369,7 +9389,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
if (aList.Data[i] != null)
|
if (aList.Data[i] != null)
|
||||||
{
|
{
|
||||||
switch ((ParcelMediaCommandEnum) aList.Data[i])
|
switch ((ParcelMediaCommandEnum) Convert.ToInt32(aList.Data[i].ToString()))
|
||||||
{
|
{
|
||||||
case ParcelMediaCommandEnum.Url:
|
case ParcelMediaCommandEnum.Url:
|
||||||
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaURL));
|
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaURL));
|
||||||
|
@ -9804,19 +9824,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public LSL_String llXorBase64StringsCorrect(string str1, string str2)
|
public LSL_String llXorBase64StringsCorrect(string str1, string str2)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
string ret = String.Empty;
|
|
||||||
string src1 = llBase64ToString(str1);
|
|
||||||
string src2 = llBase64ToString(str2);
|
|
||||||
int c = 0;
|
|
||||||
for (int i = 0; i < src1.Length; i++)
|
|
||||||
{
|
|
||||||
ret += (char) (src1[i] ^ src2[c]);
|
|
||||||
|
|
||||||
c++;
|
if (str1 == String.Empty)
|
||||||
if (c >= src2.Length)
|
return String.Empty;
|
||||||
c = 0;
|
if (str2 == String.Empty)
|
||||||
|
return str1;
|
||||||
|
|
||||||
|
byte[] data1 = Convert.FromBase64String(str1);
|
||||||
|
byte[] data2 = Convert.FromBase64String(str2);
|
||||||
|
|
||||||
|
byte[] d2 = new Byte[data1.Length];
|
||||||
|
int pos = 0;
|
||||||
|
|
||||||
|
if (data1.Length <= data2.Length)
|
||||||
|
{
|
||||||
|
Array.Copy(data2, 0, d2, 0, data1.Length);
|
||||||
}
|
}
|
||||||
return llStringToBase64(ret);
|
else
|
||||||
|
{
|
||||||
|
while (pos < data1.Length)
|
||||||
|
{
|
||||||
|
int len = data1.Length - pos;
|
||||||
|
if (len > data2.Length)
|
||||||
|
len = data2.Length;
|
||||||
|
|
||||||
|
Array.Copy(data2, 0, d2, pos, len);
|
||||||
|
pos += len;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (pos = 0 ; pos < data1.Length ; pos++ )
|
||||||
|
data1[pos] ^= d2[pos];
|
||||||
|
|
||||||
|
return Convert.ToBase64String(data1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LSL_String llHTTPRequest(string url, LSL_List parameters, string body)
|
public LSL_String llHTTPRequest(string url, LSL_List parameters, string body)
|
||||||
|
|
|
@ -73,6 +73,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if (m_ScriptEngine.Config.GetBoolean("AllowLightShareFunctions", false))
|
if (m_ScriptEngine.Config.GetBoolean("AllowLightShareFunctions", false))
|
||||||
m_LSFunctionsEnabled = true;
|
m_LSFunctionsEnabled = true;
|
||||||
|
|
||||||
|
if (m_ScriptEngine.Config.GetBoolean("AllowCareminsterFunctions", false))
|
||||||
|
m_LSFunctionsEnabled = true;
|
||||||
|
|
||||||
m_comms = m_ScriptEngine.World.RequestModuleInterface<IScriptModuleComms>();
|
m_comms = m_ScriptEngine.World.RequestModuleInterface<IScriptModuleComms>();
|
||||||
if (m_comms == null)
|
if (m_comms == null)
|
||||||
m_LSFunctionsEnabled = false;
|
m_LSFunctionsEnabled = false;
|
||||||
|
|
|
@ -663,13 +663,13 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
Object[] ret;
|
Object[] ret;
|
||||||
|
|
||||||
if (start < 0)
|
if (start < 0)
|
||||||
start=m_data.Length-start;
|
start=m_data.Length+start;
|
||||||
|
|
||||||
if (start < 0)
|
if (start < 0)
|
||||||
start=0;
|
start=0;
|
||||||
|
|
||||||
if (end < 0)
|
if (end < 0)
|
||||||
end=m_data.Length-end;
|
end=m_data.Length+end;
|
||||||
if (end < 0)
|
if (end < 0)
|
||||||
end=0;
|
end=0;
|
||||||
|
|
||||||
|
|
|
@ -556,6 +556,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
|
|
||||||
if (stateSource == (int)StateSource.ScriptedRez)
|
if (stateSource == (int)StateSource.ScriptedRez)
|
||||||
{
|
{
|
||||||
|
lock (m_CompileDict)
|
||||||
|
{
|
||||||
|
m_CompileDict[itemID] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
DoOnRezScript(parms);
|
DoOnRezScript(parms);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -835,8 +840,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
item.Name, startParam, postOnRez,
|
item.Name, startParam, postOnRez,
|
||||||
stateSource, m_MaxScriptQueue);
|
stateSource, m_MaxScriptQueue);
|
||||||
|
|
||||||
m_log.DebugFormat("[XEngine] Loaded script {0}.{1}, script UUID {2}, prim UUID {3} @ {4}",
|
m_log.DebugFormat(
|
||||||
part.ParentGroup.RootPart.Name, item.Name, assetID, part.UUID, part.ParentGroup.RootPart.AbsolutePosition.ToString());
|
"[XEngine] Loaded script {0}.{1}, script UUID {2}, prim UUID {3} @ {4}.{5}",
|
||||||
|
part.ParentGroup.RootPart.Name, item.Name, assetID, part.UUID,
|
||||||
|
part.ParentGroup.RootPart.AbsolutePosition, part.ParentGroup.Scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
if (presence != null)
|
if (presence != null)
|
||||||
{
|
{
|
||||||
|
@ -1356,9 +1363,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
string xml = instance.GetXMLState();
|
string xml = instance.GetXMLState();
|
||||||
|
|
||||||
XmlDocument sdoc = new XmlDocument();
|
XmlDocument sdoc = new XmlDocument();
|
||||||
|
bool loadedState = true;
|
||||||
|
try
|
||||||
|
{
|
||||||
sdoc.LoadXml(xml);
|
sdoc.LoadXml(xml);
|
||||||
XmlNodeList rootL = sdoc.GetElementsByTagName("ScriptState");
|
}
|
||||||
XmlNode rootNode = rootL[0];
|
catch (System.Xml.XmlException e)
|
||||||
|
{
|
||||||
|
loadedState = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
XmlNodeList rootL = null;
|
||||||
|
XmlNode rootNode = null;
|
||||||
|
if (loadedState)
|
||||||
|
{
|
||||||
|
rootL = sdoc.GetElementsByTagName("ScriptState");
|
||||||
|
rootNode = rootL[0];
|
||||||
|
}
|
||||||
|
|
||||||
// Create <State UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
|
// Create <State UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
|
||||||
XmlDocument doc = new XmlDocument();
|
XmlDocument doc = new XmlDocument();
|
||||||
|
@ -1374,8 +1395,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
stateData.Attributes.Append(engineName);
|
stateData.Attributes.Append(engineName);
|
||||||
doc.AppendChild(stateData);
|
doc.AppendChild(stateData);
|
||||||
|
|
||||||
|
XmlNode xmlstate = null;
|
||||||
|
|
||||||
// Add <ScriptState>...</ScriptState>
|
// Add <ScriptState>...</ScriptState>
|
||||||
XmlNode xmlstate = doc.ImportNode(rootNode, true);
|
if (loadedState)
|
||||||
|
{
|
||||||
|
xmlstate = doc.ImportNode(rootNode, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xmlstate = doc.CreateElement("", "ScriptState", "");
|
||||||
|
}
|
||||||
|
|
||||||
stateData.AppendChild(xmlstate);
|
stateData.AppendChild(xmlstate);
|
||||||
|
|
||||||
string assemName = instance.GetAssemblyName();
|
string assemName = instance.GetAssemblyName();
|
||||||
|
|
|
@ -230,6 +230,12 @@ namespace OpenSim.Server.Base
|
||||||
"shutdown",
|
"shutdown",
|
||||||
"Quit the application", HandleQuit);
|
"Quit the application", HandleQuit);
|
||||||
|
|
||||||
|
// Register a command to read other commands from a file
|
||||||
|
MainConsole.Instance.Commands.AddCommand("base", false, "command-script",
|
||||||
|
"command-script <script>",
|
||||||
|
"Run a command script from file", HandleScript);
|
||||||
|
|
||||||
|
|
||||||
// Allow derived classes to perform initialization that
|
// Allow derived classes to perform initialization that
|
||||||
// needs to be done after the console has opened
|
// needs to be done after the console has opened
|
||||||
//
|
//
|
||||||
|
@ -259,6 +265,41 @@ namespace OpenSim.Server.Base
|
||||||
m_log.Info("[CONSOLE] Quitting");
|
m_log.Info("[CONSOLE] Quitting");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual void HandleScript(string module, string[] parms)
|
||||||
|
{
|
||||||
|
if (parms.Length != 2)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RunCommandScript(parms[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Run an optional startup list of commands
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fileName"></param>
|
||||||
|
private void RunCommandScript(string fileName)
|
||||||
|
{
|
||||||
|
if (File.Exists(fileName))
|
||||||
|
{
|
||||||
|
m_log.Info("[COMMANDFILE]: Running " + fileName);
|
||||||
|
|
||||||
|
using (StreamReader readFile = File.OpenText(fileName))
|
||||||
|
{
|
||||||
|
string currentCommand;
|
||||||
|
while ((currentCommand = readFile.ReadLine()) != null)
|
||||||
|
{
|
||||||
|
if (currentCommand != String.Empty)
|
||||||
|
{
|
||||||
|
m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
|
||||||
|
MainConsole.Instance.RunCommand(currentCommand);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected virtual void ReadConfig()
|
protected virtual void ReadConfig()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
{
|
{
|
||||||
public class XInventoryInConnector : ServiceConnector
|
public class XInventoryInConnector : ServiceConnector
|
||||||
{
|
{
|
||||||
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private IInventoryService m_InventoryService;
|
private IInventoryService m_InventoryService;
|
||||||
private string m_ConfigName = "InventoryService";
|
private string m_ConfigName = "InventoryService";
|
||||||
|
|
||||||
|
@ -53,6 +55,8 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
if (configName != String.Empty)
|
if (configName != String.Empty)
|
||||||
m_ConfigName = configName;
|
m_ConfigName = configName;
|
||||||
|
|
||||||
|
m_log.DebugFormat("[XInventoryInConnector]: Starting with config name {0}", m_ConfigName);
|
||||||
|
|
||||||
IConfig serverConfig = config.Configs[m_ConfigName];
|
IConfig serverConfig = config.Configs[m_ConfigName];
|
||||||
if (serverConfig == null)
|
if (serverConfig == null)
|
||||||
throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
|
throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
|
||||||
|
|
|
@ -277,7 +277,7 @@ namespace OpenSim.Server.Handlers.Simulation
|
||||||
//responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp); ??? instead
|
//responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp); ??? instead
|
||||||
}
|
}
|
||||||
|
|
||||||
// subclasses cab override this
|
// subclasses can override this
|
||||||
protected virtual bool UpdateAgent(GridRegion destination, AgentData agent)
|
protected virtual bool UpdateAgent(GridRegion destination, AgentData agent)
|
||||||
{
|
{
|
||||||
return m_SimulationService.UpdateAgent(destination, agent);
|
return m_SimulationService.UpdateAgent(destination, agent);
|
||||||
|
@ -285,6 +285,16 @@ namespace OpenSim.Server.Handlers.Simulation
|
||||||
|
|
||||||
protected virtual void DoAgentGet(Hashtable request, Hashtable responsedata, UUID id, UUID regionID)
|
protected virtual void DoAgentGet(Hashtable request, Hashtable responsedata, UUID id, UUID regionID)
|
||||||
{
|
{
|
||||||
|
if (m_SimulationService == null)
|
||||||
|
{
|
||||||
|
m_log.Debug("[AGENT HANDLER]: Agent GET called. Harmless but useless.");
|
||||||
|
responsedata["content_type"] = "application/json";
|
||||||
|
responsedata["int_response_code"] = HttpStatusCode.NotImplemented;
|
||||||
|
responsedata["str_response_string"] = string.Empty;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GridRegion destination = new GridRegion();
|
GridRegion destination = new GridRegion();
|
||||||
destination.RegionID = regionID;
|
destination.RegionID = regionID;
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,10 @@ namespace OpenSim.Services.AssetService
|
||||||
public string Store(AssetBase asset)
|
public string Store(AssetBase asset)
|
||||||
{
|
{
|
||||||
//m_log.DebugFormat("[ASSET SERVICE]: Store asset {0} {1}", asset.Name, asset.ID);
|
//m_log.DebugFormat("[ASSET SERVICE]: Store asset {0} {1}", asset.Name, asset.ID);
|
||||||
m_Database.StoreAsset(asset);
|
if (!m_Database.StoreAsset(asset))
|
||||||
|
{
|
||||||
|
return UUID.Zero.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
return asset.ID;
|
return asset.ID;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Timers;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
@ -48,7 +49,9 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
private string m_ServerURI = String.Empty;
|
private string m_ServerURI = String.Empty;
|
||||||
private IImprovedAssetCache m_Cache = null;
|
private IImprovedAssetCache m_Cache = null;
|
||||||
|
private int m_retryCounter;
|
||||||
|
private Dictionary<int, List<AssetBase>> m_retryQueue = new Dictionary<int, List<AssetBase>>();
|
||||||
|
private Timer m_retryTimer;
|
||||||
public AssetServicesConnector()
|
public AssetServicesConnector()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -85,6 +88,55 @@ namespace OpenSim.Services.Connectors
|
||||||
MainConsole.Instance.Commands.AddCommand("asset", false, "dump asset",
|
MainConsole.Instance.Commands.AddCommand("asset", false, "dump asset",
|
||||||
"dump asset <id> <file>",
|
"dump asset <id> <file>",
|
||||||
"dump one cached asset", HandleDumpAsset);
|
"dump one cached asset", HandleDumpAsset);
|
||||||
|
|
||||||
|
m_retryTimer = new Timer();
|
||||||
|
m_retryTimer.Elapsed += new ElapsedEventHandler(retryCheck);
|
||||||
|
m_retryTimer.Interval = 60000;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void retryCheck(object source, ElapsedEventArgs e)
|
||||||
|
{
|
||||||
|
m_retryCounter++;
|
||||||
|
if (m_retryCounter > 60) m_retryCounter -= 60;
|
||||||
|
List<int> keys = new List<int>();
|
||||||
|
foreach (int a in m_retryQueue.Keys)
|
||||||
|
{
|
||||||
|
keys.Add(a);
|
||||||
|
}
|
||||||
|
foreach (int a in keys)
|
||||||
|
{
|
||||||
|
//We exponentially fall back on frequency until we reach one attempt per hour
|
||||||
|
//The net result is that we end up in the queue for roughly 24 hours..
|
||||||
|
//24 hours worth of assets could be a lot, so the hope is that the region admin
|
||||||
|
//will have gotten the asset connector back online quickly!
|
||||||
|
|
||||||
|
int timefactor = a ^ 2;
|
||||||
|
if (timefactor > 60)
|
||||||
|
{
|
||||||
|
timefactor = 60;
|
||||||
|
}
|
||||||
|
|
||||||
|
//First, find out if we care about this timefactor
|
||||||
|
if (timefactor % a == 0)
|
||||||
|
{
|
||||||
|
//Yes, we do!
|
||||||
|
List<AssetBase> retrylist = m_retryQueue[a];
|
||||||
|
m_retryQueue.Remove(a);
|
||||||
|
|
||||||
|
foreach(AssetBase ass in retrylist)
|
||||||
|
{
|
||||||
|
Store(ass); //Store my ass. This function will put it back in the dictionary if it fails
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_retryQueue.Count == 0)
|
||||||
|
{
|
||||||
|
//It might only be one tick per minute, but I have
|
||||||
|
//repented and abandoned my wasteful ways
|
||||||
|
m_retryCounter = 0;
|
||||||
|
m_retryTimer.Stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void SetCache(IImprovedAssetCache cache)
|
protected void SetCache(IImprovedAssetCache cache)
|
||||||
|
@ -100,7 +152,7 @@ namespace OpenSim.Services.Connectors
|
||||||
if (m_Cache != null)
|
if (m_Cache != null)
|
||||||
asset = m_Cache.Get(id);
|
asset = m_Cache.Get(id);
|
||||||
|
|
||||||
if (asset == null)
|
if (asset == null || asset.Data == null || asset.Data.Length == 0)
|
||||||
{
|
{
|
||||||
asset = SynchronousRestObjectRequester.
|
asset = SynchronousRestObjectRequester.
|
||||||
MakeRequest<int, AssetBase>("GET", uri, 0);
|
MakeRequest<int, AssetBase>("GET", uri, 0);
|
||||||
|
@ -177,7 +229,7 @@ namespace OpenSim.Services.Connectors
|
||||||
if (m_Cache != null)
|
if (m_Cache != null)
|
||||||
asset = m_Cache.Get(id);
|
asset = m_Cache.Get(id);
|
||||||
|
|
||||||
if (asset == null)
|
if (asset == null || asset.Data == null || asset.Data.Length == 0)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
|
@ -203,12 +255,11 @@ namespace OpenSim.Services.Connectors
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Store(AssetBase asset)
|
public string Store(AssetBase asset)
|
||||||
{
|
|
||||||
if (asset.Temporary || asset.Local)
|
|
||||||
{
|
{
|
||||||
if (m_Cache != null)
|
if (m_Cache != null)
|
||||||
m_Cache.Cache(asset);
|
m_Cache.Cache(asset);
|
||||||
|
if (asset.Temporary || asset.Local)
|
||||||
|
{
|
||||||
return asset.ID;
|
return asset.ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,13 +269,45 @@ namespace OpenSim.Services.Connectors
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
newID = SynchronousRestObjectRequester.
|
newID = SynchronousRestObjectRequester.
|
||||||
MakeRequest<AssetBase, string>("POST", uri, asset);
|
MakeRequest<AssetBase, string>("POST", uri, asset, 25);
|
||||||
|
if (newID == null || newID == "")
|
||||||
|
{
|
||||||
|
newID = UUID.Zero.ToString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[ASSET CONNECTOR]: Unable to send asset {0} to asset server. Reason: {1}", asset.ID, e.Message);
|
newID = UUID.Zero.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newID == UUID.Zero.ToString())
|
||||||
|
{
|
||||||
|
//The asset upload failed, put it in a queue for later
|
||||||
|
asset.UploadAttempts++;
|
||||||
|
if (asset.UploadAttempts > 30)
|
||||||
|
{
|
||||||
|
//By this stage we've been in the queue for a good few hours;
|
||||||
|
//We're going to drop the asset.
|
||||||
|
m_log.ErrorFormat("[Assets] Dropping asset {0} - Upload has been in the queue for too long.", asset.ID.ToString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!m_retryQueue.ContainsKey(asset.UploadAttempts))
|
||||||
|
{
|
||||||
|
m_retryQueue.Add(asset.UploadAttempts, new List<AssetBase>());
|
||||||
|
}
|
||||||
|
List<AssetBase> m_queue = m_retryQueue[asset.UploadAttempts];
|
||||||
|
m_queue.Add(asset);
|
||||||
|
m_log.WarnFormat("[Assets] Upload failed: {0} - Requeuing asset for another run.", asset.ID.ToString());
|
||||||
|
m_retryTimer.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (asset.UploadAttempts > 0)
|
||||||
|
{
|
||||||
|
m_log.InfoFormat("[Assets] Upload of {0} succeeded after {1} failed attempts", asset.ID.ToString(), asset.UploadAttempts.ToString());
|
||||||
|
}
|
||||||
if (newID != String.Empty)
|
if (newID != String.Empty)
|
||||||
{
|
{
|
||||||
// Placing this here, so that this work with old asset servers that don't send any reply back
|
// Placing this here, so that this work with old asset servers that don't send any reply back
|
||||||
|
@ -235,7 +318,8 @@ namespace OpenSim.Services.Connectors
|
||||||
if (m_Cache != null)
|
if (m_Cache != null)
|
||||||
m_Cache.Cache(asset);
|
m_Cache.Cache(asset);
|
||||||
}
|
}
|
||||||
return newID;
|
}
|
||||||
|
return asset.ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool UpdateContent(string id, byte[] data)
|
public bool UpdateContent(string id, byte[] data)
|
||||||
|
|
|
@ -371,7 +371,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool Delete(string id)
|
public bool Delete(string id)
|
||||||
{
|
{
|
||||||
string errorMessage = String.Empty;
|
//string errorMessage = String.Empty;
|
||||||
string url = m_serverUrl + id;
|
string url = m_serverUrl + id;
|
||||||
|
|
||||||
if (m_cache != null)
|
if (m_cache != null)
|
||||||
|
|
|
@ -255,7 +255,11 @@ namespace OpenSim.Services.GridService
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[HYPERGRID LINKER]: Remote Gatekeeper at {0} provided malformed ExternalName {1}", regInfo.ExternalHostName, externalName);
|
m_log.WarnFormat("[HYPERGRID LINKER]: Remote Gatekeeper at {0} provided malformed ExternalName {1}", regInfo.ExternalHostName, externalName);
|
||||||
}
|
}
|
||||||
regInfo.RegionName = regInfo.ExternalHostName + ":" + regInfo.HttpPort + ":" + regInfo.RegionName;
|
string name = regInfo.RegionName;
|
||||||
|
regInfo.RegionName = regInfo.ExternalHostName + ":" + regInfo.HttpPort;
|
||||||
|
if (name != string.Empty)
|
||||||
|
regInfo.RegionName += ":" + name;
|
||||||
|
|
||||||
// Try get the map image
|
// Try get the map image
|
||||||
//regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
|
//regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
|
||||||
// I need a texture that works for this... the one I tried doesn't seem to be working
|
// I need a texture that works for this... the one I tried doesn't seem to be working
|
||||||
|
|
|
@ -108,13 +108,13 @@ namespace OpenSim.Services.InventoryService
|
||||||
// Warp! Root folder for travelers
|
// Warp! Root folder for travelers
|
||||||
XInventoryFolder[] folders = m_Database.GetFolders(
|
XInventoryFolder[] folders = m_Database.GetFolders(
|
||||||
new string[] { "agentID", "folderName"},
|
new string[] { "agentID", "folderName"},
|
||||||
new string[] { principalID.ToString(), "Suitcase" });
|
new string[] { principalID.ToString(), "My Suitcase" });
|
||||||
|
|
||||||
if (folders.Length > 0)
|
if (folders.Length > 0)
|
||||||
return ConvertToOpenSim(folders[0]);
|
return ConvertToOpenSim(folders[0]);
|
||||||
|
|
||||||
// make one
|
// make one
|
||||||
XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "Suitcase");
|
XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "My Suitcase");
|
||||||
return ConvertToOpenSim(suitcase);
|
return ConvertToOpenSim(suitcase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,14 @@ namespace OpenSim.Services.InventoryService
|
||||||
if (folders.Length == 0)
|
if (folders.Length == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return ConvertToOpenSim(folders[0]);
|
XInventoryFolder root = null;
|
||||||
|
foreach (XInventoryFolder folder in folders)
|
||||||
|
if (folder.folderName == "My Inventory")
|
||||||
|
root = folder;
|
||||||
|
if (folders == null) // oops
|
||||||
|
root = folders[0];
|
||||||
|
|
||||||
|
return ConvertToOpenSim(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type)
|
public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type)
|
||||||
|
|
|
@ -175,6 +175,9 @@ namespace OpenSim.Services.LLLoginService
|
||||||
private string firstname;
|
private string firstname;
|
||||||
private string lastname;
|
private string lastname;
|
||||||
|
|
||||||
|
// Web map
|
||||||
|
private string mapTileURL;
|
||||||
|
|
||||||
// Error Flags
|
// Error Flags
|
||||||
private string errorReason;
|
private string errorReason;
|
||||||
private string errorMessage;
|
private string errorMessage;
|
||||||
|
@ -223,7 +226,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo,
|
public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo,
|
||||||
GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
|
GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
|
||||||
string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
|
string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
|
||||||
GridRegion home, IPEndPoint clientIP)
|
GridRegion home, IPEndPoint clientIP, string mapTileURL)
|
||||||
: this()
|
: this()
|
||||||
{
|
{
|
||||||
FillOutInventoryData(invSkel, libService);
|
FillOutInventoryData(invSkel, libService);
|
||||||
|
@ -239,6 +242,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
Message = message;
|
Message = message;
|
||||||
BuddList = ConvertFriendListItem(friendsList);
|
BuddList = ConvertFriendListItem(friendsList);
|
||||||
StartLocation = where;
|
StartLocation = where;
|
||||||
|
MapTileURL = mapTileURL;
|
||||||
|
|
||||||
FillOutHomeData(pinfo, home);
|
FillOutHomeData(pinfo, home);
|
||||||
LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z);
|
LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z);
|
||||||
|
@ -411,6 +415,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
InitialOutfitHash["folder_name"] = "Nightclub Female";
|
InitialOutfitHash["folder_name"] = "Nightclub Female";
|
||||||
InitialOutfitHash["gender"] = "female";
|
InitialOutfitHash["gender"] = "female";
|
||||||
initialOutfit.Add(InitialOutfitHash);
|
initialOutfit.Add(InitialOutfitHash);
|
||||||
|
mapTileURL = String.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -474,6 +479,9 @@ namespace OpenSim.Services.LLLoginService
|
||||||
responseData["region_x"] = (Int32)(RegionX);
|
responseData["region_x"] = (Int32)(RegionX);
|
||||||
responseData["region_y"] = (Int32)(RegionY);
|
responseData["region_y"] = (Int32)(RegionY);
|
||||||
|
|
||||||
|
if (mapTileURL != String.Empty)
|
||||||
|
responseData["map-server-url"] = mapTileURL;
|
||||||
|
|
||||||
if (m_buddyList != null)
|
if (m_buddyList != null)
|
||||||
{
|
{
|
||||||
responseData["buddy-list"] = m_buddyList.ToArray();
|
responseData["buddy-list"] = m_buddyList.ToArray();
|
||||||
|
@ -570,6 +578,9 @@ namespace OpenSim.Services.LLLoginService
|
||||||
map["region_x"] = OSD.FromInteger(RegionX);
|
map["region_x"] = OSD.FromInteger(RegionX);
|
||||||
map["region_y"] = OSD.FromInteger(RegionY);
|
map["region_y"] = OSD.FromInteger(RegionY);
|
||||||
|
|
||||||
|
if (mapTileURL != String.Empty)
|
||||||
|
map["map-server-url"] = OSD.FromString(mapTileURL);
|
||||||
|
|
||||||
if (m_buddyList != null)
|
if (m_buddyList != null)
|
||||||
{
|
{
|
||||||
map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray());
|
map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray());
|
||||||
|
@ -653,7 +664,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
Hashtable TempHash;
|
Hashtable TempHash;
|
||||||
foreach (InventoryFolderBase InvFolder in folders)
|
foreach (InventoryFolderBase InvFolder in folders)
|
||||||
{
|
{
|
||||||
if (InvFolder.ParentID == UUID.Zero)
|
if (InvFolder.ParentID == UUID.Zero && InvFolder.Name == "My Inventory")
|
||||||
{
|
{
|
||||||
rootID = InvFolder.ID;
|
rootID = InvFolder.ID;
|
||||||
}
|
}
|
||||||
|
@ -921,6 +932,12 @@ namespace OpenSim.Services.LLLoginService
|
||||||
set { home = value; }
|
set { home = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string MapTileURL
|
||||||
|
{
|
||||||
|
get { return mapTileURL; }
|
||||||
|
set { mapTileURL = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public string Message
|
public string Message
|
||||||
{
|
{
|
||||||
get { return welcomeMessage; }
|
get { return welcomeMessage; }
|
||||||
|
|
|
@ -73,6 +73,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
protected int m_MinLoginLevel;
|
protected int m_MinLoginLevel;
|
||||||
protected string m_GatekeeperURL;
|
protected string m_GatekeeperURL;
|
||||||
protected bool m_AllowRemoteSetLoginLevel;
|
protected bool m_AllowRemoteSetLoginLevel;
|
||||||
|
protected string m_MapTileURL;
|
||||||
|
|
||||||
IConfig m_LoginServerConfig;
|
IConfig m_LoginServerConfig;
|
||||||
|
|
||||||
|
@ -100,6 +101,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
m_AllowRemoteSetLoginLevel = m_LoginServerConfig.GetBoolean("AllowRemoteSetLoginLevel", false);
|
m_AllowRemoteSetLoginLevel = m_LoginServerConfig.GetBoolean("AllowRemoteSetLoginLevel", false);
|
||||||
m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0);
|
m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0);
|
||||||
m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty);
|
m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty);
|
||||||
|
m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty);
|
||||||
|
|
||||||
// These are required; the others aren't
|
// These are required; the others aren't
|
||||||
if (accountService == string.Empty || authService == string.Empty)
|
if (accountService == string.Empty || authService == string.Empty)
|
||||||
|
@ -362,7 +364,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
// Finally, fill out the response and return it
|
// Finally, fill out the response and return it
|
||||||
//
|
//
|
||||||
LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService,
|
LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService,
|
||||||
where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP);
|
where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL);
|
||||||
|
|
||||||
m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client.");
|
m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client.");
|
||||||
return response;
|
return response;
|
||||||
|
|
|
@ -54,9 +54,10 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
return assets.Find(x=>x.FullID == uuid);
|
return assets.Find(x=>x.FullID == uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StoreAsset(AssetBase asset)
|
public bool StoreAsset(AssetBase asset)
|
||||||
{
|
{
|
||||||
assets.Add(asset);
|
assets.Add(asset);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<AssetMetadata> FetchAssetMetadataSet(int start, int count) { return new List<AssetMetadata>(count); }
|
public List<AssetMetadata> FetchAssetMetadataSet(int start, int count) { return new List<AssetMetadata>(count); }
|
||||||
|
|
|
@ -36,9 +36,9 @@
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\bin\log4net.dll</HintPath>
|
<HintPath>..\..\..\bin\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="OpenSim.Server, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Robust, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\bin\OpenSim.Server.exe</HintPath>
|
<HintPath>..\..\..\bin\Robust.exe</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
|
|
|
@ -887,6 +887,13 @@
|
||||||
Enabled = true
|
Enabled = true
|
||||||
RepoPath = "git"
|
RepoPath = "git"
|
||||||
|
|
||||||
|
;How many frames between the scheduled commits?
|
||||||
|
CommitFrameInterval = 360000
|
||||||
|
|
||||||
|
;Should we automatically commit when necessary to avoid objects never making it into the repo?
|
||||||
|
UseSafetyCommit = true
|
||||||
|
|
||||||
|
|
||||||
[SVN]
|
[SVN]
|
||||||
Enabled = false
|
Enabled = false
|
||||||
Directory = SVNmodule\repo
|
Directory = SVNmodule\repo
|
||||||
|
|
Binary file not shown.
|
@ -198,6 +198,10 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
; CHANGE THIS
|
; CHANGE THIS
|
||||||
ExternalName = "http://127.0.0.1:8002"
|
ExternalName = "http://127.0.0.1:8002"
|
||||||
|
|
||||||
|
; Does this grid allow incoming links to any region in it?
|
||||||
|
; If false, HG TPs happen only to the Default regions specified in [GridService] section
|
||||||
|
AllowTeleportsToAnyRegion = true
|
||||||
|
|
||||||
[UserAgentService]
|
[UserAgentService]
|
||||||
LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService"
|
LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService"
|
||||||
;; for the service
|
;; for the service
|
||||||
|
|
|
@ -134,6 +134,9 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
WelcomeMessage = "Welcome, Avatar!"
|
WelcomeMessage = "Welcome, Avatar!"
|
||||||
AllowRemoteSetLoginLevel = "false"
|
AllowRemoteSetLoginLevel = "false"
|
||||||
|
|
||||||
|
; For snowglobe's web map
|
||||||
|
; MapTileURL = "";
|
||||||
|
|
||||||
|
|
||||||
[GridInfoService]
|
[GridInfoService]
|
||||||
; These settings are used to return information on a get_grid_info call.
|
; These settings are used to return information on a get_grid_info call.
|
||||||
|
|
|
@ -68,3 +68,8 @@
|
||||||
|
|
||||||
[GatekeeperService]
|
[GatekeeperService]
|
||||||
ExternalName = "http://127.0.0.1:9000"
|
ExternalName = "http://127.0.0.1:9000"
|
||||||
|
|
||||||
|
; Does this grid allow incoming links to any region in it?
|
||||||
|
; If false, HG TPs happen only to the Default regions specified in [GridService] section
|
||||||
|
AllowTeleportsToAnyRegion = true
|
||||||
|
|
||||||
|
|
|
@ -1407,6 +1407,7 @@
|
||||||
|
|
||||||
<ReferencePath>../../../bin/</ReferencePath>
|
<ReferencePath>../../../bin/</ReferencePath>
|
||||||
<Reference name="System"/>
|
<Reference name="System"/>
|
||||||
|
<Reference name="System.Core"/>
|
||||||
<Reference name="System.Xml"/>
|
<Reference name="System.Xml"/>
|
||||||
<Reference name="System.Drawing"/>
|
<Reference name="System.Drawing"/>
|
||||||
<Reference name="System.Web"/>
|
<Reference name="System.Web"/>
|
||||||
|
@ -2405,6 +2406,7 @@
|
||||||
|
|
||||||
<ReferencePath>../../../../../../bin/</ReferencePath>
|
<ReferencePath>../../../../../../bin/</ReferencePath>
|
||||||
<Reference name="System"/>
|
<Reference name="System"/>
|
||||||
|
<Reference name="System.Core"/>
|
||||||
<Reference name="System.Data"/>
|
<Reference name="System.Data"/>
|
||||||
<Reference name="System.Web"/>
|
<Reference name="System.Web"/>
|
||||||
<Reference name="System.Xml"/>
|
<Reference name="System.Xml"/>
|
||||||
|
|
Loading…
Reference in New Issue