From 79e166e9aaf56b6798e27201962f6e109925c697 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 19 Jun 2017 05:22:38 +0100 Subject: revert EnvironmentTick back to orignal clock, since change may cause issues on some code paths. Clean a bit get mesh and get texture throttle --- OpenSim/Framework/Util.cs | 7 +- .../ClientStack/Linden/Caps/GetMeshModule.cs | 81 +++++++--------------- .../ClientStack/Linden/Caps/GetTextureModule.cs | 45 ++++++------ 3 files changed, 49 insertions(+), 84 deletions(-) diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index a855767..af14939 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -2967,9 +2967,9 @@ namespace OpenSim.Framework /// public static Int32 EnvironmentTickCount() { - double now = GetTimeStampMS(); - return (int)now; + return Environment.TickCount & EnvironmentTickCountMask; } + const Int32 EnvironmentTickCountMask = 0x3fffffff; /// @@ -2994,8 +2994,7 @@ namespace OpenSim.Framework /// subtraction of passed prevValue from current Environment.TickCount public static Int32 EnvironmentTickCountSubtract(Int32 prevValue) { - double now = GetTimeStampMS(); - return EnvironmentTickCountSubtract((int)now, prevValue); + return EnvironmentTickCountSubtract(EnvironmentTickCount(), prevValue); } // Returns value of Tick Count A - TickCount B accounting for wrapping of TickCount diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs index a721454..ba917e39 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs @@ -221,7 +221,7 @@ namespace OpenSim.Region.ClientStack.Linden PollServiceMeshEventArgs args; if (m_pollservices.TryGetValue(user, out args)) { - args.UpdateThrottle(imagethrottle, p); + args.UpdateThrottle(imagethrottle); } } @@ -238,14 +238,13 @@ namespace OpenSim.Region.ClientStack.Linden base(null, uri, null, null, null, pId, int.MaxValue) { m_scene = scene; - m_throttler = new MeshCapsDataThrottler(100000, 1400000, 10000, scene, pId); + m_throttler = new MeshCapsDataThrottler(100000); // x is request id, y is userid HasEvents = (x, y) => { lock (responses) { bool ret = m_throttler.hasEvents(x, responses); - m_throttler.ProcessTime(); return ret; } @@ -260,8 +259,8 @@ namespace OpenSim.Region.ClientStack.Linden } finally { - m_throttler.ProcessTime(); responses.Remove(x); + m_throttler.PassTime(); } } }; @@ -274,6 +273,7 @@ namespace OpenSim.Region.ClientStack.Linden reqinfo.request = y; m_queue.Enqueue(reqinfo); + m_throttler.PassTime(); }; // this should never happen except possible on shutdown @@ -335,12 +335,15 @@ namespace OpenSim.Region.ClientStack.Linden }; } - m_throttler.ProcessTime(); + m_throttler.PassTime(); } - internal void UpdateThrottle(int pimagethrottle, ScenePresence p) + internal void UpdateThrottle(int pthrottle) { - m_throttler.UpdateThrottle(pimagethrottle, p); + int tmp = 2 * pthrottle; + if(tmp < 10000) + tmp = 10000; + m_throttler.ThrottleBytes = tmp; } } @@ -394,25 +397,15 @@ namespace OpenSim.Region.ClientStack.Linden internal sealed class MeshCapsDataThrottler { + private double lastTimeElapsed = 0; + private double BytesSent = 0; - private volatile int currenttime = 0; - private volatile int lastTimeElapsed = 0; - private volatile int BytesSent = 0; - private int CapSetThrottle = 0; - private float CapThrottleDistributon = 0.30f; - private readonly Scene m_scene; - private ThrottleOutPacketType Throttle; - private readonly UUID User; - - public MeshCapsDataThrottler(int pBytes, int max, int min, Scene pScene, UUID puser) + public MeshCapsDataThrottler(int pBytes) { + if(pBytes < 10000) + pBytes = 10000; ThrottleBytes = pBytes; - if(ThrottleBytes < 10000) - ThrottleBytes = 10000; - lastTimeElapsed = Util.EnvironmentTickCount(); - Throttle = ThrottleOutPacketType.Asset; - m_scene = pScene; - User = puser; + lastTimeElapsed = Util.GetTimeStampMS(); } public bool hasEvents(UUID key, Dictionary responses) @@ -442,46 +435,22 @@ namespace OpenSim.Region.ClientStack.Linden return haskey; } - public void ProcessTime() - { - PassTime(); - } - - private void PassTime() + public void PassTime() { - currenttime = Util.EnvironmentTickCount(); - int timeElapsed = Util.EnvironmentTickCountSubtract(currenttime, lastTimeElapsed); - if (timeElapsed >= 100) + double currenttime = Util.GetTimeStampMS(); + double timeElapsed = currenttime - lastTimeElapsed; + if(timeElapsed < 50.0) + return; + int add = (int)(ThrottleBytes * timeElapsed * 0.001); + if (add >= 1000) { lastTimeElapsed = currenttime; - BytesSent -= (ThrottleBytes * timeElapsed / 1000); + BytesSent -= add; if (BytesSent < 0) BytesSent = 0; } } - private void AlterThrottle(int setting, ScenePresence p) - { - p.ControllingClient.SetAgentThrottleSilent((int)Throttle,setting); - } - - public int ThrottleBytes - { - get { return CapSetThrottle; } - set - { - if (value > 10000) - CapSetThrottle = value; - else - CapSetThrottle = 10000; - } - } - - internal void UpdateThrottle(int pimagethrottle, ScenePresence p) - { - // Client set throttle ! - CapSetThrottle = 2 * pimagethrottle; - ProcessTime(); - } + public int ThrottleBytes; } } } diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index ce9798b..b01c7dc 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs @@ -220,7 +220,7 @@ namespace OpenSim.Region.ClientStack.Linden new Dictionary(); private Scene m_scene; - private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000); + private CapsDataThrottler m_throttler = new CapsDataThrottler(100000); public PollServiceTextureEventArgs(UUID pId, Scene scene) : base(null, "", null, null, null, pId, int.MaxValue) { @@ -231,7 +231,6 @@ namespace OpenSim.Region.ClientStack.Linden lock (responses) { bool ret = m_throttler.hasEvents(x, responses); - m_throttler.ProcessTime(); return ret; } @@ -247,6 +246,7 @@ namespace OpenSim.Region.ClientStack.Linden finally { responses.Remove(x); + m_throttler.PassTime(); } } }; @@ -271,6 +271,7 @@ namespace OpenSim.Region.ClientStack.Linden } } m_queue.Enqueue(reqinfo); + m_throttler.PassTime(); }; // this should never happen except possible on shutdown @@ -351,14 +352,15 @@ namespace OpenSim.Region.ClientStack.Linden }; } - m_throttler.ProcessTime(); + m_throttler.PassTime(); } internal void UpdateThrottle(int pimagethrottle) { - m_throttler.ThrottleBytes = 2 * pimagethrottle; - if(m_throttler.ThrottleBytes < 10000) - m_throttler.ThrottleBytes = 10000; + int tmp = 2 * pimagethrottle; + if(tmp < 10000) + tmp = 10000; + m_throttler.ThrottleBytes = tmp; } } @@ -426,16 +428,14 @@ namespace OpenSim.Region.ClientStack.Linden internal sealed class CapsDataThrottler { - - private volatile int currenttime = 0; - private volatile int lastTimeElapsed = 0; + private double lastTimeElapsed = 0; private volatile int BytesSent = 0; - public CapsDataThrottler(int pBytes, int max, int min) + public CapsDataThrottler(int pBytes) { + if(pBytes < 10000) + pBytes = 10000; ThrottleBytes = pBytes; - if(ThrottleBytes < 10000) - ThrottleBytes = 10000; - lastTimeElapsed = Util.EnvironmentTickCount(); + lastTimeElapsed = Util.GetTimeStampMS(); } public bool hasEvents(UUID key, Dictionary responses) { @@ -468,20 +468,17 @@ namespace OpenSim.Region.ClientStack.Linden return haskey; } - public void ProcessTime() - { - PassTime(); - } - - private void PassTime() + public void PassTime() { - currenttime = Util.EnvironmentTickCount(); - int timeElapsed = Util.EnvironmentTickCountSubtract(currenttime, lastTimeElapsed); - //processTimeBasedActions(responses); - if (timeElapsed >= 100) + double currenttime = Util.GetTimeStampMS(); + double timeElapsed = currenttime - lastTimeElapsed; + if(timeElapsed < 50.0) + return; + int add = (int)(ThrottleBytes * timeElapsed * 0.001); + if (add >= 1000) { lastTimeElapsed = currenttime; - BytesSent -= (ThrottleBytes * timeElapsed / 1000); + BytesSent -= add; if (BytesSent < 0) BytesSent = 0; } } -- cgit v1.1 From 651952e01eef5ad98e87fbe3909dd11f1d2d9db1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 21 Jun 2017 03:31:07 +0100 Subject: changes to AutoBackModule. Time interval is now unique and only definable on OpenSim.ini. All enabled regions will be saved in sequence whne it expires. Interval is time since last region save end, so will not follow wall clock. This reduces the chance of overlapped saves. Console command renamed to dooarbackup to be more distint from db backup. Lost the region load checks, to put back later --- .../World/AutoBackup/AutoBackupModule.cs | 718 ++++++--------------- .../World/AutoBackup/AutoBackupModuleState.cs | 59 +- 2 files changed, 221 insertions(+), 556 deletions(-) diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs index 79b80f8..eab6705 100644 --- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs +++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs @@ -59,23 +59,20 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup /// /// /// Config Settings Documentation. - /// Each configuration setting can be specified in two places: OpenSim.ini or Regions.ini. - /// If specified in Regions.ini, the settings should be within the region's section name. - /// If specified in OpenSim.ini, the settings should be within the [AutoBackupModule] section. - /// Region-specific settings take precedence. + /// Configuration setting can be specified in two places: OpenSim.ini and/or Regions.ini. /// - /// AutoBackupModuleEnabled: True/False. Default: False. If True, use the auto backup module. This setting does not support per-region basis. - /// All other settings under [AutoBackupModule] are ignored if AutoBackupModuleEnabled is false, even per-region settings! - /// AutoBackup: True/False. Default: False. If True, activate auto backup functionality. - /// This is the only required option for enabling auto-backup; the other options have sane defaults. - /// If False for a particular region, the auto-backup module becomes a no-op for the region, and all other AutoBackup* settings are ignored. - /// If False globally (the default), only regions that specifically override it in Regions.ini will get AutoBackup functionality. + /// OpenSim.ini only settings section [AutoBackupModule] + /// AutoBackupModuleEnabled: True/False. Default: False. If True, use the auto backup module. + /// if false module is disable and all rest is ignored /// AutoBackupInterval: Double, non-negative value. Default: 720 (12 hours). /// The number of minutes between each backup attempt. - /// If a negative or zero value is given, it is equivalent to setting AutoBackup = False. - /// AutoBackupBusyCheck: True/False. Default: True. - /// If True, we will only take an auto-backup if a set of conditions are met. - /// These conditions are heuristics to try and avoid taking a backup when the sim is busy. + /// + /// Next can be set on OpenSim.ini, as default, and or per region in Regions.ini + /// Region-specific settings take precedence. + /// + /// AutoBackup: True/False. Default: False. If True, activate auto backup functionality. + /// controls backup per region, with default optionaly set on OpenSim.ini + /// AutoBackupSkipAssets /// If true, assets are not saved to the oar file. Considerably reduces impact on simulator when backing up. Intended for when assets db is backed up separately /// AutoBackupKeepFilesForDays @@ -93,36 +90,22 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup /// "Overwrite": Always save to file named "${AutoBackupDir}/RegionName.oar", even if we have to overwrite an existing file. /// AutoBackupDir: String. Default: "." (the current directory). /// A directory (absolute or relative) where backups should be saved. - /// AutoBackupDilationThreshold: float. Default: 0.5. Lower bound on time dilation required for BusyCheck heuristics to pass. - /// If the time dilation is below this value, don't take a backup right now. - /// AutoBackupAgentThreshold: int. Default: 10. Upper bound on # of agents in region required for BusyCheck heuristics to pass. - /// If the number of agents is greater than this value, don't take a backup right now - /// Save memory by setting low initial capacities. Minimizes impact in common cases of all regions using same interval, and instances hosting 1 ~ 4 regions. - /// Also helps if you don't want AutoBackup at all. /// [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "AutoBackupModule")] public class AutoBackupModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private readonly Dictionary m_pendingSaves = new Dictionary(1); private readonly AutoBackupModuleState m_defaultState = new AutoBackupModuleState(); private readonly Dictionary m_states = new Dictionary(1); - private readonly Dictionary> m_timerMap = - new Dictionary>(1); - private readonly Dictionary m_timers = new Dictionary(1); private delegate T DefaultGetter(string settingName, T defaultValue); private bool m_enabled; private ICommandConsole m_console; private List m_Scenes = new List (); - - - /// - /// Whether the shared module should be enabled at all. NOT the same as m_Enabled in AutoBackupModuleState! - /// - private bool m_closed; + private Timer m_masterTimer; + private bool m_busy; private IConfigSource m_configSource; @@ -159,36 +142,34 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup void IRegionModuleBase.Initialise(IConfigSource source) { // Determine if we have been enabled at all in OpenSim.ini -- this is part and parcel of being an optional module - this.m_configSource = source; + m_configSource = source; IConfig moduleConfig = source.Configs["AutoBackupModule"]; if (moduleConfig == null) { - this.m_enabled = false; + m_enabled = false; return; } - else - { - this.m_enabled = moduleConfig.GetBoolean("AutoBackupModuleEnabled", false); - if (this.m_enabled) - { - m_log.Info("[AUTO BACKUP]: AutoBackupModule enabled"); - } - else - { - return; - } - } - Timer defTimer = new Timer(43200000); - this.m_defaultState.Timer = defTimer; - this.m_timers.Add(43200000, defTimer); - defTimer.Elapsed += this.HandleElapsed; - defTimer.AutoReset = true; - defTimer.Start(); + m_enabled = moduleConfig.GetBoolean("AutoBackupModuleEnabled", false); + if(!m_enabled) + return; + + m_log.Info("[AUTO BACKUP]: AutoBackupModule enabled"); + m_masterTimer = new Timer(43200000); + m_masterTimer.Elapsed += HandleElapsed; + m_masterTimer.AutoReset = false; + + ParseDefaultConfig(); + m_log.Debug("[AUTO BACKUP]: Default config:"); + m_log.Debug(m_defaultState.ToString()); - AutoBackupModuleState abms = this.ParseConfig(null, true); - m_log.Debug("[AUTO BACKUP]: Here is the default config:"); - m_log.Debug(abms.ToString()); + m_console = MainConsole.Instance; + + m_console.Commands.AddCommand ( + "AutoBackup", true, "dooarbackup", + "dooarbackup ", + "do single region backup into a oar. Identical to save oar but using AutoBackup settings for name etc", DoBackup); + m_busy = true; } /// @@ -196,13 +177,11 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup /// void IRegionModuleBase.Close() { - if (!this.m_enabled) - { + if (!m_enabled) return; - } // We don't want any timers firing while the sim's coming down; strange things may happen. - this.StopAllTimers(); + m_masterTimer.Dispose(); } /// @@ -211,18 +190,11 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup /// void IRegionModuleBase.AddRegion (Scene scene) { - if (!this.m_enabled) { + if (!m_enabled) return; - } - lock (m_Scenes) { - m_Scenes.Add (scene); - } - m_console = MainConsole.Instance; - m_console.Commands.AddCommand ( - "AutoBackup", false, "dobackup", - "dobackup", - "do backup.", DoBackup); + lock (m_Scenes) + m_Scenes.Add (scene); } /// @@ -231,28 +203,14 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup /// The scene (region) to stop performing AutoBackup on. void IRegionModuleBase.RemoveRegion(Scene scene) { - if (!this.m_enabled) - { + if (m_enabled) return; - } - m_Scenes.Remove (scene); - if (this.m_states.ContainsKey(scene)) - { - AutoBackupModuleState abms = this.m_states[scene]; - - // Remove this scene out of the timer map list - Timer timer = abms.Timer; - List list = this.m_timerMap[timer]; - list.Remove(scene); - // Shut down the timer if this was the last scene for the timer - if (list.Count == 0) - { - this.m_timerMap.Remove(timer); - this.m_timers.Remove(timer.Interval); - timer.Close(); - } - this.m_states.Remove(scene); + lock(m_Scenes) + { + if (m_states.ContainsKey(scene)) + m_states.Remove(scene); + m_Scenes.Remove(scene); } } @@ -263,22 +221,29 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup /// The scene to (possibly) perform AutoBackup on. void IRegionModuleBase.RegionLoaded(Scene scene) { - if (!this.m_enabled) - { + if (!m_enabled) return; - } // This really ought not to happen, but just in case, let's pretend it didn't... if (scene == null) - { return; - } - AutoBackupModuleState abms = this.ParseConfig(scene, false); - m_log.Debug("[AUTO BACKUP]: Config for " + scene.RegionInfo.RegionName); - m_log.Debug((abms == null ? "DEFAULT" : abms.ToString())); + AutoBackupModuleState abms = ParseConfig(scene); + if(abms == null) + { + m_log.Debug("[AUTO BACKUP]: Config for " + scene.RegionInfo.RegionName); + m_log.Debug("DEFAULT"); + abms = new AutoBackupModuleState(m_defaultState); + } + else + { + m_log.Debug("[AUTO BACKUP]: Config for " + scene.RegionInfo.RegionName); + m_log.Debug(abms.ToString()); + } m_states.Add(scene, abms); + m_busy = false; + m_masterTimer.Start(); } /// @@ -286,280 +251,193 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup /// void ISharedRegionModule.PostInitialise() { + } #endregion private void DoBackup (string module, string[] args) { - if (args.Length != 2) { - MainConsole.Instance.OutputFormat ("Usage: dobackup "); + if (!m_enabled) + return; + + if(m_busy) + { + MainConsole.Instance.OutputFormat ("Already doing a backup, please try later"); + return; + } + + if (args.Length != 2) + { + MainConsole.Instance.OutputFormat ("Usage: dooarbackup "); return; } + + m_busy = true; + bool found = false; string name = args [1]; - lock (m_Scenes) { - foreach (Scene s in m_Scenes) { - string test = s.Name.ToString (); - if (test == name) { + Scene[] scenes; + lock (m_Scenes) + scenes = m_Scenes.ToArray(); + + if(scenes == null) + return; + + Scene s; + try + { + for(int i = 0; i < scenes.Length; i++) + { + s = scenes[i]; + if (s.Name == name) + { found = true; - DoRegionBackup (s); + m_masterTimer.Stop(); + DoRegionBackup(s); + break; } } - if (!found) { + } catch { } + + if (!found) MainConsole.Instance.OutputFormat ("No such region {0}. Nothing to backup", name); - } - } + m_busy = false; } - /// - /// Set up internal state for a given scene. Fairly complex code. - /// When this method returns, we've started auto-backup timers, put members in Dictionaries, and created a State object for this scene. - /// - /// The scene to look at. - /// Whether this call is intended to figure out what we consider the "default" config (applied to all regions unless overridden by per-region settings). - /// An AutoBackupModuleState contains most information you should need to know relevant to auto-backup, as applicable to a single region. - private AutoBackupModuleState ParseConfig(IScene scene, bool parseDefault) + private void ParseDefaultConfig() { - string sRegionName; - string sRegionLabel; -// string prepend; - AutoBackupModuleState state; + IConfig config = m_configSource.Configs["AutoBackupModule"]; + if (config == null) + return; - if (parseDefault) - { - sRegionName = null; - sRegionLabel = "DEFAULT"; -// prepend = ""; - state = this.m_defaultState; - } - else - { - sRegionName = scene.RegionInfo.RegionName; - sRegionLabel = sRegionName; -// prepend = sRegionName + "."; - state = null; - } + // Borrow an existing timer if one exists for the same interval; otherwise, make a new one. + double interval = config.GetDouble("AutoBackupInterval", 720); + interval *= 60000.0; + m_masterTimer.Interval = interval; - // Read the config settings and set variables. - IConfig regionConfig = (scene != null ? scene.Config.Configs[sRegionName] : null); - IConfig config = this.m_configSource.Configs["AutoBackupModule"]; - if (config == null) - { - // defaultState would be disabled too if the section doesn't exist. - state = this.m_defaultState; - return state; - } + m_defaultState.Enabled = config.GetBoolean("AutoBackup", m_defaultState.Enabled); - bool tmpEnabled = ResolveBoolean("AutoBackup", this.m_defaultState.Enabled, config, regionConfig); - if (state == null && tmpEnabled != this.m_defaultState.Enabled) - //Varies from default state - { - state = new AutoBackupModuleState(); - } + // Included Option To Skip Assets + m_defaultState.SkipAssets = config.GetBoolean("AutoBackupSkipAssets",m_defaultState.SkipAssets); - if (state != null) - { - state.Enabled = tmpEnabled; - } + // How long to keep backup files in days, 0 Disables this feature + m_defaultState.KeepFilesForDays = config.GetInt("AutoBackupKeepFilesForDays",m_defaultState.KeepFilesForDays); - // If you don't want AutoBackup, we stop. - if ((state == null && !this.m_defaultState.Enabled) || (state != null && !state.Enabled)) - { - return state; - } + // Set file naming algorithm + string stmpNamingType = config.GetString("AutoBackupNaming", m_defaultState.NamingType.ToString()); + NamingType tmpNamingType; + if (stmpNamingType.Equals("Time", StringComparison.CurrentCultureIgnoreCase)) + tmpNamingType = NamingType.Time; + else if (stmpNamingType.Equals("Sequential", StringComparison.CurrentCultureIgnoreCase)) + tmpNamingType = NamingType.Sequential; + else if (stmpNamingType.Equals("Overwrite", StringComparison.CurrentCultureIgnoreCase)) + tmpNamingType = NamingType.Overwrite; else { - m_log.Info("[AUTO BACKUP]: Region " + sRegionLabel + " is AutoBackup ENABLED."); + m_log.Warn("Unknown naming type specified for Default"); + tmpNamingType = NamingType.Time; } + m_defaultState.NamingType = tmpNamingType; - // Borrow an existing timer if one exists for the same interval; otherwise, make a new one. - double interval = - this.ResolveDouble("AutoBackupInterval", this.m_defaultState.IntervalMinutes, - config, regionConfig) * 60000.0; - if (state == null && interval != this.m_defaultState.IntervalMinutes * 60000.0) - { - state = new AutoBackupModuleState(); - } + m_defaultState.Script = config.GetString("AutoBackupScript", m_defaultState.Script); - if (this.m_timers.ContainsKey(interval)) + string backupDir = config.GetString("AutoBackupDir", "."); + if (backupDir != ".") { - if (state != null) + try { - state.Timer = this.m_timers[interval]; + DirectoryInfo dirinfo = new DirectoryInfo(backupDir); + if (!dirinfo.Exists) + dirinfo.Create(); } - m_log.Debug("[AUTO BACKUP]: Reusing timer for " + interval + " msec for region " + - sRegionLabel); - } - else - { - // 0 or negative interval == do nothing. - if (interval <= 0.0 && state != null) + catch (Exception e) { - state.Enabled = false; - return state; - } - if (state == null) - { - state = new AutoBackupModuleState(); + m_log.Warn( + "[AUTO BACKUP]: BAD NEWS. You won't be able to save backups to directory " + + backupDir + + " because it doesn't exist or there's a permissions issue with it. Here's the exception.", + e); } - Timer tim = new Timer(interval); - state.Timer = tim; - //Milliseconds -> minutes - this.m_timers.Add(interval, tim); - tim.Elapsed += this.HandleElapsed; - tim.AutoReset = true; - tim.Start(); } + m_defaultState.BackupDir = backupDir; + } - // Add the current region to the list of regions tied to this timer. - if (scene != null) - { - if (state != null) - { - if (this.m_timerMap.ContainsKey(state.Timer)) - { - this.m_timerMap[state.Timer].Add(scene); - } - else - { - List scns = new List(1); - scns.Add(scene); - this.m_timerMap.Add(state.Timer, scns); - } - } - else - { - if (this.m_timerMap.ContainsKey(this.m_defaultState.Timer)) - { - this.m_timerMap[this.m_defaultState.Timer].Add(scene); - } - else - { - List scns = new List(1); - scns.Add(scene); - this.m_timerMap.Add(this.m_defaultState.Timer, scns); - } - } - } + /// + /// Set up internal state for a given scene. Fairly complex code. + /// When this method returns, we've started auto-backup timers, put members in Dictionaries, and created a State object for this scene. + /// + /// The scene to look at. + /// Whether this call is intended to figure out what we consider the "default" config (applied to all regions unless overridden by per-region settings). + /// An AutoBackupModuleState contains most information you should need to know relevant to auto-backup, as applicable to a single region. + private AutoBackupModuleState ParseConfig(IScene scene) + { + if(scene == null) + return null; - bool tmpBusyCheck = ResolveBoolean("AutoBackupBusyCheck", - this.m_defaultState.BusyCheck, config, regionConfig); - if (state == null && tmpBusyCheck != this.m_defaultState.BusyCheck) - { - state = new AutoBackupModuleState(); - } + string sRegionName; + string sRegionLabel; + AutoBackupModuleState state = null; - if (state != null) - { - state.BusyCheck = tmpBusyCheck; - } + sRegionName = scene.RegionInfo.RegionName; + sRegionLabel = sRegionName; - // Included Option To Skip Assets - bool tmpSkipAssets = ResolveBoolean("AutoBackupSkipAssets", - this.m_defaultState.SkipAssets, config, regionConfig); - if (state == null && tmpSkipAssets != this.m_defaultState.SkipAssets) - { - state = new AutoBackupModuleState(); - } + // Read the config settings and set variables. + IConfig regionConfig = scene.Config.Configs[sRegionName]; + if (regionConfig == null) + return null; - if (state != null) - { - state.SkipAssets = tmpSkipAssets; - } + state = new AutoBackupModuleState(); - // How long to keep backup files in days, 0 Disables this feature - int tmpKeepFilesForDays = ResolveInt("AutoBackupKeepFilesForDays", - this.m_defaultState.KeepFilesForDays, config, regionConfig); - if (state == null && tmpKeepFilesForDays != this.m_defaultState.KeepFilesForDays) - { - state = new AutoBackupModuleState(); - } + state.Enabled = regionConfig.GetBoolean("AutoBackup", m_defaultState.Enabled); - if (state != null) - { - state.KeepFilesForDays = tmpKeepFilesForDays; - } + // Included Option To Skip Assets + state.SkipAssets = regionConfig.GetBoolean("AutoBackupSkipAssets", m_defaultState.SkipAssets); + + // How long to keep backup files in days, 0 Disables this feature + state.KeepFilesForDays = regionConfig.GetInt("AutoBackupKeepFilesForDays", m_defaultState.KeepFilesForDays); // Set file naming algorithm - string stmpNamingType = ResolveString("AutoBackupNaming", - this.m_defaultState.NamingType.ToString(), config, regionConfig); + string stmpNamingType = regionConfig.GetString("AutoBackupNaming", m_defaultState.NamingType.ToString()); NamingType tmpNamingType; if (stmpNamingType.Equals("Time", StringComparison.CurrentCultureIgnoreCase)) - { tmpNamingType = NamingType.Time; - } else if (stmpNamingType.Equals("Sequential", StringComparison.CurrentCultureIgnoreCase)) - { tmpNamingType = NamingType.Sequential; - } else if (stmpNamingType.Equals("Overwrite", StringComparison.CurrentCultureIgnoreCase)) - { tmpNamingType = NamingType.Overwrite; - } else { m_log.Warn("Unknown naming type specified for region " + sRegionLabel + ": " + stmpNamingType); tmpNamingType = NamingType.Time; } + m_defaultState.NamingType = tmpNamingType; - if (state == null && tmpNamingType != this.m_defaultState.NamingType) - { - state = new AutoBackupModuleState(); - } - - if (state != null) - { - state.NamingType = tmpNamingType; - } + state.Script = regionConfig.GetString("AutoBackupScript", m_defaultState.Script); - string tmpScript = ResolveString("AutoBackupScript", - this.m_defaultState.Script, config, regionConfig); - if (state == null && tmpScript != this.m_defaultState.Script) + string tmpBackupDir = regionConfig.GetString("AutoBackupDir", "."); + // Let's give the user some convenience and auto-mkdir + if (tmpBackupDir != "." && tmpBackupDir != m_defaultState.BackupDir) { - state = new AutoBackupModuleState(); - } - - if (state != null) - { - state.Script = tmpScript; - } - - string tmpBackupDir = ResolveString("AutoBackupDir", ".", config, regionConfig); - if (state == null && tmpBackupDir != this.m_defaultState.BackupDir) - { - state = new AutoBackupModuleState(); - } - - if (state != null) - { - state.BackupDir = tmpBackupDir; - // Let's give the user some convenience and auto-mkdir - if (state.BackupDir != ".") + try { - try + DirectoryInfo dirinfo = new DirectoryInfo(state.BackupDir); + if (!dirinfo.Exists) { - DirectoryInfo dirinfo = new DirectoryInfo(state.BackupDir); - if (!dirinfo.Exists) - { - dirinfo.Create(); - } - } - catch (Exception e) - { - m_log.Warn( - "[AUTO BACKUP]: BAD NEWS. You won't be able to save backups to directory " + - state.BackupDir + - " because it doesn't exist or there's a permissions issue with it. Here's the exception.", - e); + dirinfo.Create(); } } + catch (Exception e) + { + m_log.Warn( + "[AUTO BACKUP]: BAD NEWS. You won't be able to save backups to directory " + + state.BackupDir + + " because it doesn't exist or there's a permissions issue with it:", + e); + } } - - if(state == null) - return m_defaultState; - + state.BackupDir = tmpBackupDir; return state; } @@ -584,128 +462,27 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup } /// - /// Helper function for ParseConfig. - /// - /// - /// - /// - /// - /// - private double ResolveDouble(string settingName, double defaultValue, IConfig global, IConfig local) - { - if (local != null) - { - return local.GetDouble(settingName, global.GetDouble(settingName, defaultValue)); - } - else - { - return global.GetDouble(settingName, defaultValue); - } - } - - /// - /// Helper function for ParseConfig. - /// - /// - /// - /// - /// - /// - private int ResolveInt(string settingName, int defaultValue, IConfig global, IConfig local) - { - if (local != null) - { - return local.GetInt(settingName, global.GetInt(settingName, defaultValue)); - } - else - { - return global.GetInt(settingName, defaultValue); - } - } - - /// - /// Helper function for ParseConfig. - /// - /// - /// - /// - /// - /// - private string ResolveString(string settingName, string defaultValue, IConfig global, IConfig local) - { - if (local != null) - { - return local.GetString(settingName, global.GetString(settingName, defaultValue)); - } - else - { - return global.GetString(settingName, defaultValue); - } - } - - /// /// Called when any auto-backup timer expires. This starts the code path for actually performing a backup. /// /// /// private void HandleElapsed(object sender, ElapsedEventArgs e) { - // TODO: heuristic thresholds are per-region, so we should probably run heuristics once per region - // XXX: Running heuristics once per region could add undue performance penalty for something that's supposed to - // check whether the region is too busy! Especially on sims with LOTS of regions. - // Alternative: make heuristics thresholds global to the module rather than per-region. Less flexible, - // but would allow us to be semantically correct while being easier on perf. - // Alternative 2: Run heuristics once per unique set of heuristics threshold parameters! Ay yi yi... - // Alternative 3: Don't support per-region heuristics at all; just accept them as a global only parameter. - // Since this is pretty experimental, I haven't decided which alternative makes the most sense. - if (this.m_closed) - { + if (!m_enabled || m_busy) return; - } - bool heuristicsRun = false; - bool heuristicsPassed = false; - if (!this.m_timerMap.ContainsKey((Timer) sender)) + + m_busy = true; + foreach (IScene scene in m_Scenes) { - m_log.Debug("[AUTO BACKUP]: Code-up error: timerMap doesn't contain timer " + sender); + if (!m_enabled) + return; + DoRegionBackup(scene); } - List tmap = this.m_timerMap[(Timer) sender]; - if (tmap != null && tmap.Count > 0) + if (m_enabled) { - foreach (IScene scene in tmap) - { - AutoBackupModuleState state = this.m_states[scene]; - bool heuristics = state.BusyCheck; - - // Fast path: heuristics are on; already ran em; and sim is fine; OR, no heuristics for the region. - if ((heuristics && heuristicsRun && heuristicsPassed) || !heuristics) - { - this.DoRegionBackup(scene); - // Heuristics are on; ran but we're too busy -- keep going. Maybe another region will have heuristics off! - } - else if (heuristicsRun) - { - m_log.Info("[AUTO BACKUP]: Heuristics: too busy to backup " + - scene.RegionInfo.RegionName + " right now."); - continue; - // Logical Deduction: heuristics are on but haven't been run - } - else - { - heuristicsPassed = this.RunHeuristics(scene); - heuristicsRun = true; - if (!heuristicsPassed) - { - m_log.Info("[AUTO BACKUP]: Heuristics: too busy to backup " + - scene.RegionInfo.RegionName + " right now."); - continue; - } - this.DoRegionBackup(scene); - } - - // Remove Old Backups - this.RemoveOldFiles(state); - } + m_masterTimer.Start(); + m_busy = false; } } @@ -723,8 +500,19 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup return; } - AutoBackupModuleState state = this.m_states[scene]; + m_busy = true; + + AutoBackupModuleState state; + if(!m_states.TryGetValue(scene, out state)) + return; + + if(state == null || !state.Enabled) + return; + IRegionArchiverModule iram = scene.RequestModuleInterface(); + if(iram == null) + return; + string savePath = BuildOarPath(scene.RegionInfo.RegionName, state.BackupDir, state.NamingType); @@ -733,11 +521,8 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup m_log.Warn("[AUTO BACKUP]: savePath is null in HandleElapsed"); return; } - Guid guid = Guid.NewGuid(); - m_pendingSaves.Add(guid, scene); - state.LiveRequests.Add(guid, savePath); - ((Scene) scene).EventManager.OnOarFileSaved += new EventManager.OarFileSaved(EventManager_OnOarFileSaved); + Guid guid = Guid.NewGuid(); m_log.Info("[AUTO BACKUP]: Backing up region " + scene.RegionInfo.RegionName); // Must pass options, even if dictionary is empty! @@ -747,6 +532,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup options["noassets"] = true; iram.ArchiveRegion(savePath, guid, options); + ExecuteScript(state.Script, savePath); } // For the given state, remove backup files older than the states KeepFilesForDays property @@ -774,23 +560,6 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup } } - /// - /// Called by the Event Manager when the OnOarFileSaved event is fired. - /// - /// - /// - void EventManager_OnOarFileSaved(Guid guid, string message) - { - // Ignore if the OAR save is being done by some other part of the system - if (m_pendingSaves.ContainsKey(guid)) - { - AutoBackupModuleState abms = m_states[(m_pendingSaves[guid])]; - ExecuteScript(abms.Script, abms.LiveRequests[guid]); - m_pendingSaves.Remove(guid); - abms.LiveRequests.Remove(guid); - } - } - /// This format may turn out to be too unwieldy to keep... /// Besides, that's what ctimes are for. But then how do I name each file uniquely without using a GUID? /// Sequential numbers, right? We support those, too! @@ -817,63 +586,6 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup return output; } - /// Return value of true ==> not too busy; false ==> too busy to backup an OAR right now, or error. - private bool RunHeuristics(IScene region) - { - try - { - return this.RunTimeDilationHeuristic(region) && this.RunAgentLimitHeuristic(region); - } - catch (Exception e) - { - m_log.Warn("[AUTO BACKUP]: Exception in RunHeuristics", e); - return false; - } - } - - /// - /// If the time dilation right at this instant is less than the threshold specified in AutoBackupDilationThreshold (default 0.5), - /// then we return false and trip the busy heuristic's "too busy" path (i.e. don't save an OAR). - /// AutoBackupDilationThreshold is a _LOWER BOUND_. Lower Time Dilation is bad, so if you go lower than our threshold, it's "too busy". - /// - /// - /// Returns true if we're not too busy; false means we've got worse time dilation than the threshold. - private bool RunTimeDilationHeuristic(IScene region) - { - string regionName = region.RegionInfo.RegionName; - return region.TimeDilation >= - this.m_configSource.Configs["AutoBackupModule"].GetFloat( - regionName + ".AutoBackupDilationThreshold", 0.5f); - } - - /// - /// If the root agent count right at this instant is less than the threshold specified in AutoBackupAgentThreshold (default 10), - /// then we return false and trip the busy heuristic's "too busy" path (i.e., don't save an OAR). - /// AutoBackupAgentThreshold is an _UPPER BOUND_. Higher Agent Count is bad, so if you go higher than our threshold, it's "too busy". - /// - /// - /// Returns true if we're not too busy; false means we've got more agents on the sim than the threshold. - private bool RunAgentLimitHeuristic(IScene region) - { - string regionName = region.RegionInfo.RegionName; - try - { - Scene scene = (Scene) region; - // TODO: Why isn't GetRootAgentCount() a method in the IScene interface? Seems generally useful... - return scene.GetRootAgentCount() <= - this.m_configSource.Configs["AutoBackupModule"].GetInt( - regionName + ".AutoBackupAgentThreshold", 10); - } - catch (InvalidCastException ice) - { - m_log.Debug( - "[AUTO BACKUP]: I NEED MAINTENANCE: IScene is not a Scene; can't get root agent count!", - ice); - return true; - // Non-obstructionist safest answer... - } - } - /// /// Run the script or executable specified by the "AutoBackupScript" config setting. /// Of course this is a security risk if you let anyone modify OpenSim.ini and they want to run some nasty bash script. @@ -920,18 +632,6 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup } /// - /// Quickly stop all timers from firing. - /// - private void StopAllTimers() - { - foreach (Timer t in this.m_timerMap.Keys) - { - t.Close(); - } - this.m_closed = true; - } - - /// /// Determine the next unique filename by number, for "Sequential" AutoBackupNamingType. /// /// @@ -1033,5 +733,3 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup } } } - - diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs index b90f0c4..be5f2ae 100644 --- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs +++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs @@ -38,26 +38,24 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup /// public class AutoBackupModuleState { - private Dictionary m_liveRequests = null; - public AutoBackupModuleState() { - this.Enabled = false; - this.BackupDir = "."; - this.BusyCheck = true; - this.SkipAssets = false; - this.Timer = null; - this.NamingType = NamingType.Time; - this.Script = null; - this.KeepFilesForDays = 0; + Enabled = false; + BackupDir = "."; + SkipAssets = false; + NamingType = NamingType.Time; + Script = null; + KeepFilesForDays = 0; } - public Dictionary LiveRequests + public AutoBackupModuleState(AutoBackupModuleState copyFrom) { - get { - return this.m_liveRequests ?? - (this.m_liveRequests = new Dictionary(1)); - } + Enabled = copyFrom.Enabled; + BackupDir = copyFrom.BackupDir; + SkipAssets = copyFrom.SkipAssets; + NamingType = copyFrom.NamingType; + Script = copyFrom.Script; + KeepFilesForDays = copyFrom.KeepFilesForDays; } public bool Enabled @@ -66,33 +64,6 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup set; } - public System.Timers.Timer Timer - { - get; - set; - } - - public double IntervalMinutes - { - get - { - if (this.Timer == null) - { - return -1.0; - } - else - { - return this.Timer.Interval / 60000.0; - } - } - } - - public bool BusyCheck - { - get; - set; - } - public bool SkipAssets { get; @@ -126,10 +97,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup public new string ToString() { string retval = ""; - retval += "[AUTO BACKUP]: AutoBackup: " + (Enabled ? "ENABLED" : "DISABLED") + "\n"; - retval += "[AUTO BACKUP]: Interval: " + IntervalMinutes + " minutes" + "\n"; - retval += "[AUTO BACKUP]: Do Busy Check: " + (BusyCheck ? "Yes" : "No") + "\n"; retval += "[AUTO BACKUP]: Naming Type: " + NamingType.ToString() + "\n"; retval += "[AUTO BACKUP]: Backup Dir: " + BackupDir + "\n"; retval += "[AUTO BACKUP]: Script: " + Script + "\n"; @@ -137,4 +105,3 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup } } } - -- cgit v1.1 From 36442c004f917442997df11d04bb473e8339d68b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 21 Jun 2017 03:56:43 +0100 Subject: changes to AutoBackModule. Add option ALL to dooarbackup to save all regions in instance --- .../OptionalModules/World/AutoBackup/AutoBackupModule.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs index eab6705..05321cd 100644 --- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs +++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs @@ -167,8 +167,8 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup m_console.Commands.AddCommand ( "AutoBackup", true, "dooarbackup", - "dooarbackup ", - "do single region backup into a oar. Identical to save oar but using AutoBackup settings for name etc", DoBackup); + "dooarbackup | ALL", + "saves the single region to a oar or ALL regions in instance to oars, using same settings as AutoBackup. Note it restarts time interval", DoBackup); m_busy = true; } @@ -287,6 +287,18 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup Scene s; try { + if(name == "ALL") + { + m_masterTimer.Stop(); + for(int i = 0; i < scenes.Length; i++) + { + s = scenes[i]; + DoRegionBackup(s); + } + m_busy = false; + return; + } + for(int i = 0; i < scenes.Length; i++) { s = scenes[i]; -- cgit v1.1 From 70da90273297dba5f1c4253f0ea8796575b26ed3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 21 Jun 2017 13:35:36 +0100 Subject: changes to AutoBackModule. Store folder and number of days expire is now also only defined in OpenSim.ini and so same for all regions. --- .../World/AutoBackup/AutoBackupModule.cs | 205 +++++++++------------ .../World/AutoBackup/AutoBackupModuleState.cs | 17 -- 2 files changed, 89 insertions(+), 133 deletions(-) diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs index 05321cd..a14d819 100644 --- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs +++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs @@ -66,7 +66,10 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup /// if false module is disable and all rest is ignored /// AutoBackupInterval: Double, non-negative value. Default: 720 (12 hours). /// The number of minutes between each backup attempt. - /// + /// AutoBackupDir: String. Default: "." (the current directory). + /// A directory (absolute or relative) where backups should be saved. + /// AutoBackupKeepFilesForDays remove files older than this number of days. 0 disables + /// /// Next can be set on OpenSim.ini, as default, and or per region in Regions.ini /// Region-specific settings take precedence. /// @@ -86,10 +89,8 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup /// AutoBackupNaming: string. Default: Time. /// One of three strings (case insensitive): /// "Time": Current timestamp is appended to file name. An existing file will never be overwritten. - /// "Sequential": A number is appended to the file name. So if RegionName_x.oar exists, we'll save to RegionName_{x+1}.oar next. An existing file will never be overwritten. - /// "Overwrite": Always save to file named "${AutoBackupDir}/RegionName.oar", even if we have to overwrite an existing file. - /// AutoBackupDir: String. Default: "." (the current directory). - /// A directory (absolute or relative) where backups should be saved. + /// "Sequential": A number is appended to the file name. So if RegionName_x.oar exists, we'll save to RegionName_{x+1}.oar next. An existing file will never be overwritten. + /// "Overwrite": Always save to file named "${AutoBackupDir}/RegionName.oar", even if we have to overwrite an existing file. /// [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "AutoBackupModule")] public class AutoBackupModule : ISharedRegionModule @@ -106,6 +107,10 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup private List m_Scenes = new List (); private Timer m_masterTimer; private bool m_busy; + private int m_KeepFilesForDays = -1; + private string m_backupDir; + private bool m_doneFirst; + private double m_baseInterval; private IConfigSource m_configSource; @@ -154,15 +159,19 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup if(!m_enabled) return; - m_log.Info("[AUTO BACKUP]: AutoBackupModule enabled"); - m_masterTimer = new Timer(43200000); - m_masterTimer.Elapsed += HandleElapsed; - m_masterTimer.AutoReset = false; + ParseDefaultConfig(moduleConfig); + if(!m_enabled) + return; - ParseDefaultConfig(); m_log.Debug("[AUTO BACKUP]: Default config:"); m_log.Debug(m_defaultState.ToString()); + m_log.Info("[AUTO BACKUP]: AutoBackupModule enabled"); + m_masterTimer = new Timer(); + m_masterTimer.Interval = m_baseInterval; + m_masterTimer.Elapsed += HandleElapsed; + m_masterTimer.AutoReset = false; + m_console = MainConsole.Instance; m_console.Commands.AddCommand ( @@ -251,7 +260,6 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup /// void ISharedRegionModule.PostInitialise() { - } #endregion @@ -261,18 +269,19 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup if (!m_enabled) return; - if(m_busy) + if (args.Length != 2) { - MainConsole.Instance.OutputFormat ("Already doing a backup, please try later"); + MainConsole.Instance.OutputFormat ("Usage: dooarbackup "); return; } - if (args.Length != 2) + if(m_busy) { - MainConsole.Instance.OutputFormat ("Usage: dooarbackup "); + MainConsole.Instance.OutputFormat ("Already doing a backup, please try later"); return; } + m_masterTimer.Stop(); m_busy = true; bool found = false; @@ -289,13 +298,13 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup { if(name == "ALL") { - m_masterTimer.Stop(); for(int i = 0; i < scenes.Length; i++) { s = scenes[i]; DoRegionBackup(s); + if (!m_enabled) + return; } - m_busy = false; return; } @@ -305,37 +314,56 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup if (s.Name == name) { found = true; - m_masterTimer.Stop(); DoRegionBackup(s); break; } } - } catch { } - + } + catch { } + finally + { + if (m_enabled) + m_masterTimer.Start(); + m_busy = false; + } if (!found) MainConsole.Instance.OutputFormat ("No such region {0}. Nothing to backup", name); - m_busy = false; } - private void ParseDefaultConfig() - { - IConfig config = m_configSource.Configs["AutoBackupModule"]; - if (config == null) - return; + private void ParseDefaultConfig(IConfig config) + { + + m_backupDir = "."; + string backupDir = config.GetString("AutoBackupDir", "."); + if (backupDir != ".") + { + try + { + DirectoryInfo dirinfo = new DirectoryInfo(backupDir); + if (!dirinfo.Exists) + dirinfo.Create(); + } + catch (Exception e) + { + m_enabled = false; + m_log.WarnFormat("[AUTO BACKUP]: Error accessing backup folder {0}. Module disabled. {1}", + backupDir, e); + return; + } + } + m_backupDir = backupDir; - // Borrow an existing timer if one exists for the same interval; otherwise, make a new one. double interval = config.GetDouble("AutoBackupInterval", 720); interval *= 60000.0; - m_masterTimer.Interval = interval; + m_baseInterval = interval; + + // How long to keep backup files in days, 0 Disables this feature + m_KeepFilesForDays = config.GetInt("AutoBackupKeepFilesForDays",m_KeepFilesForDays); m_defaultState.Enabled = config.GetBoolean("AutoBackup", m_defaultState.Enabled); - // Included Option To Skip Assets m_defaultState.SkipAssets = config.GetBoolean("AutoBackupSkipAssets",m_defaultState.SkipAssets); - // How long to keep backup files in days, 0 Disables this feature - m_defaultState.KeepFilesForDays = config.GetInt("AutoBackupKeepFilesForDays",m_defaultState.KeepFilesForDays); - // Set file naming algorithm string stmpNamingType = config.GetString("AutoBackupNaming", m_defaultState.NamingType.ToString()); NamingType tmpNamingType; @@ -354,25 +382,6 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup m_defaultState.Script = config.GetString("AutoBackupScript", m_defaultState.Script); - string backupDir = config.GetString("AutoBackupDir", "."); - if (backupDir != ".") - { - try - { - DirectoryInfo dirinfo = new DirectoryInfo(backupDir); - if (!dirinfo.Exists) - dirinfo.Create(); - } - catch (Exception e) - { - m_log.Warn( - "[AUTO BACKUP]: BAD NEWS. You won't be able to save backups to directory " + - backupDir + - " because it doesn't exist or there's a permissions issue with it. Here's the exception.", - e); - } - } - m_defaultState.BackupDir = backupDir; } /// @@ -388,11 +397,9 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup return null; string sRegionName; - string sRegionLabel; AutoBackupModuleState state = null; sRegionName = scene.RegionInfo.RegionName; - sRegionLabel = sRegionName; // Read the config settings and set variables. IConfig regionConfig = scene.Config.Configs[sRegionName]; @@ -406,9 +413,6 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup // Included Option To Skip Assets state.SkipAssets = regionConfig.GetBoolean("AutoBackupSkipAssets", m_defaultState.SkipAssets); - // How long to keep backup files in days, 0 Disables this feature - state.KeepFilesForDays = regionConfig.GetInt("AutoBackupKeepFilesForDays", m_defaultState.KeepFilesForDays); - // Set file naming algorithm string stmpNamingType = regionConfig.GetString("AutoBackupNaming", m_defaultState.NamingType.ToString()); NamingType tmpNamingType; @@ -420,58 +424,16 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup tmpNamingType = NamingType.Overwrite; else { - m_log.Warn("Unknown naming type specified for region " + sRegionLabel + ": " + + m_log.Warn("Unknown naming type specified for region " + sRegionName + ": " + stmpNamingType); tmpNamingType = NamingType.Time; } m_defaultState.NamingType = tmpNamingType; state.Script = regionConfig.GetString("AutoBackupScript", m_defaultState.Script); - - string tmpBackupDir = regionConfig.GetString("AutoBackupDir", "."); - // Let's give the user some convenience and auto-mkdir - if (tmpBackupDir != "." && tmpBackupDir != m_defaultState.BackupDir) - { - try - { - DirectoryInfo dirinfo = new DirectoryInfo(state.BackupDir); - if (!dirinfo.Exists) - { - dirinfo.Create(); - } - } - catch (Exception e) - { - m_log.Warn( - "[AUTO BACKUP]: BAD NEWS. You won't be able to save backups to directory " + - state.BackupDir + - " because it doesn't exist or there's a permissions issue with it:", - e); - } - } - state.BackupDir = tmpBackupDir; return state; } - /// - /// Helper function for ParseConfig. - /// - /// - /// - /// - /// - /// - private bool ResolveBoolean(string settingName, bool defaultValue, IConfig global, IConfig local) - { - if(local != null) - { - return local.GetBoolean(settingName, global.GetBoolean(settingName, defaultValue)); - } - else - { - return global.GetBoolean(settingName, defaultValue); - } - } /// /// Called when any auto-backup timer expires. This starts the code path for actually performing a backup. @@ -484,6 +446,9 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup return; m_busy = true; + if(m_doneFirst && m_KeepFilesForDays > 0) + RemoveOldFiles(); + foreach (IScene scene in m_Scenes) { if (!m_enabled) @@ -496,6 +461,8 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup m_masterTimer.Start(); m_busy = false; } + + m_doneFirst = true; } /// @@ -526,7 +493,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup return; string savePath = BuildOarPath(scene.RegionInfo.RegionName, - state.BackupDir, + m_backupDir, state.NamingType); if (savePath == null) { @@ -548,26 +515,32 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup } // For the given state, remove backup files older than the states KeepFilesForDays property - private void RemoveOldFiles(AutoBackupModuleState state) + private void RemoveOldFiles() { - // 0 Means Disabled, Keep Files Indefinitely - if (state.KeepFilesForDays > 0) + string[] files; + try { - string[] files = Directory.GetFiles(state.BackupDir, "*.oar"); - DateTime CuttOffDate = DateTime.Now.AddDays(0 - state.KeepFilesForDays); + files = Directory.GetFiles(m_backupDir, "*.oar"); + } + catch (Exception Ex) + { + m_log.Error("[AUTO BACKUP]: Error reading backup folder " + m_backupDir + ": " + Ex.Message); + return; + } - foreach (string file in files) + DateTime CuttOffDate = DateTime.Now.AddDays(-m_KeepFilesForDays); + + foreach (string file in files) + { + try { - try - { - FileInfo fi = new FileInfo(file); - if (fi.CreationTime < CuttOffDate) - fi.Delete(); - } - catch (Exception Ex) - { - m_log.Error("[AUTO BACKUP]: Error deleting old backup file '" + file + "': " + Ex.Message); - } + FileInfo fi = new FileInfo(file); + if (fi.CreationTime < CuttOffDate) + fi.Delete(); + } + catch (Exception Ex) + { + m_log.Error("[AUTO BACKUP]: Error deleting old backup file '" + file + "': " + Ex.Message); } } } diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs index be5f2ae..fb87677 100644 --- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs +++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs @@ -41,21 +41,17 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup public AutoBackupModuleState() { Enabled = false; - BackupDir = "."; SkipAssets = false; NamingType = NamingType.Time; Script = null; - KeepFilesForDays = 0; } public AutoBackupModuleState(AutoBackupModuleState copyFrom) { Enabled = copyFrom.Enabled; - BackupDir = copyFrom.BackupDir; SkipAssets = copyFrom.SkipAssets; NamingType = copyFrom.NamingType; Script = copyFrom.Script; - KeepFilesForDays = copyFrom.KeepFilesForDays; } public bool Enabled @@ -76,30 +72,17 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup set; } - public string BackupDir - { - get; - set; - } - public NamingType NamingType { get; set; } - public int KeepFilesForDays - { - get; - set; - } - public new string ToString() { string retval = ""; retval += "[AUTO BACKUP]: AutoBackup: " + (Enabled ? "ENABLED" : "DISABLED") + "\n"; retval += "[AUTO BACKUP]: Naming Type: " + NamingType.ToString() + "\n"; - retval += "[AUTO BACKUP]: Backup Dir: " + BackupDir + "\n"; retval += "[AUTO BACKUP]: Script: " + Script + "\n"; return retval; } -- cgit v1.1 From 637d35631cd88258d5f3da44c2959985a047ae2d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 21 Jun 2017 18:39:58 +0100 Subject: make oar/iar assets writer be done by caller thread like the rest of the oar/iar save. This may look more painfull but should reduce errors and threads fights. Fill lucky i just don't stop the entire simulation during this --- .../Archiver/InventoryArchiveWriteRequest.cs | 6 +- .../World/Archiver/ArchiveWriteRequest.cs | 7 +- .../CoreModules/World/Archiver/AssetsRequest.cs | 213 +++++---------------- 3 files changed, 50 insertions(+), 176 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index f002ad7..dde93db 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -423,14 +423,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver m_log.DebugFormat( "[INVENTORY ARCHIVER]: Saving {0} assets for items", m_assetGatherer.GatheredUuids.Count); - AssetsRequest ar - = new AssetsRequest( + AssetsRequest ar = new AssetsRequest( new AssetsArchiver(m_archiveWriter), m_assetGatherer.GatheredUuids, m_scene.AssetService, m_scene.UserAccountService, m_scene.RegionInfo.ScopeID, options, ReceivedAllAssets); - - WorkManager.RunInThread(o => ar.Execute(), null, string.Format("AssetsRequest ({0})", m_scene.Name)); + ar.Execute(); } else { diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs index 8dabcee..5037219 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs @@ -195,14 +195,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver m_log.DebugFormat("[ARCHIVER]: Saving {0} assets", assetUuids.Count); // Asynchronously request all the assets required to perform this archive operation - AssetsRequest ar - = new AssetsRequest( + AssetsRequest ar = new AssetsRequest( new AssetsArchiver(m_archiveWriter), assetUuids, m_rootScene.AssetService, m_rootScene.UserAccountService, m_rootScene.RegionInfo.ScopeID, options, ReceivedAllAssets); - WorkManager.RunInThread(o => ar.Execute(), null, "Archive Assets Request"); - +// WorkManager.RunInThread(o => ar.Execute(), null, "Archive Assets Request"); + ar.Execute(); // CloseArchive() will be called from ReceivedAllAssets() } else diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index d380da8..f303498 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs @@ -62,24 +62,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver }; /// - /// Timeout threshold if we still need assets or missing asset notifications but have stopped receiving them - /// from the asset service - /// - protected const int TIMEOUT = 60 * 1000; - - /// - /// If a timeout does occur, limit the amount of UUID information put to the console. - /// - protected const int MAX_UUID_DISPLAY_ON_TIMEOUT = 3; - - protected System.Timers.Timer m_requestCallbackTimer; - - /// - /// State of this request - /// - private RequestState m_requestState = RequestState.Initial; - - /// /// uuids to request /// protected IDictionary m_uuids; @@ -104,6 +86,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// private int m_repliesRequired; + private System.Timers.Timer m_timeOutTimer; + private bool m_timeout; + /// /// Asset service used to request the assets /// @@ -129,186 +114,76 @@ namespace OpenSim.Region.CoreModules.World.Archiver m_scopeID = scope; m_options = options; m_repliesRequired = uuids.Count; - - // FIXME: This is a really poor way of handling the timeout since it will always leave the original requesting thread - // hanging. Need to restructure so an original request thread waits for a ManualResetEvent on asset received - // so we can properly abort that thread. Or request all assets synchronously, though that would be a more - // radical change - m_requestCallbackTimer = new System.Timers.Timer(TIMEOUT); - m_requestCallbackTimer.AutoReset = false; - m_requestCallbackTimer.Elapsed += new ElapsedEventHandler(OnRequestCallbackTimeout); } protected internal void Execute() { - m_requestState = RequestState.Running; - + Culture.SetCurrentCulture(); m_log.DebugFormat("[ARCHIVER]: AssetsRequest executed looking for {0} possible assets", m_repliesRequired); // We can stop here if there are no assets to fetch if (m_repliesRequired == 0) { - m_requestState = RequestState.Completed; PerformAssetsRequestCallback(false); return; } - m_requestCallbackTimer.Enabled = true; + m_timeOutTimer = new System.Timers.Timer(60000); + m_timeOutTimer .AutoReset = false; + m_timeOutTimer.Elapsed += OnTimeout; + m_timeout = false; foreach (KeyValuePair kvp in m_uuids) { -// m_log.DebugFormat("[ARCHIVER]: Requesting asset {0}", kvp.Key); - -// m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback); - AssetBase asset = m_assetService.Get(kvp.Key.ToString()); - PreAssetRequestCallback(kvp.Key.ToString(), kvp.Value, asset); - } - } - - protected void OnRequestCallbackTimeout(object source, ElapsedEventArgs args) - { - bool timedOut = true; - - try - { - lock (this) + string thiskey = kvp.Key.ToString(); + try { - // Take care of the possibilty that this thread started but was paused just outside the lock before - // the final request came in (assuming that such a thing is possible) - if (m_requestState == RequestState.Completed) + m_timeOutTimer.Enabled = true; + AssetBase asset = m_assetService.Get(thiskey); + if(m_timeout) + break; + + m_timeOutTimer.Enabled = false; + + if(asset == null) { - timedOut = false; - return; + m_notFoundAssetUuids.Add(new UUID(thiskey)); + continue; } - m_requestState = RequestState.Aborted; - } - - // Calculate which uuids were not found. This is an expensive way of doing it, but this is a failure - // case anyway. - List uuids = new List(); - foreach (UUID uuid in m_uuids.Keys) - { - uuids.Add(uuid); - } - - foreach (UUID uuid in m_foundAssetUuids) - { - uuids.Remove(uuid); - } + sbyte assetType = kvp.Value; + if (asset != null && assetType == (sbyte)AssetType.Unknown) + { + m_log.InfoFormat("[ARCHIVER]: Rewriting broken asset type for {0} to {1}", thiskey, SLUtil.AssetTypeFromCode(assetType)); + asset.Type = assetType; + } - foreach (UUID uuid in m_notFoundAssetUuids) - { - uuids.Remove(uuid); + m_foundAssetUuids.Add(asset.FullID); + m_assetsArchiver.WriteAsset(PostProcess(asset)); } - m_log.ErrorFormat( - "[ARCHIVER]: Asset service failed to return information about {0} requested assets", uuids.Count); - - int i = 0; - foreach (UUID uuid in uuids) + catch (Exception e) { - m_log.ErrorFormat("[ARCHIVER]: No information about asset {0} received", uuid); - - if (++i >= MAX_UUID_DISPLAY_ON_TIMEOUT) - break; + m_log.ErrorFormat("[ARCHIVER]: Execute failed with {0}", e); } - - if (uuids.Count > MAX_UUID_DISPLAY_ON_TIMEOUT) - m_log.ErrorFormat( - "[ARCHIVER]: (... {0} more not shown)", uuids.Count - MAX_UUID_DISPLAY_ON_TIMEOUT); - - m_log.Error("[ARCHIVER]: Archive save aborted. PLEASE DO NOT USE THIS ARCHIVE, IT WILL BE INCOMPLETE."); - } - catch (Exception e) - { - m_log.ErrorFormat("[ARCHIVER]: Timeout handler exception {0}{1}", e.Message, e.StackTrace); - } - finally - { - if (timedOut) - WorkManager.RunInThread(PerformAssetsRequestCallback, true, "Archive Assets Request Callback"); } - } - - protected void PreAssetRequestCallback(string fetchedAssetID, object assetType, AssetBase fetchedAsset) - { - // Check for broken asset types and fix them with the AssetType gleaned by UuidGatherer - if (fetchedAsset != null && fetchedAsset.Type == (sbyte)AssetType.Unknown) - { - m_log.InfoFormat("[ARCHIVER]: Rewriting broken asset type for {0} to {1}", fetchedAsset.ID, SLUtil.AssetTypeFromCode((sbyte)assetType)); - fetchedAsset.Type = (sbyte)assetType; - } - - AssetRequestCallback(fetchedAssetID, this, fetchedAsset); - } - - /// - /// Called back by the asset cache when it has the asset - /// - /// - /// - public void AssetRequestCallback(string id, object sender, AssetBase asset) - { - Culture.SetCurrentCulture(); - - try - { - lock (this) - { - //m_log.DebugFormat("[ARCHIVER]: Received callback for asset {0}", id); - - m_requestCallbackTimer.Stop(); - - if ((m_requestState == RequestState.Aborted) || (m_requestState == RequestState.Completed)) - { - m_log.WarnFormat( - "[ARCHIVER]: Received information about asset {0} while in state {1}. Ignoring.", - id, m_requestState); - - return; - } - if (asset != null) - { -// m_log.DebugFormat("[ARCHIVER]: Writing asset {0}", id); - m_foundAssetUuids.Add(asset.FullID); + m_timeOutTimer.Dispose(); - m_assetsArchiver.WriteAsset(PostProcess(asset)); - } - else - { -// m_log.DebugFormat("[ARCHIVER]: Recording asset {0} as not found", id); - m_notFoundAssetUuids.Add(new UUID(id)); - } - - if (m_foundAssetUuids.Count + m_notFoundAssetUuids.Count >= m_repliesRequired) - { - m_requestState = RequestState.Completed; - if(m_notFoundAssetUuids.Count == 0) - m_log.DebugFormat( - "[ARCHIVER]: Successfully added {0} assets", - m_foundAssetUuids.Count); - else - m_log.DebugFormat( - "[ARCHIVER]: Successfully added {0} assets ({1} assets not found but these may be expected invalid references)", + if(m_timeout) + m_log.DebugFormat("[ARCHIVER]: Aborted because AssetService request timeout. Successfully added {0} assets", m_foundAssetUuids.Count); + else if(m_notFoundAssetUuids.Count == 0) + m_log.DebugFormat("[ARCHIVER]: Successfully added all {0} assets", m_foundAssetUuids.Count); + else + m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} assets not found)", m_foundAssetUuids.Count, m_notFoundAssetUuids.Count); - - // We want to stop using the asset cache thread asap - // as we now need to do the work of producing the rest of the archive - WorkManager.RunInThread(PerformAssetsRequestCallback, false, "Archive Assets Request Callback"); - } - else - { - m_requestCallbackTimer.Start(); - } - } - } - catch (Exception e) - { - m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}", e); - } + PerformAssetsRequestCallback(m_timeout); + } + + void OnTimeout(object source, ElapsedEventArgs args) + { + m_timeout = true; } /// @@ -316,6 +191,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// protected void PerformAssetsRequestCallback(object o) { + if(m_assetsRequestCallback == null) + return; Culture.SetCurrentCulture(); Boolean timedOut = (Boolean)o; -- cgit v1.1 From 1bfe4da3785ebed17735fdbda7638757bc83269e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 21 Jun 2017 20:15:35 +0100 Subject: do not try to store on oars temporary or in transit objects ( they may be deleted during the save) --- .../CoreModules/World/Archiver/ArchiveWriteRequest.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs index 5037219..e6ea5d1 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs @@ -193,22 +193,20 @@ namespace OpenSim.Region.CoreModules.World.Archiver if (SaveAssets) { m_log.DebugFormat("[ARCHIVER]: Saving {0} assets", assetUuids.Count); - - // Asynchronously request all the assets required to perform this archive operation + AssetsRequest ar = new AssetsRequest( new AssetsArchiver(m_archiveWriter), assetUuids, m_rootScene.AssetService, m_rootScene.UserAccountService, - m_rootScene.RegionInfo.ScopeID, options, ReceivedAllAssets); - -// WorkManager.RunInThread(o => ar.Execute(), null, "Archive Assets Request"); + m_rootScene.RegionInfo.ScopeID, options, null); ar.Execute(); - // CloseArchive() will be called from ReceivedAllAssets() + assetUuids = null; } else { m_log.DebugFormat("[ARCHIVER]: Not saving assets since --noassets was specified"); - CloseArchive(string.Empty); +// CloseArchive(string.Empty); } + CloseArchive(string.Empty); } catch (Exception e) { @@ -236,7 +234,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver { SceneObjectGroup sceneObject = (SceneObjectGroup)entity; - if (!sceneObject.IsDeleted && !sceneObject.IsAttachment) + if (!sceneObject.IsDeleted && !sceneObject.IsAttachment && !sceneObject.IsTemporary && !sceneObject.inTransit) { if (!CanUserArchiveObject(scene.RegionInfo.EstateSettings.EstateOwner, sceneObject, FilterContent, permissionsModule)) { @@ -571,7 +569,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver foreach (SceneObjectGroup sceneObject in sceneObjects) { //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); - + if(sceneObject.IsDeleted || sceneObject.inTransit) + continue; string serializedObject = serializer.SerializeGroupToXml2(sceneObject, m_options); string objectPath = string.Format("{0}{1}", regionDir, ArchiveHelpers.CreateObjectPath(sceneObject)); m_archiveWriter.WriteFile(objectPath, serializedObject); -- cgit v1.1 From 11d38607811d1f2dca58bc3d99b4ad698d6b228a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 21 Jun 2017 21:38:12 +0100 Subject: avoid some broken object assets present in osgrid inventories due to past problems, etc --- .../Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | 2 ++ .../Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 6 ++++-- OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 9 +++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index dde93db..2735b59 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -381,6 +381,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); Exception e = new InventoryArchiverException(errorMessage); m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e, 0, 0); + if(m_saveStream != null && m_saveStream.CanWrite) + m_saveStream.Close(); throw e; } diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index be59eb5..06aec7b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -218,7 +218,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver // { try { - new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(options, UserAccountService); + InventoryArchiveWriteRequest iarReq = new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream); + iarReq.Execute(options, UserAccountService); } catch (EntryPointNotFoundException e) { @@ -261,7 +262,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver // { try { - new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(options, UserAccountService); + InventoryArchiveWriteRequest iarReq = new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath); + iarReq.Execute(options, UserAccountService); } catch (EntryPointNotFoundException e) { diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 5a9a5a0..bac069b 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -142,6 +142,8 @@ namespace OpenSim.Region.Framework.Scenes { // m_log.DebugFormat( // "[ASSET GATHERER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID); + if(sceneObject.IsDeleted) + return; SceneObjectPart[] parts = sceneObject.Parts; for (int i = 0; i < parts.Length; i++) @@ -489,6 +491,13 @@ namespace OpenSim.Region.Framework.Scenes /// private void RecordSceneObjectAssetUuids(AssetBase sceneObjectAsset) { + if(sceneObjectAsset.Data == null || sceneObjectAsset.Data.Length == 0) + { + m_log.WarnFormat("[UUIDgatherer] Error: object asset '{0}' id: {1} has no data", + sceneObjectAsset.Name,sceneObjectAsset.ID.ToString()); + return; + } + string xml = Utils.BytesToString(sceneObjectAsset.Data); CoalescedSceneObjects coa; -- cgit v1.1 From 66c8b7202bff02753060e093712b7053acaf8358 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 22 Jun 2017 19:38:38 +0100 Subject: split some asset uuids gather i stages with dif possible errors, and dont let them be fatal --- OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 77 +++++++++++++++---------- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index bac069b..3ba67eb 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -284,45 +284,58 @@ namespace OpenSim.Region.Framework.Scenes if (GatheredUuids.ContainsKey(assetUuid)) return; + AssetBase assetBase; try { - AssetBase assetBase = GetAsset(assetUuid); + assetBase = GetAsset(assetUuid); + } + catch (Exception e) + { + m_log.ErrorFormat("[UUID GATHERER]: Failed to get asset id {0} : {1}", assetUuid, e.Message); + GatheredUuids.Remove(assetUuid); + return; + } - if (null != assetBase) - { - sbyte assetType = assetBase.Type; - GatheredUuids[assetUuid] = assetType; + if(assetBase == null) + { + m_log.ErrorFormat("[UUID GATHERER]: asset id {0} not found", assetUuid); + GatheredUuids.Remove(assetUuid); + return; + } - if ((sbyte)AssetType.Bodypart == assetType || (sbyte)AssetType.Clothing == assetType) - { - RecordWearableAssetUuids(assetBase); - } - else if ((sbyte)AssetType.Gesture == assetType) - { - RecordGestureAssetUuids(assetBase); - } - else if ((sbyte)AssetType.Notecard == assetType) - { - RecordTextEmbeddedAssetUuids(assetBase); - } - else if ((sbyte)AssetType.LSLText == assetType) - { - RecordTextEmbeddedAssetUuids(assetBase); - } - else if ((sbyte)OpenSimAssetType.Material == assetType) - { - RecordMaterialAssetUuids(assetBase); - } - else if ((sbyte)AssetType.Object == assetType) - { - RecordSceneObjectAssetUuids(assetBase); - } + sbyte assetType = assetBase.Type; + GatheredUuids[assetUuid] = assetType; + + try + { + if ((sbyte)AssetType.Bodypart == assetType || (sbyte)AssetType.Clothing == assetType) + { + RecordWearableAssetUuids(assetBase); + } + else if ((sbyte)AssetType.Gesture == assetType) + { + RecordGestureAssetUuids(assetBase); + } + else if ((sbyte)AssetType.Notecard == assetType) + { + RecordTextEmbeddedAssetUuids(assetBase); + } + else if ((sbyte)AssetType.LSLText == assetType) + { + RecordTextEmbeddedAssetUuids(assetBase); + } + else if ((sbyte)OpenSimAssetType.Material == assetType) + { + RecordMaterialAssetUuids(assetBase); + } + else if ((sbyte)AssetType.Object == assetType) + { + RecordSceneObjectAssetUuids(assetBase); } } - catch (Exception) + catch (Exception e) { - m_log.ErrorFormat("[UUID GATHERER]: Failed to gather uuids for asset id {0}", assetUuid); - throw; + m_log.ErrorFormat("[UUID GATHERER]: Failed to uuids for asset id {0} type {1}: {2}", assetUuid, assetType, e.Message); } } -- cgit v1.1 From aea49070c96b04d0f5e2496c14d32c1b1341b06f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 22 Jun 2017 21:37:51 +0100 Subject: change uuidgather a bit more --- OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 48 ++++++++++++++++--------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 3ba67eb..3a71c12 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -65,6 +65,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// The gathered uuids. public IDictionary GatheredUuids { get; private set; } + public HashSet FailedUUIDs { get; private set; } /// /// Gets the next UUID to inspect. @@ -111,6 +112,7 @@ namespace OpenSim.Region.Framework.Scenes // FIXME: Not efficient for searching, can improve. m_assetUuidsToInspect = new Queue(); + FailedUUIDs = new HashSet(); } /// @@ -120,6 +122,10 @@ namespace OpenSim.Region.Framework.Scenes /// UUID. public bool AddForInspection(UUID uuid) { + if(FailedUUIDs.Contains(uuid)) + return false; + if(GatheredUuids.ContainsKey(uuid)) + return false; if (m_assetUuidsToInspect.Contains(uuid)) return false; @@ -209,9 +215,7 @@ namespace OpenSim.Region.Framework.Scenes // m_log.DebugFormat( // "[ARCHIVER]: Analysing item {0} asset type {1} in {2} {3}", // tii.Name, tii.Type, part.Name, part.UUID); - - if (!GatheredUuids.ContainsKey(tii.AssetID)) - AddForInspection(tii.AssetID, (sbyte)tii.Type); + AddForInspection(tii.AssetID, (sbyte)tii.Type); } // FIXME: We need to make gathering modular but we cannot yet, since gatherers are not guaranteed @@ -280,9 +284,15 @@ namespace OpenSim.Region.Framework.Scenes /// The uuid of the asset for which to gather referenced assets private void GetAssetUuids(UUID assetUuid) { + if(FailedUUIDs.Contains(assetUuid)) + return; + // avoid infinite loops if (GatheredUuids.ContainsKey(assetUuid)) + { + FailedUUIDs.Add(assetUuid); return; + } AssetBase assetBase; try @@ -291,21 +301,28 @@ namespace OpenSim.Region.Framework.Scenes } catch (Exception e) { - m_log.ErrorFormat("[UUID GATHERER]: Failed to get asset id {0} : {1}", assetUuid, e.Message); - GatheredUuids.Remove(assetUuid); + m_log.ErrorFormat("[UUID GATHERER]: Failed to get asset with id {0} : {1}", assetUuid, e.Message); + FailedUUIDs.Add(assetUuid); return; } if(assetBase == null) { - m_log.ErrorFormat("[UUID GATHERER]: asset id {0} not found", assetUuid); - GatheredUuids.Remove(assetUuid); + m_log.ErrorFormat("[UUID GATHERER]: asset with id {0} not found", assetUuid); + FailedUUIDs.Add(assetUuid); return; } sbyte assetType = assetBase.Type; - GatheredUuids[assetUuid] = assetType; + if(assetBase.Data == null || assetBase.Data.Length == 0) + { + m_log.ErrorFormat("[UUID GATHERER]: asset with id {0} type {1} has no data", assetUuid, assetType); + FailedUUIDs.Add(assetUuid); + return; + } + + GatheredUuids[assetUuid] = assetType; try { if ((sbyte)AssetType.Bodypart == assetType || (sbyte)AssetType.Clothing == assetType) @@ -335,13 +352,19 @@ namespace OpenSim.Region.Framework.Scenes } catch (Exception e) { - m_log.ErrorFormat("[UUID GATHERER]: Failed to uuids for asset id {0} type {1}: {2}", assetUuid, assetType, e.Message); + m_log.ErrorFormat("[UUID GATHERER]: Failed to gather uuids for asset with id {0} type {1}: {2}", assetUuid, assetType, e.Message); + GatheredUuids.Remove(assetUuid); + FailedUUIDs.Add(assetUuid); } } private void AddForInspection(UUID assetUuid, sbyte assetType) { // Here, we want to collect uuids which require further asset fetches but mark the others as gathered + if(FailedUUIDs.Contains(assetUuid)) + return; + if(GatheredUuids.ContainsKey(assetUuid)) + return; try { if ((sbyte)AssetType.Bodypart == assetType @@ -504,13 +527,6 @@ namespace OpenSim.Region.Framework.Scenes /// private void RecordSceneObjectAssetUuids(AssetBase sceneObjectAsset) { - if(sceneObjectAsset.Data == null || sceneObjectAsset.Data.Length == 0) - { - m_log.WarnFormat("[UUIDgatherer] Error: object asset '{0}' id: {1} has no data", - sceneObjectAsset.Name,sceneObjectAsset.ID.ToString()); - return; - } - string xml = Utils.BytesToString(sceneObjectAsset.Data); CoalescedSceneObjects coa; -- cgit v1.1 From cbae148f6865e750bdbaeb4ba4eede56464d651e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 22 Jun 2017 21:48:26 +0100 Subject: show the count of broken assets we now have from gather on iar/oar pre save information --- OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs index e6ea5d1..ce296c7 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs @@ -262,6 +262,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver m_log.DebugFormat( "[ARCHIVER]: {0} scene objects to serialize requiring save of {1} assets", sceneObjects.Count, assetUuids.Count - prevAssets); + int errors = assetGatherer.FailedUUIDs.Count; + if(errors > 0) + m_log.DebugFormat("[ARCHIVER]: {0} assets have problems and will be ignored", errors); } if (numObjectsSkippedPermissions > 0) -- cgit v1.1 From 28caf1e08974a29c689837b99a4d21217aa54847 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 22 Jun 2017 22:09:00 +0100 Subject: actually iar do it for iar --- .../Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | 3 +++ OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 2735b59..c218f5d 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -424,6 +424,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver m_log.DebugFormat( "[INVENTORY ARCHIVER]: Saving {0} assets for items", m_assetGatherer.GatheredUuids.Count); + int errors = m_assetGatherer.FailedUUIDs.Count; + if(errors > 0) + m_log.DebugFormat("[INVENTORY ARCHIVER]: aditional {0} assets have problems and will be ignored", errors); AssetsRequest ar = new AssetsRequest( new AssetsArchiver(m_archiveWriter), diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs index ce296c7..761fece 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs @@ -264,7 +264,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver sceneObjects.Count, assetUuids.Count - prevAssets); int errors = assetGatherer.FailedUUIDs.Count; if(errors > 0) - m_log.DebugFormat("[ARCHIVER]: {0} assets have problems and will be ignored", errors); + m_log.DebugFormat("[ARCHIVER]: aditional {0} assets have problems and will be ignored", errors); } if (numObjectsSkippedPermissions > 0) -- cgit v1.1 From 3c6790b061fe1dd6d7cf602a3eb082b5bd149012 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 23 Jun 2017 15:50:16 +0100 Subject: several changes to iar/oar assets error reports --- .../Inventory/Archiver/InventoryArchiveWriteRequest.cs | 10 ++++++---- .../CoreModules/World/Archiver/ArchiveWriteRequest.cs | 16 +++++++++------- .../CoreModules/World/Archiver/AssetsArchiver.cs | 2 +- .../Region/CoreModules/World/Archiver/AssetsRequest.cs | 18 ++++++++++-------- OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 13 +++++++------ 5 files changed, 33 insertions(+), 26 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index c218f5d..144cbbe 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -422,15 +422,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { m_assetGatherer.GatherAll(); - m_log.DebugFormat( - "[INVENTORY ARCHIVER]: Saving {0} assets for items", m_assetGatherer.GatheredUuids.Count); int errors = m_assetGatherer.FailedUUIDs.Count; + + m_log.DebugFormat( + "[INVENTORY ARCHIVER]: The items to save reference {0} assets", m_assetGatherer.GatheredUuids.Count + errors); if(errors > 0) - m_log.DebugFormat("[INVENTORY ARCHIVER]: aditional {0} assets have problems and will be ignored", errors); + m_log.DebugFormat("[INVENTORY ARCHIVER]: {0} of this assets have problems and will be ignored", errors); AssetsRequest ar = new AssetsRequest( new AssetsArchiver(m_archiveWriter), - m_assetGatherer.GatheredUuids, m_scene.AssetService, + m_assetGatherer.GatheredUuids, m_assetGatherer.FailedUUIDs.Count, + m_scene.AssetService, m_scene.UserAccountService, m_scene.RegionInfo.ScopeID, options, ReceivedAllAssets); ar.Execute(); diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs index 761fece..9500eb6 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs @@ -181,11 +181,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver // Archive the regions Dictionary assetUuids = new Dictionary(); + HashSet failedIDs = new HashSet(); scenesGroup.ForEachScene(delegate(Scene scene) { string regionDir = MultiRegionFormat ? scenesGroup.GetRegionDir(scene.RegionInfo.RegionID) : ""; - ArchiveOneRegion(scene, regionDir, assetUuids); + ArchiveOneRegion(scene, regionDir, assetUuids, failedIDs); }); // Archive the assets @@ -196,6 +197,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver AssetsRequest ar = new AssetsRequest( new AssetsArchiver(m_archiveWriter), assetUuids, + failedIDs.Count, m_rootScene.AssetService, m_rootScene.UserAccountService, m_rootScene.RegionInfo.ScopeID, options, null); ar.Execute(); @@ -215,7 +217,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver } } - private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary assetUuids) + private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary assetUuids, HashSet failedIDs) { m_log.InfoFormat("[ARCHIVER]: Writing region {0}", scene.Name); @@ -251,7 +253,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver if (SaveAssets) { - UuidGatherer assetGatherer = new UuidGatherer(scene.AssetService, assetUuids); + UuidGatherer assetGatherer = new UuidGatherer(scene.AssetService, assetUuids, failedIDs); int prevAssets = assetUuids.Count; foreach (SceneObjectGroup sceneObject in sceneObjects) @@ -259,12 +261,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver assetGatherer.GatherAll(); - m_log.DebugFormat( - "[ARCHIVER]: {0} scene objects to serialize requiring save of {1} assets", - sceneObjects.Count, assetUuids.Count - prevAssets); int errors = assetGatherer.FailedUUIDs.Count; + m_log.DebugFormat( + "[ARCHIVER]: {0} region scene objects to save reference {1} assets", + sceneObjects.Count, assetUuids.Count - prevAssets + errors); if(errors > 0) - m_log.DebugFormat("[ARCHIVER]: aditional {0} assets have problems and will be ignored", errors); + m_log.DebugFormat("[ARCHIVER]: {0} of this assets have problems and will be ignored", errors); } if (numObjectsSkippedPermissions > 0) diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs index efacae3..3092fe0 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs @@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// /// Post a message to the log every x assets as a progress bar /// - protected static int LOG_ASSET_LOAD_NOTIFICATION_INTERVAL = 50; + protected static int LOG_ASSET_LOAD_NOTIFICATION_INTERVAL = 100; /// /// Keep a count of the number of assets written so that we can provide status updates diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index f303498..903cb2d 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs @@ -65,6 +65,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// uuids to request /// protected IDictionary m_uuids; + private int m_previusErrorsCount; /// /// Callback used when all the assets requested have been received. @@ -102,12 +103,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver protected internal AssetsRequest( AssetsArchiver assetsArchiver, IDictionary uuids, + int previusErrorsCount, IAssetService assetService, IUserAccountService userService, UUID scope, Dictionary options, AssetsRequestCallback assetsRequestCallback) { m_assetsArchiver = assetsArchiver; m_uuids = uuids; + m_previusErrorsCount = previusErrorsCount; m_assetsRequestCallback = assetsRequestCallback; m_assetService = assetService; m_userAccountService = userService; @@ -119,8 +122,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver protected internal void Execute() { Culture.SetCurrentCulture(); - m_log.DebugFormat("[ARCHIVER]: AssetsRequest executed looking for {0} possible assets", m_repliesRequired); - // We can stop here if there are no assets to fetch if (m_repliesRequired == 0) { @@ -169,19 +170,20 @@ namespace OpenSim.Region.CoreModules.World.Archiver } m_timeOutTimer.Dispose(); + int totalerrors = m_notFoundAssetUuids.Count + m_previusErrorsCount; if(m_timeout) m_log.DebugFormat("[ARCHIVER]: Aborted because AssetService request timeout. Successfully added {0} assets", m_foundAssetUuids.Count); - else if(m_notFoundAssetUuids.Count == 0) + else if(totalerrors == 0) m_log.DebugFormat("[ARCHIVER]: Successfully added all {0} assets", m_foundAssetUuids.Count); else - m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} assets not found)", - m_foundAssetUuids.Count, m_notFoundAssetUuids.Count); + m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} assets of total request where not found or are damaged", + m_foundAssetUuids.Count, totalerrors); PerformAssetsRequestCallback(m_timeout); } - void OnTimeout(object source, ElapsedEventArgs args) + private void OnTimeout(object source, ElapsedEventArgs args) { m_timeout = true; } @@ -189,7 +191,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// /// Perform the callback on the original requester of the assets /// - protected void PerformAssetsRequestCallback(object o) + private void PerformAssetsRequestCallback(object o) { if(m_assetsRequestCallback == null) return; @@ -208,7 +210,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver } } - protected AssetBase PostProcess(AssetBase asset) + private AssetBase PostProcess(AssetBase asset) { if (asset.Type == (sbyte)AssetType.Object && asset.Data != null && m_options.ContainsKey("home")) { diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 3a71c12..548aa3a 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -93,7 +93,8 @@ namespace OpenSim.Region.Framework.Scenes /// /// Asset service. /// - public UuidGatherer(IAssetService assetService) : this(assetService, new Dictionary()) {} + public UuidGatherer(IAssetService assetService) : this(assetService, new Dictionary(), new HashSet ()) {} + public UuidGatherer(IAssetService assetService, IDictionary collector) : this(assetService, collector, new HashSet ()) {} /// /// Initializes a new instance of the class. @@ -105,14 +106,14 @@ namespace OpenSim.Region.Framework.Scenes /// Gathered UUIDs will be collected in this dictinaory. /// It can be pre-populated if you want to stop the gatherer from analyzing assets that have already been fetched and inspected. /// - public UuidGatherer(IAssetService assetService, IDictionary collector) + public UuidGatherer(IAssetService assetService, IDictionary collector, HashSet failedIDs) { m_assetService = assetService; GatheredUuids = collector; // FIXME: Not efficient for searching, can improve. m_assetUuidsToInspect = new Queue(); - FailedUUIDs = new HashSet(); + FailedUUIDs = failedIDs; } /// @@ -301,14 +302,14 @@ namespace OpenSim.Region.Framework.Scenes } catch (Exception e) { - m_log.ErrorFormat("[UUID GATHERER]: Failed to get asset with id {0} : {1}", assetUuid, e.Message); + m_log.ErrorFormat("[UUID GATHERER]: Failed to get asset {0} : {1}", assetUuid, e.Message); FailedUUIDs.Add(assetUuid); return; } if(assetBase == null) { - m_log.ErrorFormat("[UUID GATHERER]: asset with id {0} not found", assetUuid); + m_log.ErrorFormat("[UUID GATHERER]: asset {0} not found", assetUuid); FailedUUIDs.Add(assetUuid); return; } @@ -317,7 +318,7 @@ namespace OpenSim.Region.Framework.Scenes if(assetBase.Data == null || assetBase.Data.Length == 0) { - m_log.ErrorFormat("[UUID GATHERER]: asset with id {0} type {1} has no data", assetUuid, assetType); + m_log.ErrorFormat("[UUID GATHERER]: asset {0}, type {1} has no data", assetUuid, assetType); FailedUUIDs.Add(assetUuid); return; } -- cgit v1.1 From 95595a8360f5d689dc1f680d53773866a9723f84 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 23 Jun 2017 17:23:28 +0100 Subject: coment out missing or damage assets messages in uuidgather that are not very usefull. In IAR save display information about items that contain references to broken assets. Note that as explained on mantis 8195 this can't will not detect all problems --- .../Archiver/InventoryArchiveWriteRequest.cs | 29 ++++++++++++++++++++-- OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 25 +++++++++++-------- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 144cbbe..f89b904 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -218,10 +218,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver // Count inventory items (different to asset count) CountItems++; - + // Don't chase down link asset items as they actually point to their target item IDs rather than an asset if (SaveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder) + { + int curErrorCntr = m_assetGatherer.ErrorCount; m_assetGatherer.AddForInspection(inventoryItem.AssetID); + m_assetGatherer.GatherAll(); + curErrorCntr = m_assetGatherer.ErrorCount - curErrorCntr; + if(curErrorCntr > 0) + { + string spath; + int indx = path.IndexOf("__"); + if(indx > 0) + spath = path.Substring(0,indx); + else + spath = path; + + if(curErrorCntr > 1) + { + m_log.WarnFormat("[INVENTORY ARCHIVER]: item {0} '{1}', type {2}, in '{3}', contains at least {4} references to missing or damaged assets", + inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, curErrorCntr); + } + else if(curErrorCntr == 1) + { + m_log.WarnFormat("[INVENTORY ARCHIVER]: item {0} '{1}', type {2}, in '{3}', contains at least 1 reference to a missing or damaged asset", + inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath); + } + } + } } /// @@ -427,7 +452,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver m_log.DebugFormat( "[INVENTORY ARCHIVER]: The items to save reference {0} assets", m_assetGatherer.GatheredUuids.Count + errors); if(errors > 0) - m_log.DebugFormat("[INVENTORY ARCHIVER]: {0} of this assets have problems and will be ignored", errors); + m_log.DebugFormat("[INVENTORY ARCHIVER]: {0} of these assets have problems and will be ignored", errors); AssetsRequest ar = new AssetsRequest( new AssetsArchiver(m_archiveWriter), diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 548aa3a..46ce2ce 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -66,7 +66,7 @@ namespace OpenSim.Region.Framework.Scenes /// The gathered uuids. public IDictionary GatheredUuids { get; private set; } public HashSet FailedUUIDs { get; private set; } - + public int ErrorCount { get; private set; } /// /// Gets the next UUID to inspect. /// @@ -103,7 +103,7 @@ namespace OpenSim.Region.Framework.Scenes /// Asset service. /// /// - /// Gathered UUIDs will be collected in this dictinaory. + /// Gathered UUIDs will be collected in this dictionary. /// It can be pre-populated if you want to stop the gatherer from analyzing assets that have already been fetched and inspected. /// public UuidGatherer(IAssetService assetService, IDictionary collector, HashSet failedIDs) @@ -114,6 +114,7 @@ namespace OpenSim.Region.Framework.Scenes // FIXME: Not efficient for searching, can improve. m_assetUuidsToInspect = new Queue(); FailedUUIDs = failedIDs; + ErrorCount = 0; } /// @@ -232,9 +233,6 @@ namespace OpenSim.Region.Framework.Scenes catch (Exception e) { m_log.ErrorFormat("[UUID GATHERER]: Failed to get part - {0}", e); - m_log.DebugFormat( - "[UUID GATHERER]: Texture entry length for prim was {0} (min is 46)", - part.Shape.TextureEntry.Length); } } } @@ -286,14 +284,14 @@ namespace OpenSim.Region.Framework.Scenes private void GetAssetUuids(UUID assetUuid) { if(FailedUUIDs.Contains(assetUuid)) + { + ErrorCount++; return; + } // avoid infinite loops if (GatheredUuids.ContainsKey(assetUuid)) - { - FailedUUIDs.Add(assetUuid); return; - } AssetBase assetBase; try @@ -303,13 +301,15 @@ namespace OpenSim.Region.Framework.Scenes catch (Exception e) { m_log.ErrorFormat("[UUID GATHERER]: Failed to get asset {0} : {1}", assetUuid, e.Message); + ErrorCount++; FailedUUIDs.Add(assetUuid); return; } if(assetBase == null) { - m_log.ErrorFormat("[UUID GATHERER]: asset {0} not found", assetUuid); +// m_log.ErrorFormat("[UUID GATHERER]: asset {0} not found", assetUuid); + ErrorCount++; FailedUUIDs.Add(assetUuid); return; } @@ -318,7 +318,8 @@ namespace OpenSim.Region.Framework.Scenes if(assetBase.Data == null || assetBase.Data.Length == 0) { - m_log.ErrorFormat("[UUID GATHERER]: asset {0}, type {1} has no data", assetUuid, assetType); +// m_log.ErrorFormat("[UUID GATHERER]: asset {0}, type {1} has no data", assetUuid, assetType); + ErrorCount++; FailedUUIDs.Add(assetUuid); return; } @@ -355,6 +356,7 @@ namespace OpenSim.Region.Framework.Scenes { m_log.ErrorFormat("[UUID GATHERER]: Failed to gather uuids for asset with id {0} type {1}: {2}", assetUuid, assetType, e.Message); GatheredUuids.Remove(assetUuid); + ErrorCount++; FailedUUIDs.Add(assetUuid); } } @@ -363,7 +365,10 @@ namespace OpenSim.Region.Framework.Scenes { // Here, we want to collect uuids which require further asset fetches but mark the others as gathered if(FailedUUIDs.Contains(assetUuid)) + { + ErrorCount++; return; + } if(GatheredUuids.ContainsKey(assetUuid)) return; try -- cgit v1.1 From 83e443bca168629045a054bf06e5c5e2302a27dc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 23 Jun 2017 17:48:59 +0100 Subject: do the same on OAR saves --- .../CoreModules/World/Archiver/ArchiveWriteRequest.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs index 9500eb6..d02db73 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs @@ -257,7 +257,22 @@ namespace OpenSim.Region.CoreModules.World.Archiver int prevAssets = assetUuids.Count; foreach (SceneObjectGroup sceneObject in sceneObjects) + { + int curErrorCntr = assetGatherer.ErrorCount; assetGatherer.AddForInspection(sceneObject); + assetGatherer.GatherAll(); + curErrorCntr = assetGatherer.ErrorCount - curErrorCntr; + if(curErrorCntr > 1) + { + m_log.WarnFormat("[INVENTORY ARCHIVER]: object {0} '{1}', at {2}, contains at least {3} references to missing or damaged assets", + sceneObject.UUID, sceneObject.Name ,sceneObject.AbsolutePosition.ToString(), curErrorCntr); + } + else if(curErrorCntr == 1) + { + m_log.WarnFormat("[INVENTORY ARCHIVER]: object {0} '{1}', at {2}, contains at least 1 reference to a missing or damaged asset", + sceneObject.UUID, sceneObject.Name, sceneObject.AbsolutePosition.ToString()); + } + } assetGatherer.GatherAll(); @@ -266,7 +281,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver "[ARCHIVER]: {0} region scene objects to save reference {1} assets", sceneObjects.Count, assetUuids.Count - prevAssets + errors); if(errors > 0) - m_log.DebugFormat("[ARCHIVER]: {0} of this assets have problems and will be ignored", errors); + m_log.DebugFormat("[ARCHIVER]: {0} of these assets have problems and will be ignored", errors); } if (numObjectsSkippedPermissions > 0) -- cgit v1.1 From 0a1f497dee60a8b6d02fe4565f251afd226b3a3a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 23 Jun 2017 19:55:23 +0100 Subject: code actually has no ideia if a id is a asset or not and does try to handle all as assets, it really can't report errors. Change messages to make more clear they are only warnings and may mean nothing at all --- .../Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | 8 ++++---- .../Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs | 8 ++++---- OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | 10 +++++----- OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index f89b904..d816ba4 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -237,12 +237,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if(curErrorCntr > 1) { - m_log.WarnFormat("[INVENTORY ARCHIVER]: item {0} '{1}', type {2}, in '{3}', contains at least {4} references to missing or damaged assets", + m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references to possible missing or damaged assets )", inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, curErrorCntr); } else if(curErrorCntr == 1) { - m_log.WarnFormat("[INVENTORY ARCHIVER]: item {0} '{1}', type {2}, in '{3}', contains at least 1 reference to a missing or damaged asset", + m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains a reference to a possible missing or damaged asset)", inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath); } } @@ -450,9 +450,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver int errors = m_assetGatherer.FailedUUIDs.Count; m_log.DebugFormat( - "[INVENTORY ARCHIVER]: The items to save reference {0} assets", m_assetGatherer.GatheredUuids.Count + errors); + "[INVENTORY ARCHIVER]: The items to save reference {0} possible assets", m_assetGatherer.GatheredUuids.Count + errors); if(errors > 0) - m_log.DebugFormat("[INVENTORY ARCHIVER]: {0} of these assets have problems and will be ignored", errors); + m_log.DebugFormat("[INVENTORY ARCHIVER]: {0} of these have problems or are not assets and will be ignored", errors); AssetsRequest ar = new AssetsRequest( new AssetsArchiver(m_archiveWriter), diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs index d02db73..0ed3399 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs @@ -264,12 +264,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver curErrorCntr = assetGatherer.ErrorCount - curErrorCntr; if(curErrorCntr > 1) { - m_log.WarnFormat("[INVENTORY ARCHIVER]: object {0} '{1}', at {2}, contains at least {3} references to missing or damaged assets", + m_log.WarnFormat("[ARCHIVER Warning]: object {0} '{1}', at {2}, contains {3} references to possible missing or damaged assets", sceneObject.UUID, sceneObject.Name ,sceneObject.AbsolutePosition.ToString(), curErrorCntr); } else if(curErrorCntr == 1) { - m_log.WarnFormat("[INVENTORY ARCHIVER]: object {0} '{1}', at {2}, contains at least 1 reference to a missing or damaged asset", + m_log.WarnFormat("[ARCHIVER Warning]: object {0} '{1}', at {2}, contains a reference to a possible missing or damaged assets", sceneObject.UUID, sceneObject.Name, sceneObject.AbsolutePosition.ToString()); } } @@ -278,10 +278,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver int errors = assetGatherer.FailedUUIDs.Count; m_log.DebugFormat( - "[ARCHIVER]: {0} region scene objects to save reference {1} assets", + "[ARCHIVER]: {0} region scene objects to save reference {1} possible assets", sceneObjects.Count, assetUuids.Count - prevAssets + errors); if(errors > 0) - m_log.DebugFormat("[ARCHIVER]: {0} of these assets have problems and will be ignored", errors); + m_log.DebugFormat("[ARCHIVER]: {0} of these have problems or are not assets and will be ignored", errors); } if (numObjectsSkippedPermissions > 0) diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 903cb2d..751aaca 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs @@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// uuids to request /// protected IDictionary m_uuids; - private int m_previusErrorsCount; + private int m_previousErrorsCount; /// /// Callback used when all the assets requested have been received. @@ -103,14 +103,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver protected internal AssetsRequest( AssetsArchiver assetsArchiver, IDictionary uuids, - int previusErrorsCount, + int previousErrorsCount, IAssetService assetService, IUserAccountService userService, UUID scope, Dictionary options, AssetsRequestCallback assetsRequestCallback) { m_assetsArchiver = assetsArchiver; m_uuids = uuids; - m_previusErrorsCount = previusErrorsCount; + m_previousErrorsCount = previousErrorsCount; m_assetsRequestCallback = assetsRequestCallback; m_assetService = assetService; m_userAccountService = userService; @@ -170,14 +170,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver } m_timeOutTimer.Dispose(); - int totalerrors = m_notFoundAssetUuids.Count + m_previusErrorsCount; + int totalerrors = m_notFoundAssetUuids.Count + m_previousErrorsCount; if(m_timeout) m_log.DebugFormat("[ARCHIVER]: Aborted because AssetService request timeout. Successfully added {0} assets", m_foundAssetUuids.Count); else if(totalerrors == 0) m_log.DebugFormat("[ARCHIVER]: Successfully added all {0} assets", m_foundAssetUuids.Count); else - m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} assets of total request where not found or are damaged", + m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} of total possible assets requested where not found, where damaged or where not assets", m_foundAssetUuids.Count, totalerrors); PerformAssetsRequestCallback(m_timeout); diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 46ce2ce..8ee7dbc 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -149,7 +149,7 @@ namespace OpenSim.Region.Framework.Scenes public void AddForInspection(SceneObjectGroup sceneObject) { // m_log.DebugFormat( - // "[ASSET GATHERER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID); + // "[UUID GATHERER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID); if(sceneObject.IsDeleted) return; @@ -159,7 +159,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectPart part = parts[i]; // m_log.DebugFormat( - // "[ARCHIVER]: Getting part {0}, {1} for object {2}", part.Name, part.UUID, sceneObject.UUID); + // "[UUID GATHERER]: Getting part {0}, {1} for object {2}", part.Name, part.UUID, sceneObject.UUID); try { -- cgit v1.1 From 191661b51d31254419e9b442ec12953772821ac3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 24 Jun 2017 02:01:48 +0100 Subject: a few more changes to iar/oar assets save error/warning to show problems known to be asset errors --- .../Archiver/InventoryArchiveWriteRequest.cs | 18 +++++--- .../World/Archiver/ArchiveWriteRequest.cs | 24 ++++++---- OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 52 ++++++++++++++++++---- 3 files changed, 70 insertions(+), 24 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index d816ba4..ad46107 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -223,10 +223,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (SaveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder) { int curErrorCntr = m_assetGatherer.ErrorCount; + int possible = m_assetGatherer.possibleNotAssetCount; m_assetGatherer.AddForInspection(inventoryItem.AssetID); m_assetGatherer.GatherAll(); curErrorCntr = m_assetGatherer.ErrorCount - curErrorCntr; - if(curErrorCntr > 0) + possible = m_assetGatherer.possibleNotAssetCount - possible; + + if(curErrorCntr > 0 || possible > 0) { string spath; int indx = path.IndexOf("__"); @@ -235,15 +238,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver else spath = path; - if(curErrorCntr > 1) + if(curErrorCntr > 0) { - m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references to possible missing or damaged assets )", + m_log.ErrorFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references to missing or damaged assets", inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, curErrorCntr); + if(possible > 0) + m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item also contains {0} references that may be to missing or damaged assets or not a problem", possible); } - else if(curErrorCntr == 1) - { - m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains a reference to a possible missing or damaged asset)", - inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath); + else if(possible > 0) + { + m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references that may be to missing or damaged assets or not a problem", inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, possible); } } } diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs index 0ed3399..11c53d7 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs @@ -182,11 +182,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver Dictionary assetUuids = new Dictionary(); HashSet failedIDs = new HashSet(); + HashSet uncertainAssetsUUIDs = new HashSet(); scenesGroup.ForEachScene(delegate(Scene scene) { string regionDir = MultiRegionFormat ? scenesGroup.GetRegionDir(scene.RegionInfo.RegionID) : ""; - ArchiveOneRegion(scene, regionDir, assetUuids, failedIDs); + ArchiveOneRegion(scene, regionDir, assetUuids, failedIDs, uncertainAssetsUUIDs); }); // Archive the assets @@ -217,7 +218,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver } } - private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary assetUuids, HashSet failedIDs) + private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary assetUuids, + HashSet failedIDs, HashSet uncertainAssetsUUIDs) { m_log.InfoFormat("[ARCHIVER]: Writing region {0}", scene.Name); @@ -253,24 +255,28 @@ namespace OpenSim.Region.CoreModules.World.Archiver if (SaveAssets) { - UuidGatherer assetGatherer = new UuidGatherer(scene.AssetService, assetUuids, failedIDs); + UuidGatherer assetGatherer = new UuidGatherer(scene.AssetService, assetUuids, failedIDs, uncertainAssetsUUIDs); int prevAssets = assetUuids.Count; foreach (SceneObjectGroup sceneObject in sceneObjects) { int curErrorCntr = assetGatherer.ErrorCount; + int possible = assetGatherer.possibleNotAssetCount; assetGatherer.AddForInspection(sceneObject); assetGatherer.GatherAll(); curErrorCntr = assetGatherer.ErrorCount - curErrorCntr; - if(curErrorCntr > 1) + possible = assetGatherer.possibleNotAssetCount - possible; + if(curErrorCntr > 0) { - m_log.WarnFormat("[ARCHIVER Warning]: object {0} '{1}', at {2}, contains {3} references to possible missing or damaged assets", + m_log.ErrorFormat("[ARCHIVER]: object {0} '{1}', at {2}, contains {3} references to missing or damaged assets", sceneObject.UUID, sceneObject.Name ,sceneObject.AbsolutePosition.ToString(), curErrorCntr); + if(possible > 0) + m_log.WarnFormat("[ARCHIVER Warning]: object also contains {0} references that may be to missing or damaged assets or not a problem", possible); } - else if(curErrorCntr == 1) - { - m_log.WarnFormat("[ARCHIVER Warning]: object {0} '{1}', at {2}, contains a reference to a possible missing or damaged assets", - sceneObject.UUID, sceneObject.Name, sceneObject.AbsolutePosition.ToString()); + else if(possible > 0) + { + m_log.WarnFormat("[ARCHIVER Warning]: object {0} '{1}', at {2}, contains {3} references that may be to missing or damaged assets or not a problem", + sceneObject.UUID, sceneObject.Name ,sceneObject.AbsolutePosition.ToString(), possible); } } diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 8ee7dbc..80d3f62 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -66,6 +66,8 @@ namespace OpenSim.Region.Framework.Scenes /// The gathered uuids. public IDictionary GatheredUuids { get; private set; } public HashSet FailedUUIDs { get; private set; } + public HashSet UncertainAssetsUUIDs { get; private set; } + public int possibleNotAssetCount { get; set; } public int ErrorCount { get; private set; } /// /// Gets the next UUID to inspect. @@ -93,8 +95,10 @@ namespace OpenSim.Region.Framework.Scenes /// /// Asset service. /// - public UuidGatherer(IAssetService assetService) : this(assetService, new Dictionary(), new HashSet ()) {} - public UuidGatherer(IAssetService assetService, IDictionary collector) : this(assetService, collector, new HashSet ()) {} + public UuidGatherer(IAssetService assetService) : this(assetService, new Dictionary(), + new HashSet (),new HashSet ()) {} + public UuidGatherer(IAssetService assetService, IDictionary collector) : this(assetService, collector, + new HashSet (), new HashSet ()) {} /// /// Initializes a new instance of the class. @@ -106,7 +110,7 @@ namespace OpenSim.Region.Framework.Scenes /// Gathered UUIDs will be collected in this dictionary. /// It can be pre-populated if you want to stop the gatherer from analyzing assets that have already been fetched and inspected. /// - public UuidGatherer(IAssetService assetService, IDictionary collector, HashSet failedIDs) + public UuidGatherer(IAssetService assetService, IDictionary collector, HashSet failedIDs, HashSet uncertainAssetsUUIDs) { m_assetService = assetService; GatheredUuids = collector; @@ -114,7 +118,9 @@ namespace OpenSim.Region.Framework.Scenes // FIXME: Not efficient for searching, can improve. m_assetUuidsToInspect = new Queue(); FailedUUIDs = failedIDs; + UncertainAssetsUUIDs = uncertainAssetsUUIDs; ErrorCount = 0; + possibleNotAssetCount = 0; } /// @@ -124,8 +130,17 @@ namespace OpenSim.Region.Framework.Scenes /// UUID. public bool AddForInspection(UUID uuid) { + if(uuid == UUID.Zero) + return false; + if(FailedUUIDs.Contains(uuid)) - return false; + { + if(UncertainAssetsUUIDs.Contains(uuid)) + possibleNotAssetCount++; + else + ErrorCount++; + return false; + } if(GatheredUuids.ContainsKey(uuid)) return false; if (m_assetUuidsToInspect.Contains(uuid)) @@ -283,9 +298,15 @@ namespace OpenSim.Region.Framework.Scenes /// The uuid of the asset for which to gather referenced assets private void GetAssetUuids(UUID assetUuid) { + if(assetUuid == UUID.Zero) + return; + if(FailedUUIDs.Contains(assetUuid)) { - ErrorCount++; + if(UncertainAssetsUUIDs.Contains(assetUuid)) + possibleNotAssetCount++; + else + ErrorCount++; return; } @@ -309,11 +330,17 @@ namespace OpenSim.Region.Framework.Scenes if(assetBase == null) { // m_log.ErrorFormat("[UUID GATHERER]: asset {0} not found", assetUuid); - ErrorCount++; FailedUUIDs.Add(assetUuid); + if(UncertainAssetsUUIDs.Contains(assetUuid)) + possibleNotAssetCount++; + else + ErrorCount++; return; } + if(UncertainAssetsUUIDs.Contains(assetUuid)) + UncertainAssetsUUIDs.Remove(assetUuid); + sbyte assetType = assetBase.Type; if(assetBase.Data == null || assetBase.Data.Length == 0) @@ -363,10 +390,16 @@ namespace OpenSim.Region.Framework.Scenes private void AddForInspection(UUID assetUuid, sbyte assetType) { + if(assetUuid == UUID.Zero) + return; + // Here, we want to collect uuids which require further asset fetches but mark the others as gathered if(FailedUUIDs.Contains(assetUuid)) { - ErrorCount++; + if(UncertainAssetsUUIDs.Contains(assetUuid)) + possibleNotAssetCount++; + else + ErrorCount++; return; } if(GatheredUuids.ContainsKey(assetUuid)) @@ -502,8 +535,11 @@ namespace OpenSim.Region.Framework.Scenes foreach (Match uuidMatch in uuidMatches) { UUID uuid = new UUID(uuidMatch.Value); + if(uuid == UUID.Zero) + continue; // m_log.DebugFormat("[UUID GATHERER]: Recording {0} in text", uuid); - + if(!UncertainAssetsUUIDs.Contains(uuid)) + UncertainAssetsUUIDs.Add(uuid); AddForInspection(uuid); } } -- cgit v1.1 From c3dbf91152692734e46850036aae451d87eb9bae Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 24 Jun 2017 03:21:23 +0100 Subject: osDrawFilledEllipse or string comand FillEllipse identical do Ellipse one --- .../CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 11 +++++++++++ .../Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 9 +++++++++ OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 1 + OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 5 +++++ bin/config-include/osslEnable.ini | 1 + 5 files changed, 27 insertions(+) diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index f12286d..5d4d0f5 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -625,6 +625,17 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender startPoint.X += endPoint.X; startPoint.Y += endPoint.Y; } + else if (nextLine.StartsWith("FillEllipse")) + { + float x = 0; + float y = 0; + GetParams(partsDelimiter, ref nextLine, 11, ref x, ref y); + endPoint.X = (int)x; + endPoint.Y = (int)y; + graph.FillEllipse(myBrush, startPoint.X, startPoint.Y, endPoint.X, endPoint.Y); + startPoint.X += endPoint.X; + startPoint.Y += endPoint.Y; + } else if (nextLine.StartsWith("FontSize")) { nextLine = nextLine.Remove(0, 8); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index e51a078..37f8970 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1191,6 +1191,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return drawList; } + public string osDrawFilledEllipse(string drawList, int width, int height) + { + CheckThreatLevel(ThreatLevel.None, "osDrawFilledEllipse"); + + m_host.AddScriptLPS(1); + drawList += "FillEllipse " + width + "," + height + "; "; + return drawList; + } + public string osDrawRectangle(string drawList, int width, int height) { CheckThreatLevel(ThreatLevel.None, "osDrawRectangle"); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index bd5d008..da3d6de 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -222,6 +222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces string osDrawLine(string drawList, int endX, int endY); string osDrawText(string drawList, string text); string osDrawEllipse(string drawList, int width, int height); + string osDrawFilledEllipse(string drawList, int width, int height); string osDrawRectangle(string drawList, int width, int height); string osDrawFilledRectangle(string drawList, int width, int height); string osDrawPolygon(string drawList, LSL_List x, LSL_List y); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 9eac114..1451efc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -355,6 +355,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osDrawEllipse(drawList, width, height); } + public string osDrawFilledEllipse(string drawList, int width, int height) + { + return m_OSSL_Functions.osDrawFilledEllipse(drawList, width, height); + } + public string osDrawRectangle(string drawList, int width, int height) { return m_OSSL_Functions.osDrawRectangle(drawList, width, height); diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index dca1c0c..f9bfe03 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -68,6 +68,7 @@ ; ThreatLevel None Allow_osDrawEllipse = true + Allow_osDrawFilledEllipse = true Allow_osDrawFilledPolygon = true Allow_osDrawFilledRectangle = true Allow_osDrawImage = true -- cgit v1.1 From ae4266916cc3b75e1e897c9250b47390340eab72 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 24 Jun 2017 04:23:13 +0100 Subject: add string osSetDynamicTextureDataFace(string dynamicID, string contentType, string data, string extraParams, int timer, int face) to easy only setting a prim face --- .../Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 9 ++++++++- OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 1 + OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 37f8970..d782ee6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -736,6 +736,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer) { + return osSetDynamicTextureDataFace(dynamicID, contentType, data, extraParams, timer, -1); + } + + public string osSetDynamicTextureDataFace(string dynamicID, string contentType, string data, string extraParams, + int timer, int face) + { CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureData"); m_host.AddScriptLPS(1); @@ -750,7 +756,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } UUID createdTexture = textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, - extraParams, timer); + extraParams, timer, false, 3, 255, face); + return createdTexture.ToString(); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index da3d6de..c12490c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -123,6 +123,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, bool blend, int disp, int timer, int alpha, int face); string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer); + string osSetDynamicTextureDataFace(string dynamicID, string contentType, string data, string extraParams, int timer, int face); string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, int timer, int alpha); string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 1451efc..9bc3159 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -153,6 +153,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osSetDynamicTextureData(dynamicID, contentType, data, extraParams, timer); } + public string osSetDynamicTextureDataFace(string dynamicID, string contentType, string data, string extraParams, + int timer, int face) + { + return m_OSSL_Functions.osSetDynamicTextureDataFace(dynamicID, contentType, data, extraParams, timer, face); + } + public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, int timer, int alpha) { -- cgit v1.1 From 72db6f76b5dc373d3178fbf09d04d385d63bc52d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 24 Jun 2017 05:22:02 +0100 Subject: remove a DynamicTexture leak, make it actually return the new texture ID to ossl, do delete previus texture from local cache if temporary,at least on same cases... but still very broken.. --- .../DynamicTexture/DynamicTextureModule.cs | 25 ++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index c369d87..82596ca 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs @@ -135,16 +135,15 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture m_reuseableDynamicTextures.Store( GenerateReusableTextureKey(texture.InputCommands, texture.InputParams), newTextureID); } + updater.newTextureID = newTextureID; } - } - if (updater.UpdateTimer == 0) - { - lock (Updaters) + if (updater.UpdateTimer == 0) { - if (!Updaters.ContainsKey(updater.UpdaterID)) + lock (Updaters) { - Updaters.Remove(updater.UpdaterID); + if (Updaters.ContainsKey(updater.UpdaterID)) + Updaters.Remove(updater.UpdaterID); } } } @@ -213,7 +212,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture } RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams); - return updater.UpdaterID; + return updater.newTextureID; } return UUID.Zero; } @@ -314,7 +313,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture updater.UpdatePart(part, (UUID)objReusableTextureUUID); } - return updater.UpdaterID; + return updater.newTextureID; } private string GenerateReusableTextureKey(string data, string extraParams) @@ -411,6 +410,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture public int Face; public int Disp; public string Url; + public UUID newTextureID; public DynamicTextureUpdater() { @@ -445,7 +445,14 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture { try { - Primitive.TextureEntryFace texface = tmptex.CreateFace((uint)Face); + Primitive.TextureEntryFace texface = tmptex.GetFace((uint)Face); + if(texface == null) + tmptex.GetFace((uint)Face); + else + { + if(texface.TextureID != null && texface.TextureID != UUID.Zero) + oldID = texface.TextureID; + } texface.TextureID = textureID; tmptex.FaceTextures[Face] = texface; } -- cgit v1.1 From ed8fc359f3853bab07ec3f5d6fd533da8d3797be Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 24 Jun 2017 06:11:10 +0100 Subject: change thread level of osSetDynamicTextureDataBlendFace to VeryHigh --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 2 +- bin/config-include/osslEnable.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index d782ee6..7371fc5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -801,7 +801,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, bool blend, int disp, int timer, int alpha, int face) { - CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlendFace"); + CheckThreatLevel(ThreatLevel.VeryHigh , "osSetDynamicTextureDataBlendFace"); m_host.AddScriptLPS(1); if (dynamicID == String.Empty) diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index f9bfe03..3538458 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -121,7 +121,6 @@ Allow_osReplaceString = true Allow_osSetDynamicTextureData = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetDynamicTextureDataBlend = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureDataBlendFace = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetDynamicTextureURL = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetDynamicTextureURLBlend = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetDynamicTextureURLBlendFace = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER @@ -228,6 +227,7 @@ Allow_osGetNotecardLine = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetNumberOfNotecardLines = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osRegionNotice = ESTATE_MANAGER,ESTATE_OWNER + Allow_osSetDynamicTextureDataBlendFace = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetRot = false Allow_osSetParcelDetails = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER -- cgit v1.1 From 8d1dd44edb187429b5a26ca56fc2d53766f710c7 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 24 Jun 2017 07:39:22 +0100 Subject: simplify vectorrender background draw --- .../Scripting/VectorRender/VectorRenderModule.cs | 26 ++++++++-------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index 5d4d0f5..a3b53be 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -355,30 +355,22 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender lock (this) { if (alpha == 256) - bitmap = new Bitmap(width, height, PixelFormat.Format32bppRgb); - else - bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb); - - graph = Graphics.FromImage(bitmap); - - // this is really just to save people filling the - // background color in their scripts, only do when fully opaque - if (alpha >= 255) { + bitmap = new Bitmap(width, height, PixelFormat.Format32bppRgb); + graph = Graphics.FromImage(bitmap); using (SolidBrush bgFillBrush = new SolidBrush(bgColor)) { graph.FillRectangle(bgFillBrush, 0, 0, width, height); } - } - - for (int w = 0; w < bitmap.Width; w++) + } + else { - if (alpha <= 255) + bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb); + graph = Graphics.FromImage(bitmap); + Color newbg = Color.FromArgb(alpha,bgColor); + using (SolidBrush bgFillBrush = new SolidBrush(newbg)) { - for (int h = 0; h < bitmap.Height; h++) - { - bitmap.SetPixel(w, h, Color.FromArgb(alpha, bitmap.GetPixel(w, h))); - } + graph.FillRectangle(bgFillBrush, 0, 0, width, height); } } -- cgit v1.1 From 1a8a77c41e4061b75ff97fcf89e39717550bfa25 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 24 Jun 2017 09:24:56 +0100 Subject: revert the thread level change; remove unused dynamic texture timer from internal code; let blend alpha work if < 255; let blend work with the selected face; etc --- .../DynamicTexture/DynamicTextureModule.cs | 81 +++++++++++----------- .../VectorRender/Tests/VectorRenderModuleTests.cs | 48 +++++-------- .../Framework/Interfaces/IDynamicTextureManager.cs | 22 +++--- .../Shared/Api/Implementation/OSSL_Api.cs | 14 ++-- .../Tests/Stress/VectorRenderModuleStressTests.cs | 3 +- bin/config-include/osslEnable.ini | 2 +- 6 files changed, 72 insertions(+), 98 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index 82596ca..c0b7ab5 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs @@ -138,13 +138,10 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture updater.newTextureID = newTextureID; } - if (updater.UpdateTimer == 0) + lock (Updaters) { - lock (Updaters) - { - if (Updaters.ContainsKey(updater.UpdaterID)) - Updaters.Remove(updater.UpdaterID); - } + if (Updaters.ContainsKey(updater.UpdaterID)) + Updaters.Remove(updater.UpdaterID); } } } @@ -171,21 +168,20 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture } public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, - string extraParams, int updateTimer) + string extraParams) { - return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, updateTimer, false, 255); + return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, false, 255); } public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, - string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) + string extraParams, bool SetBlending, byte AlphaValue) { - return AddDynamicTextureURL(simID, primID, contentType, url, - extraParams, updateTimer, SetBlending, - (int)(DISP_TEMP|DISP_EXPIRE), AlphaValue, ALL_SIDES); + return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, SetBlending, + (DISP_TEMP|DISP_EXPIRE), AlphaValue, ALL_SIDES); } public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, - string extraParams, int updateTimer, bool SetBlending, + string extraParams, bool SetBlending, int disp, byte AlphaValue, int face) { if (RenderPlugins.ContainsKey(contentType)) @@ -195,7 +191,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture updater.PrimID = primID; updater.ContentType = contentType; updater.Url = url; - updater.UpdateTimer = updateTimer; updater.UpdaterID = UUID.Random(); updater.Params = extraParams; updater.BlendWithOldTexture = SetBlending; @@ -218,20 +213,21 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture } public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, - string extraParams, int updateTimer) + string extraParams) { - return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, false, 255); + return AddDynamicTextureData(simID, primID, contentType, data, extraParams, false, + (DISP_TEMP|DISP_EXPIRE), 255, ALL_SIDES); } public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, - string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) + string extraParams, bool SetBlending, byte AlphaValue) { - return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, SetBlending, - (int) (DISP_TEMP|DISP_EXPIRE), AlphaValue, ALL_SIDES); + return AddDynamicTextureData(simID, primID, contentType, data, extraParams, SetBlending, + (DISP_TEMP|DISP_EXPIRE), AlphaValue, ALL_SIDES); } public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, - string extraParams, int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face) + string extraParams, bool SetBlending, int disp, byte AlphaValue, int face) { if (!RenderPlugins.ContainsKey(contentType)) return UUID.Zero; @@ -257,7 +253,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture updater.PrimID = primID; updater.ContentType = contentType; updater.BodyData = data; - updater.UpdateTimer = updateTimer; updater.UpdaterID = UUID.Random(); updater.Params = extraParams; updater.BlendWithOldTexture = SetBlending; @@ -403,10 +398,8 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture public byte FrontAlpha = 255; public string Params; public UUID PrimID; - public bool SetNewFrontAlpha = false; public UUID SimUUID; public UUID UpdaterID; - public int UpdateTimer; public int Face; public int Disp; public string Url; @@ -414,7 +407,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture public DynamicTextureUpdater() { - UpdateTimer = 0; BodyData = null; } @@ -440,19 +432,15 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture { oldID = tmptex.DefaultTexture.TextureID; tmptex.DefaultTexture.TextureID = textureID; + for(int i = 0; i < tmptex.FaceTextures.Length; i++) + tmptex.FaceTextures[i] = null; } else { try { - Primitive.TextureEntryFace texface = tmptex.GetFace((uint)Face); - if(texface == null) - tmptex.GetFace((uint)Face); - else - { - if(texface.TextureID != null && texface.TextureID != UUID.Zero) - oldID = texface.TextureID; - } + Primitive.TextureEntryFace texface = tmptex.CreateFace((uint)Face); + oldID = texface.TextureID; texface.TextureID = textureID; tmptex.FaceTextures[Face] = texface; } @@ -462,10 +450,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture } } - // I'm pretty sure we always want to force this to true - // I'm pretty sure noone whats to set fullbright true if it wasn't true before. - // tmptex.DefaultTexture.Fullbright = true; - part.UpdateTextureEntry(tmptex.GetBytes()); } @@ -498,13 +482,26 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture if (BlendWithOldTexture) { - Primitive.TextureEntryFace defaultFace = part.Shape.Textures.DefaultTexture; - if (defaultFace != null) + Primitive.TextureEntryFace curFace; + if(Face == ALL_SIDES) + curFace = part.Shape.Textures.DefaultTexture; + else + { + try + { + curFace = part.Shape.Textures.GetFace((uint)Face); + } + catch + { + curFace = null; + } + } + if (curFace != null) { - oldAsset = scene.AssetService.Get(defaultFace.TextureID.ToString()); + oldAsset = scene.AssetService.Get(curFace.TextureID.ToString()); if (oldAsset != null) - assetData = BlendTextures(data, oldAsset.Data, SetNewFrontAlpha, FrontAlpha); + assetData = BlendTextures(data, oldAsset.Data, FrontAlpha); } } @@ -555,7 +552,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture return asset.FullID; } - private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha) + private byte[] BlendTextures(byte[] frontImage, byte[] backImage, byte newAlpha) { ManagedImage managedImage; Image image; @@ -575,7 +572,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture Bitmap image2 = new Bitmap(image); image.Dispose(); - if (setNewAlpha) + if (newAlpha < 255) SetAlpha(ref image1, newAlpha); using(Bitmap joint = MergeBitMaps(image1, image2)) diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs index ed255bf..325f7f9 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs @@ -77,8 +77,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), "PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;", - "", - 0); + ""); Assert.That(originalTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); } @@ -98,8 +97,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "", - 0); + ""); UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID; @@ -108,8 +106,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "", - 0); + ""); Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); } @@ -129,8 +126,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "", - 0); + ""); UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID; @@ -139,8 +135,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "alpha:250", - 0); + "alpha:250"); Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); } @@ -161,8 +156,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "", - 0); + ""); UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID; @@ -171,8 +165,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "", - 0); + ""); Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); } @@ -191,8 +184,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), "PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;", - "", - 0); + ""); Assert.That(originalTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); } @@ -213,8 +205,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "", - 0); + ""); UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID; @@ -223,8 +214,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "", - 0); + ""); Assert.That(firstDynamicTextureID, Is.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); } @@ -253,8 +243,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "1024", - 0); + "1024"); UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID; @@ -263,8 +252,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "1024", - 0); + "1024"); Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); } @@ -284,8 +272,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "", - 0); + ""); UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID; @@ -294,8 +281,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "alpha:250", - 0); + "alpha:250"); Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); } @@ -316,8 +302,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "", - 0); + ""); UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID; @@ -326,8 +311,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests so.UUID, m_vrm.GetContentType(), dtText, - "", - 0); + ""); Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); } diff --git a/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs index 441076d..093ea9c 100644 --- a/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs +++ b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs @@ -44,14 +44,13 @@ namespace OpenSim.Region.Framework.Interfaces /// void ReturnData(UUID id, IDynamicTexture texture); + UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams); UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams, - int updateTimer); + bool SetBlending, byte AlphaValue); UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams, - int updateTimer, bool SetBlending, byte AlphaValue); - UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams, - int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face); - UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams, - int updateTimer); + bool SetBlending, int disp, byte AlphaValue, int face); + + UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams); /// Apply a dynamically generated texture to all sides of the given prim. The texture is not persisted to the /// asset service. @@ -62,8 +61,6 @@ namespace OpenSim.Region.Framework.Interfaces /// based texture or "image" to create a texture from an image at a particular URL /// The data for the generator /// Parameters for the generator that don't form part of the main data. - /// If zero, the image is never updated after the first generation. If positive - /// the image is updated at the given interval. Not implemented for /// /// If true, the newly generated texture is blended with the appropriate existing ones on the prim /// @@ -76,7 +73,7 @@ namespace OpenSim.Region.Framework.Interfaces /// can be obtained as SceneObjectPart.Shape.Textures.DefaultTexture.TextureID /// UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams, - int updateTimer, bool SetBlending, byte AlphaValue); + bool SetBlending, byte AlphaValue); /// /// Apply a dynamically generated texture to the given prim. @@ -87,8 +84,6 @@ namespace OpenSim.Region.Framework.Interfaces /// based texture or "image" to create a texture from an image at a particular URL /// The data for the generator /// Parameters for the generator that don't form part of the main data. - /// If zero, the image is never updated after the first generation. If positive - /// the image is updated at the given interval. Not implemented for /// /// If true, the newly generated texture is blended with the appropriate existing ones on the prim /// @@ -109,9 +104,8 @@ namespace OpenSim.Region.Framework.Interfaces /// to obtain it directly from the SceneObjectPart. For instance, if ALL_SIDES is set then this texture /// can be obtained as SceneObjectPart.Shape.Textures.DefaultTexture.TextureID /// - UUID AddDynamicTextureData( - UUID simID, UUID primID, string contentType, string data, string extraParams, - int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face); + UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams, + bool SetBlending, int disp, byte AlphaValue, int face); void GetDrawStringSize(string contentType, string text, string fontName, int fontSize, out double xSize, out double ySize); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 7371fc5..3a0884f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -678,7 +678,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IDynamicTextureManager textureManager = World.RequestModuleInterface(); UUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, - extraParams, timer); + extraParams); return createdTexture.ToString(); } else @@ -700,7 +700,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IDynamicTextureManager textureManager = World.RequestModuleInterface(); UUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, - extraParams, timer, true, (byte) alpha); + extraParams, true, (byte) alpha); return createdTexture.ToString(); } else @@ -722,7 +722,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IDynamicTextureManager textureManager = World.RequestModuleInterface(); UUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, - extraParams, timer, blend, disp, (byte) alpha, face); + extraParams, blend, disp, (byte) alpha, face); return createdTexture.ToString(); } else @@ -756,7 +756,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } UUID createdTexture = textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, - extraParams, timer, false, 3, 255, face); + extraParams, false, 3, 255, face); return createdTexture.ToString(); } @@ -786,7 +786,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } UUID createdTexture = textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, - extraParams, timer, true, (byte) alpha); + extraParams, true, (byte) alpha); return createdTexture.ToString(); } } @@ -801,7 +801,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, bool blend, int disp, int timer, int alpha, int face) { - CheckThreatLevel(ThreatLevel.VeryHigh , "osSetDynamicTextureDataBlendFace"); + CheckThreatLevel(ThreatLevel.VeryLow , "osSetDynamicTextureDataBlendFace"); m_host.AddScriptLPS(1); if (dynamicID == String.Empty) @@ -815,7 +815,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } UUID createdTexture = textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, - extraParams, timer, blend, disp, (byte) alpha, face); + extraParams, blend, disp, (byte) alpha, face); return createdTexture.ToString(); } } diff --git a/OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs b/OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs index 5e6a638..e9767f3 100644 --- a/OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs +++ b/OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs @@ -118,8 +118,7 @@ namespace OpenSim.Tests.Stress so.UUID, m_tests.Vrm.GetContentType(), string.Format("PenColour BLACK; MoveTo 40,220; FontSize 32; Text {0};", text), - "", - 0); + ""); Assert.That(originalTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index 3538458..f9bfe03 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -121,6 +121,7 @@ Allow_osReplaceString = true Allow_osSetDynamicTextureData = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetDynamicTextureDataBlend = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osSetDynamicTextureDataBlendFace = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetDynamicTextureURL = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetDynamicTextureURLBlend = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetDynamicTextureURLBlendFace = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER @@ -227,7 +228,6 @@ Allow_osGetNotecardLine = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetNumberOfNotecardLines = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osRegionNotice = ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureDataBlendFace = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetRot = false Allow_osSetParcelDetails = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER -- cgit v1.1 From 5d776fca3a6c52f79f3fd33229492b26b03ca238 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 24 Jun 2017 21:42:11 +0100 Subject: add dyn textures vectorrender comands ''ResetTransf;'', ''TransTransf x,y;'' and ''RotTransf x'' string only, no ossl helper api still --- .../Scripting/VectorRender/VectorRenderModule.cs | 30 +++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index a3b53be..fc4ccfe 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -511,8 +511,25 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender // m_log.DebugFormat("[VECTOR RENDER MODULE]: Processing line '{0}'", nextLine); + if (nextLine.StartsWith("ResetTransf")) + { + graph.ResetTransform(); + } + else if (nextLine.StartsWith("TransTransf")) + { + float x = 0; + float y = 0; + GetParams(partsDelimiter, ref nextLine, 11, ref x, ref y); + graph.TranslateTransform(x, y); + } + else if (nextLine.StartsWith("RotTransf")) + { + float x = 0; + GetParams(partsDelimiter, ref nextLine, 9, ref x); + graph.RotateTransform(x); + } //replace with switch, or even better, do some proper parsing - if (nextLine.StartsWith("MoveTo")) + else if (nextLine.StartsWith("MoveTo")) { float x = 0; float y = 0; @@ -793,6 +810,17 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender } } + private static void GetParams(char[] partsDelimiter, ref string line, int startLength, ref float x) + { + line = line.Remove(0, startLength); + string[] parts = line.Split(partsDelimiter); + if (parts.Length > 0) + { + string xVal = parts[0].Trim(); + x = Convert.ToSingle(xVal, CultureInfo.InvariantCulture); + } + } + private static void GetParams(char[] partsDelimiter, ref string line, int startLength, ref float x, ref float y) { line = line.Remove(0, startLength); -- cgit v1.1 From cb8975e56729c6fd077a69df3a7fa06cba285f82 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 24 Jun 2017 23:04:37 +0100 Subject: add string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y), string osDrawRotationTransform(string drawList, LSL_Float x) and string osDrawResetTransform(string drawList) helper functions for the new vector renderer comands. Removed ThreadLevel check of similar funtions that had it None, and actually only set strings --- .../Shared/Api/Implementation/OSSL_Api.cs | 58 ++++++++++++++++------ .../ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 3 ++ .../ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 15 ++++++ bin/config-include/osslEnable.ini | 37 ++++++++------ 4 files changed, 81 insertions(+), 32 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 3a0884f..e93a7d7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1153,9 +1153,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } //Texture draw functions + + public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y) + { + CheckThreatLevel(); + + m_host.AddScriptLPS(1); + drawList += "TransTransf " + x + "," + y + ";"; + return drawList; + } + + public string osDrawRotationTransform(string drawList, LSL_Float x) + { + CheckThreatLevel(); + m_host.AddScriptLPS(1); + drawList += "RotTransf " + x + ";"; + return drawList; + } + + public string osDrawResetTransform(string drawList) + { + CheckThreatLevel(); + m_host.AddScriptLPS(1); + drawList += "ResetTransf;"; + return drawList; + } + public string osMovePen(string drawList, int x, int y) { - CheckThreatLevel(ThreatLevel.None, "osMovePen"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList += "MoveTo " + x + "," + y + ";"; @@ -1164,7 +1190,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawLine(string drawList, int startX, int startY, int endX, int endY) { - CheckThreatLevel(ThreatLevel.None, "osDrawLine"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList += "MoveTo "+ startX+","+ startY +"; LineTo "+endX +","+endY +"; "; @@ -1173,7 +1199,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawLine(string drawList, int endX, int endY) { - CheckThreatLevel(ThreatLevel.None, "osDrawLine"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList += "LineTo " + endX + "," + endY + "; "; @@ -1191,7 +1217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawEllipse(string drawList, int width, int height) { - CheckThreatLevel(ThreatLevel.None, "osDrawEllipse"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList += "Ellipse " + width + "," + height + "; "; @@ -1200,7 +1226,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawFilledEllipse(string drawList, int width, int height) { - CheckThreatLevel(ThreatLevel.None, "osDrawFilledEllipse"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList += "FillEllipse " + width + "," + height + "; "; @@ -1209,7 +1235,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawRectangle(string drawList, int width, int height) { - CheckThreatLevel(ThreatLevel.None, "osDrawRectangle"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList += "Rectangle " + width + "," + height + "; "; @@ -1218,7 +1244,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawFilledRectangle(string drawList, int width, int height) { - CheckThreatLevel(ThreatLevel.None, "osDrawFilledRectangle"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList += "FillRectangle " + width + "," + height + "; "; @@ -1227,7 +1253,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y) { - CheckThreatLevel(ThreatLevel.None, "osDrawFilledPolygon"); + CheckThreatLevel(); m_host.AddScriptLPS(1); @@ -1246,7 +1272,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawPolygon(string drawList, LSL_List x, LSL_List y) { - CheckThreatLevel(ThreatLevel.None, "osDrawPolygon"); + CheckThreatLevel(); m_host.AddScriptLPS(1); @@ -1265,7 +1291,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetFontSize(string drawList, int fontSize) { - CheckThreatLevel(ThreatLevel.None, "osSetFontSize"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList += "FontSize "+ fontSize +"; "; @@ -1274,7 +1300,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetFontName(string drawList, string fontName) { - CheckThreatLevel(ThreatLevel.None, "osSetFontName"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList += "FontName "+ fontName +"; "; @@ -1283,7 +1309,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetPenSize(string drawList, int penSize) { - CheckThreatLevel(ThreatLevel.None, "osSetPenSize"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList += "PenSize " + penSize + "; "; @@ -1292,7 +1318,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetPenColor(string drawList, string color) { - CheckThreatLevel(ThreatLevel.None, "osSetPenColor"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList += "PenColor " + color + "; "; @@ -1302,7 +1328,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Deprecated public string osSetPenColour(string drawList, string colour) { - CheckThreatLevel(ThreatLevel.None, "osSetPenColour"); + CheckThreatLevel(); OSSLDeprecated("osSetPenColour", "osSetPenColor"); m_host.AddScriptLPS(1); @@ -1312,7 +1338,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetPenCap(string drawList, string direction, string type) { - CheckThreatLevel(ThreatLevel.None, "osSetPenCap"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList += "PenCap " + direction + "," + type + "; "; @@ -1321,7 +1347,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawImage(string drawList, int width, int height, string imageUrl) { - CheckThreatLevel(ThreatLevel.None, "osDrawImage"); + CheckThreatLevel(); m_host.AddScriptLPS(1); drawList +="Image " +width + "," + height+ ","+ imageUrl +"; " ; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index c12490c..19cfcc1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -228,6 +228,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces string osDrawFilledRectangle(string drawList, int width, int height); string osDrawPolygon(string drawList, LSL_List x, LSL_List y); string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y); + string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y); + string osDrawRotationTransform(string drawList, LSL_Float x); + string osDrawResetTransform(string drawList); string osSetFontName(string drawList, string fontName); string osSetFontSize(string drawList, int fontSize); string osSetPenSize(string drawList, int penSize); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 9bc3159..4b1f6d3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -386,6 +386,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osDrawFilledPolygon(drawList, x, y); } + public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y) + { + return m_OSSL_Functions.osDrawTranslationTransform(drawList, x, y); + } + + public string osDrawRotationTransform(string drawList, LSL_Float x) + { + return m_OSSL_Functions.osDrawRotationTransform(drawList, x); + } + + public string osDrawResetTransform(string drawList) + { + return m_OSSL_Functions.osDrawResetTransform(drawList); + } + public string osSetFontSize(string drawList, int fontSize) { return m_OSSL_Functions.osSetFontSize(drawList, fontSize); diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index f9bfe03..4779f60 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -65,17 +65,22 @@ ; There are a block of functions for creating and controlling NPCs. ; These can be mis-used so limit use to those you can trust. osslNPC = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - + +; some ThreadLevel None functions no longer do level check. listed comment just to be visible + ; ThreatLevel None - Allow_osDrawEllipse = true - Allow_osDrawFilledEllipse = true - Allow_osDrawFilledPolygon = true - Allow_osDrawFilledRectangle = true - Allow_osDrawImage = true - Allow_osDrawLine = true - Allow_osDrawPolygon = true - Allow_osDrawRectangle = true - Allow_osDrawText = true +; Allow_osDrawEllipse = true ; no level check +; Allow_osDrawFilledEllipse = true ; no level check +; Allow_osDrawFilledPolygon = true ; no level check +; Allow_osDrawFilledRectangle = true ; no level check +; Allow_osDrawTranslationTransform = true ; no level check +; Allow_osDrawRotationTransform = true ; no level check +; Allow_osDrawResetTransform = true ; no level check +; Allow_osDrawImage = true ; no level check +; Allow_osDrawLine = true ; no level check +; Allow_osDrawPolygon = true ; no level check +; Allow_osDrawRectangle = true ; no level check +; Allow_osDrawText = true ; no level check Allow_osGetAgents = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetAvatarList = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetCurrentSunHour = true @@ -93,15 +98,15 @@ Allow_osList2Double = true Allow_osMax = true Allow_osMin = true - Allow_osMovePen = true +; Allow_osMovePen = true ; no level check Allow_osNpcGetOwner = ${XEngine|osslNPC} Allow_osParseJSON = true Allow_osParseJSONNew = true - Allow_osSetFontName = true - Allow_osSetFontSize = true - Allow_osSetPenCap = true - Allow_osSetPenColor = true - Allow_osSetPenSize = true +; Allow_osSetFontName = true ; no level check +; Allow_osSetFontSize = true ; no level check +; Allow_osSetPenCap = true ; no level check +; Allow_osSetPenColor = true ; no level check +; Allow_osSetPenSize = true ; no level check Allow_osSetSunParam = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osTeleportOwner = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osWindActiveModelPluginName = true -- cgit v1.1 From a9a44eaeb5abdbea63d6c7d0c81454fb5a093817 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 25 Jun 2017 02:17:02 +0100 Subject: add vectorrender string command ''ScaleTransf x,y;''. this allows scaling of objects to draw next. -1,1 will make text be drawn with x direction flipped (it is like the texture scale) --- .../CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index fc4ccfe..8a26ab7 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -522,6 +522,13 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender GetParams(partsDelimiter, ref nextLine, 11, ref x, ref y); graph.TranslateTransform(x, y); } + else if (nextLine.StartsWith("ScaleTransf")) + { + float x = 0; + float y = 0; + GetParams(partsDelimiter, ref nextLine, 11, ref x, ref y); + graph.ScaleTransform(x, y); + } else if (nextLine.StartsWith("RotTransf")) { float x = 0; -- cgit v1.1 From 84abdf866a26401e48eff5b25a1ec7f7bf19dc3c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 25 Jun 2017 02:26:36 +0100 Subject: add respective ossl helper funtion osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y) --- .../Shared/Api/Implementation/OSSL_Api.cs | 19 ++++++++++++++----- .../ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 5 +++-- .../ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 13 +++++++++---- bin/config-include/osslEnable.ini | 5 +++-- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index e93a7d7..dee195a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1154,12 +1154,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api //Texture draw functions - public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y) + public string osDrawResetTransform(string drawList) { CheckThreatLevel(); - m_host.AddScriptLPS(1); - drawList += "TransTransf " + x + "," + y + ";"; + drawList += "ResetTransf;"; return drawList; } @@ -1171,11 +1170,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return drawList; } - public string osDrawResetTransform(string drawList) + public string osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y) { CheckThreatLevel(); + m_host.AddScriptLPS(1); - drawList += "ResetTransf;"; + drawList += "ScaleTransf " + x + "," + y + ";"; + return drawList; + } + + public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y) + { + CheckThreatLevel(); + + m_host.AddScriptLPS(1); + drawList += "TransTransf " + x + "," + y + ";"; return drawList; } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 19cfcc1..f7857da 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -228,9 +228,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces string osDrawFilledRectangle(string drawList, int width, int height); string osDrawPolygon(string drawList, LSL_List x, LSL_List y); string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y); - string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y); - string osDrawRotationTransform(string drawList, LSL_Float x); string osDrawResetTransform(string drawList); + string osDrawRotationTransform(string drawList, LSL_Float x); + string osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y); + string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y); string osSetFontName(string drawList, string fontName); string osSetFontSize(string drawList, int fontSize); string osSetPenSize(string drawList, int penSize); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 4b1f6d3..d6af32b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -386,9 +386,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osDrawFilledPolygon(drawList, x, y); } - public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y) + public string osDrawResetTransform(string drawList) { - return m_OSSL_Functions.osDrawTranslationTransform(drawList, x, y); + return m_OSSL_Functions.osDrawResetTransform(drawList); } public string osDrawRotationTransform(string drawList, LSL_Float x) @@ -396,9 +396,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osDrawRotationTransform(drawList, x); } - public string osDrawResetTransform(string drawList) + public string osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y) { - return m_OSSL_Functions.osDrawResetTransform(drawList); + return m_OSSL_Functions.osDrawScaleTransform(drawList, x, y); + } + + public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y) + { + return m_OSSL_Functions.osDrawTranslationTransform(drawList, x, y); } public string osSetFontSize(string drawList, int fontSize) diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index 4779f60..6481825 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -73,9 +73,10 @@ ; Allow_osDrawFilledEllipse = true ; no level check ; Allow_osDrawFilledPolygon = true ; no level check ; Allow_osDrawFilledRectangle = true ; no level check -; Allow_osDrawTranslationTransform = true ; no level check -; Allow_osDrawRotationTransform = true ; no level check ; Allow_osDrawResetTransform = true ; no level check +; Allow_osDrawRotationTransform = true ; no level check +; Allow_osDrawScaleTransform = true ; no level check +; Allow_osDrawTranslationTransform = true ; no level check ; Allow_osDrawImage = true ; no level check ; Allow_osDrawLine = true ; no level check ; Allow_osDrawPolygon = true ; no level check -- cgit v1.1 From 3ce909528dd42cd2c92d8ac6590135bb1962aee4 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 25 Jun 2017 15:42:36 +0100 Subject: change Backup calls overlap control code --- OpenSim/Region/Framework/Scenes/Scene.cs | 73 ++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 27 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ebef158..09b209e 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1942,7 +1942,6 @@ namespace OpenSim.Region.Framework.Scenes { if (!m_backingup) { - m_backingup = true; WorkManager.RunInThreadPool(o => Backup(false), null, string.Format("BackupWorker ({0})", Name)); } } @@ -1971,38 +1970,58 @@ namespace OpenSim.Region.Framework.Scenes { lock (m_returns) { - EventManager.TriggerOnBackup(SimulationDataService, forced); + if(m_backingup) + { + m_log.WarnFormat("[Scene] Backup of {0} already running. New call skipped", RegionInfo.RegionName); + return; + } - foreach (KeyValuePair ret in m_returns) + m_backingup = true; + try { - UUID transaction = UUID.Random(); - - GridInstantMessage msg = new GridInstantMessage(); - msg.fromAgentID = new Guid(UUID.Zero.ToString()); // From server - msg.toAgentID = new Guid(ret.Key.ToString()); - msg.imSessionID = new Guid(transaction.ToString()); - msg.timestamp = (uint)Util.UnixTimeSinceEpoch(); - msg.fromAgentName = "Server"; - msg.dialog = (byte)19; // Object msg - msg.fromGroup = false; - msg.offline = (byte)1; - msg.ParentEstateID = RegionInfo.EstateSettings.ParentEstateID; - msg.Position = Vector3.Zero; - msg.RegionID = RegionInfo.RegionID.Guid; - - // We must fill in a null-terminated 'empty' string here since bytes[0] will crash viewer 3. - msg.binaryBucket = Util.StringToBytes256("\0"); - if (ret.Value.count > 1) - msg.message = string.Format("Your {0} objects were returned from {1} in region {2} due to {3}", ret.Value.count, ret.Value.location.ToString(), RegionInfo.RegionName, ret.Value.reason); - else - msg.message = string.Format("Your object {0} was returned from {1} in region {2} due to {3}", ret.Value.objectName, ret.Value.location.ToString(), RegionInfo.RegionName, ret.Value.reason); + EventManager.TriggerOnBackup(SimulationDataService, forced); + + if(m_returns.Count == 0) + return; IMessageTransferModule tr = RequestModuleInterface(); - if (tr != null) + if (tr == null) + return; + + uint unixtime = (uint)Util.UnixTimeSinceEpoch(); + uint estateid = RegionInfo.EstateSettings.ParentEstateID; + Guid regionguid = RegionInfo.RegionID.Guid; + + foreach (KeyValuePair ret in m_returns) + { + GridInstantMessage msg = new GridInstantMessage(); + msg.fromAgentID = Guid.Empty; // From server + msg.toAgentID = ret.Key.Guid; + msg.imSessionID = Guid.NewGuid(); + msg.timestamp = unixtime; + msg.fromAgentName = "Server"; + msg.dialog = 19; // Object msg + msg.fromGroup = false; + msg.offline = 1; + msg.ParentEstateID = estateid; + msg.Position = Vector3.Zero; + msg.RegionID = regionguid; + + // We must fill in a null-terminated 'empty' string here since bytes[0] will crash viewer 3. + msg.binaryBucket = new Byte[1] {0}; + if (ret.Value.count > 1) + msg.message = string.Format("Your {0} objects were returned from {1} in region {2} due to {3}", ret.Value.count, ret.Value.location.ToString(), RegionInfo.RegionName, ret.Value.reason); + else + msg.message = string.Format("Your object {0} was returned from {1} in region {2} due to {3}", ret.Value.objectName, ret.Value.location.ToString(), RegionInfo.RegionName, ret.Value.reason); + tr.SendInstantMessage(msg, delegate(bool success) { }); + } + m_returns.Clear(); + } + finally + { + m_backingup = false; } - m_returns.Clear(); - m_backingup = false; } } -- cgit v1.1 From 041854234429800d6ca10c4987c5d99185552fd6 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Jun 2017 00:18:46 +0100 Subject: some shortcuts on local osTeleport, reduce its time penalty, do it with script thread --- OpenSim/Region/Framework/Scenes/Scene.cs | 44 ++++++--- .../Shared/Api/Implementation/OSSL_Api.cs | 102 ++++++++++----------- 2 files changed, 79 insertions(+), 67 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 09b209e..5e8487d 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4824,16 +4824,34 @@ Label_GroupsDone: public void RequestTeleportLocation(IClientAPI remoteClient, string regionName, Vector3 position, Vector3 lookat, uint teleportFlags) { - GridRegion region = GridService.GetRegionByName(RegionInfo.ScopeID, regionName); + if (EntityTransferModule == null) + { + m_log.DebugFormat("[SCENE]: Unable to perform teleports: no AgentTransferModule is active"); + return; + } + + ScenePresence sp = GetScenePresence(remoteClient.AgentId); + if (sp == null || sp.IsDeleted || sp.IsInTransit) + return; - if (region == null) + ulong regionHandle = 0; + if(regionName == RegionInfo.RegionName) + regionHandle = RegionInfo.RegionHandle; + else + { + GridRegion region = GridService.GetRegionByName(RegionInfo.ScopeID, regionName); + if (region != null) + regionHandle = region.RegionHandle; + } + + if(regionHandle == 0) { // can't find the region: Tell viewer and abort remoteClient.SendTeleportFailed("The region '" + regionName + "' could not be found."); return; } - RequestTeleportLocation(remoteClient, region.RegionHandle, position, lookat, teleportFlags); + EntityTransferModule.Teleport(sp, regionHandle, position, lookat, teleportFlags); } /// @@ -4847,19 +4865,17 @@ Label_GroupsDone: public void RequestTeleportLocation(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint teleportFlags) { - ScenePresence sp = GetScenePresence(remoteClient.AgentId); - if (sp != null) + if (EntityTransferModule == null) { - if (EntityTransferModule != null) - { - EntityTransferModule.Teleport(sp, regionHandle, position, lookAt, teleportFlags); - } - else - { - m_log.DebugFormat("[SCENE]: Unable to perform teleports: no AgentTransferModule is active"); - sp.ControllingClient.SendTeleportFailed("Unable to perform teleports on this simulator."); - } + m_log.DebugFormat("[SCENE]: Unable to perform teleports: no AgentTransferModule is active"); + return; } + + ScenePresence sp = GetScenePresence(remoteClient.AgentId); + if (sp == null || sp.IsDeleted || sp.IsInTransit) + return; + + EntityTransferModule.Teleport(sp, regionHandle, position, lookAt, teleportFlags); } public bool CrossAgentToNewRegion(ScenePresence agent, bool isFlying) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index dee195a..5339fc3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -859,41 +859,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent"); - TeleportAgent(agent, regionName, position, lookat, false); + TeleportAgent(agent, regionName, position, lookat); } private void TeleportAgent(string agent, string regionName, - LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool relaxRestrictions) + LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { m_host.AddScriptLPS(1); - UUID agentId = new UUID(); + if(String.IsNullOrWhiteSpace(regionName)) + return; + + UUID agentId; if (UUID.TryParse(agent, out agentId)) { ScenePresence presence = World.GetScenePresence(agentId); - if (presence != null) - { - // For osTeleportAgent, agent must be over owners land to avoid abuse - // For osTeleportOwner, this restriction isn't necessary - - // commented out because its redundant and uneeded please remove eventually. - // if (relaxRestrictions || - // m_host.OwnerID - // == World.LandChannel.GetLandObject( - // presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) - // { - - // We will launch the teleport on a new thread so that when the script threads are terminated - // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. - Util.FireAndForget( - o => World.RequestTeleportLocation( - presence.ControllingClient, regionName, position, - lookat, (uint)TPFlags.ViaLocation), - null, "OSSL_Api.TeleportAgentByRegionCoords"); - - ScriptSleep(5000); - - // } + if (presence == null || presence.IsDeleted || presence.IsInTransit) + return; + if(regionName == World.RegionInfo.RegionName) + { + // should be faster than going to threadpool + World.RequestTeleportLocation(presence.ControllingClient, regionName, position, + lookat, (uint)TPFlags.ViaLocation); + ScriptSleep(500); + } + else + { + // We will launch the teleport on a new thread so that when the script threads are terminated + // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. + Util.FireAndForget( + o => World.RequestTeleportLocation( + presence.ControllingClient, regionName, position, + lookat, (uint)TPFlags.ViaLocation), + null, "OSSL_Api.TeleportAgentByRegionCoords"); + ScriptSleep(5000); } } } @@ -913,41 +912,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ulong regionHandle = Util.RegionGridLocToHandle((uint)regionGridX, (uint)regionGridY); m_host.AddScriptLPS(1); - UUID agentId = new UUID(); + UUID agentId; if (UUID.TryParse(agent, out agentId)) { ScenePresence presence = World.GetScenePresence(agentId); - if (presence != null) - { - // For osTeleportAgent, agent must be over owners land to avoid abuse - // For osTeleportOwner, this restriction isn't necessary - - // commented out because its redundant and uneeded please remove eventually. - // if (relaxRestrictions || - // m_host.OwnerID - // == World.LandChannel.GetLandObject( - // presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) - // { - - // We will launch the teleport on a new thread so that when the script threads are terminated - // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. - Util.FireAndForget( - o => World.RequestTeleportLocation( - presence.ControllingClient, regionHandle, - position, lookat, (uint)TPFlags.ViaLocation), - null, "OSSL_Api.TeleportAgentByRegionName"); - - ScriptSleep(5000); + if (presence == null || presence.IsDeleted || presence.IsInTransit) + return; - // } + Util.FireAndForget( + o => World.RequestTeleportLocation( + presence.ControllingClient, regionHandle, + position, lookat, (uint)TPFlags.ViaLocation), + null, "OSSL_Api.TeleportAgentByRegionName"); - } + ScriptSleep(5000); } } public void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { - osTeleportAgent(agent, World.RegionInfo.RegionName, position, lookat); + m_host.AddScriptLPS(1); + + UUID agentId; + if (UUID.TryParse(agent, out agentId)) + { + ScenePresence presence = World.GetScenePresence(agentId); + if (presence == null || presence.IsDeleted || presence.IsInTransit) + return; + + World.RequestTeleportLocation(presence.ControllingClient, World.RegionInfo.RegionName, position, + lookat, (uint)TPFlags.ViaLocation); + ScriptSleep(500); + } } public void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) @@ -955,12 +951,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Threat level None because this is what can already be done with the World Map in the viewer CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); - TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat, true); + TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat); } public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { - osTeleportOwner(World.RegionInfo.RegionName, position, lookat); + osTeleportAgent(m_host.OwnerID.ToString(), position, lookat); } public void osTeleportOwner(int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) -- cgit v1.1 From 0c5f412ed40663689aad2aadf9313e0dd782f4ac Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Jun 2017 02:49:20 +0100 Subject: put back restriction that on osTeleport the target must be on land owned by the script owner or this is a estate manager/owner, or target did gave script permission. --- .../Shared/Api/Implementation/OSSL_Api.cs | 93 ++++++++++++++++++---- 1 file changed, 78 insertions(+), 15 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 5339fc3..ce48e63 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -852,6 +852,43 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.ParentGroup.RootPart.SetFloatOnWater(floatYN); } + private bool checkAllowAgentTPbyLandOwner(UUID agentId, Vector3 pos) + { + if (m_item.PermsGranter == agentId) + { + if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TELEPORT) != 0) + return true; + } + + ILandObject land = World.LandChannel.GetLandObject(pos); + if(land == null) + return true; + + LandData landdata = land.LandData; + if(landdata == null) + return true; + + UUID hostOwner = m_host.OwnerID; + + if(landdata.OwnerID == hostOwner) + return true; + + if(World.RegionInfo.EstateSettings != null && World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(hostOwner)) + return true; + + if(!landdata.IsGroupOwned) + return false; + + UUID landGroup = landdata.GroupID; + if(landGroup == UUID.Zero) + return false; + + if(landGroup == m_host.GroupID) + return true; + + return false; + } + // Teleport functions public void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { @@ -859,15 +896,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent"); - TeleportAgent(agent, regionName, position, lookat); + TeleportAgent(agent, regionName, position, lookat, true); } private void TeleportAgent(string agent, string regionName, - LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) + LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool isNotOwner) { m_host.AddScriptLPS(1); - if(String.IsNullOrWhiteSpace(regionName)) - return; + if(String.IsNullOrEmpty(regionName)) + regionName = World.RegionInfo.RegionName; UUID agentId; if (UUID.TryParse(agent, out agentId)) @@ -876,6 +913,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (presence == null || presence.IsDeleted || presence.IsInTransit) return; + Vector3 pos = presence.AbsolutePosition; + if(isNotOwner && !checkAllowAgentTPbyLandOwner(agentId, pos)) + { + ScriptSleep(500); + return; + } + if(regionName == World.RegionInfo.RegionName) { // should be faster than going to threadpool @@ -903,15 +947,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent"); - TeleportAgent(agent, regionGridX, regionGridY, position, lookat, false); + TeleportAgent(agent, regionGridX, regionGridY, position, lookat, true); } private void TeleportAgent(string agent, int regionGridX, int regionGridY, - LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool relaxRestrictions) + LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool isNotOwner) { + m_host.AddScriptLPS(1); + ulong regionHandle = Util.RegionGridLocToHandle((uint)regionGridX, (uint)regionGridY); - m_host.AddScriptLPS(1); UUID agentId; if (UUID.TryParse(agent, out agentId)) { @@ -919,6 +964,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (presence == null || presence.IsDeleted || presence.IsInTransit) return; + Vector3 pos = presence.AbsolutePosition; + if(isNotOwner && !checkAllowAgentTPbyLandOwner(agentId, pos)) + { + ScriptSleep(500); + return; + } + Util.FireAndForget( o => World.RequestTeleportLocation( presence.ControllingClient, regionHandle, @@ -931,8 +983,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { - m_host.AddScriptLPS(1); + TeleportAgent(agent, position, lookat, true); + } + private void TeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool isNotOwner) + { + m_host.AddScriptLPS(1); UUID agentId; if (UUID.TryParse(agent, out agentId)) { @@ -940,6 +996,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (presence == null || presence.IsDeleted || presence.IsInTransit) return; + Vector3 pos = presence.AbsolutePosition; + if(isNotOwner && !checkAllowAgentTPbyLandOwner(agentId, pos)) + { + ScriptSleep(500); + return; + } + World.RequestTeleportLocation(presence.ControllingClient, World.RegionInfo.RegionName, position, lookat, (uint)TPFlags.ViaLocation); ScriptSleep(500); @@ -951,19 +1014,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Threat level None because this is what can already be done with the World Map in the viewer CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); - TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat); - } - - public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) - { - osTeleportAgent(m_host.OwnerID.ToString(), position, lookat); + TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat, false); } public void osTeleportOwner(int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); - TeleportAgent(m_host.OwnerID.ToString(), regionGridX, regionGridY, position, lookat, true); + TeleportAgent(m_host.OwnerID.ToString(), regionGridX, regionGridY, position, lookat, false); + } + + public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) + { + TeleportAgent(m_host.OwnerID.ToString(), position, lookat, false); } /// -- cgit v1.1 From e075cf44614dde1b4fcf4c3f539b1d3eba049f5d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Jun 2017 09:08:23 +0100 Subject: fix bad english --- OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 751aaca..8fae1d5 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs @@ -177,7 +177,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver else if(totalerrors == 0) m_log.DebugFormat("[ARCHIVER]: Successfully added all {0} assets", m_foundAssetUuids.Count); else - m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} of total possible assets requested where not found, where damaged or where not assets", + m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} of total possible assets requested were not found, were damaged or were not assets", m_foundAssetUuids.Count, totalerrors); PerformAssetsRequestCallback(m_timeout); -- cgit v1.1 From ef74efeaa7214e208739e1e71bcbc98426ec8764 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Jun 2017 09:18:31 +0100 Subject: and add a missing bracket :) --- OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 8fae1d5..91f4dc3 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs @@ -177,7 +177,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver else if(totalerrors == 0) m_log.DebugFormat("[ARCHIVER]: Successfully added all {0} assets", m_foundAssetUuids.Count); else - m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} of total possible assets requested were not found, were damaged or were not assets", + m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} of total possible assets requested were not found, were damaged or were not assets)", m_foundAssetUuids.Count, totalerrors); PerformAssetsRequestCallback(m_timeout); -- cgit v1.1 From cbd0af3cab4c12aab0e149802d2b62aa35bd561b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Jun 2017 18:26:45 +0100 Subject: let osTeleport* always work on script prim owner --- .../Shared/Api/Implementation/OSSL_Api.cs | 32 ++++++++++------------ 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index ce48e63..d665f69 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -854,6 +854,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private bool checkAllowAgentTPbyLandOwner(UUID agentId, Vector3 pos) { + UUID hostOwner = m_host.OwnerID; + + if(hostOwner == agentId) + return true; + if (m_item.PermsGranter == agentId) { if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TELEPORT) != 0) @@ -868,8 +873,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if(landdata == null) return true; - UUID hostOwner = m_host.OwnerID; - if(landdata.OwnerID == hostOwner) return true; @@ -896,11 +899,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent"); - TeleportAgent(agent, regionName, position, lookat, true); + TeleportAgent(agent, regionName, position, lookat); } private void TeleportAgent(string agent, string regionName, - LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool isNotOwner) + LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { m_host.AddScriptLPS(1); if(String.IsNullOrEmpty(regionName)) @@ -914,7 +917,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; Vector3 pos = presence.AbsolutePosition; - if(isNotOwner && !checkAllowAgentTPbyLandOwner(agentId, pos)) + if(!checkAllowAgentTPbyLandOwner(agentId, pos)) { ScriptSleep(500); return; @@ -947,11 +950,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent"); - TeleportAgent(agent, regionGridX, regionGridY, position, lookat, true); + TeleportAgent(agent, regionGridX, regionGridY, position, lookat); } private void TeleportAgent(string agent, int regionGridX, int regionGridY, - LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool isNotOwner) + LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { m_host.AddScriptLPS(1); @@ -965,7 +968,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; Vector3 pos = presence.AbsolutePosition; - if(isNotOwner && !checkAllowAgentTPbyLandOwner(agentId, pos)) + if(!checkAllowAgentTPbyLandOwner(agentId, pos)) { ScriptSleep(500); return; @@ -983,11 +986,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { - TeleportAgent(agent, position, lookat, true); - } - - private void TeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool isNotOwner) - { m_host.AddScriptLPS(1); UUID agentId; if (UUID.TryParse(agent, out agentId)) @@ -997,7 +995,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; Vector3 pos = presence.AbsolutePosition; - if(isNotOwner && !checkAllowAgentTPbyLandOwner(agentId, pos)) + if(!checkAllowAgentTPbyLandOwner(agentId, pos)) { ScriptSleep(500); return; @@ -1014,19 +1012,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Threat level None because this is what can already be done with the World Map in the viewer CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); - TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat, false); + TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat); } public void osTeleportOwner(int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); - TeleportAgent(m_host.OwnerID.ToString(), regionGridX, regionGridY, position, lookat, false); + TeleportAgent(m_host.OwnerID.ToString(), regionGridX, regionGridY, position, lookat); } public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { - TeleportAgent(m_host.OwnerID.ToString(), position, lookat, false); + osTeleportAgent(m_host.OwnerID.ToString(), position, lookat); } /// -- cgit v1.1 From f660aa37ac7c8b935c2f317c2d4a1907c0ab9ed2 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Jun 2017 19:40:20 +0100 Subject: add similar restrictions to osObjectTeleport :( --- .../Shared/Api/Implementation/OSSL_Api.cs | 43 +++++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index d665f69..1a88529 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -876,7 +876,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if(landdata.OwnerID == hostOwner) return true; - if(World.RegionInfo.EstateSettings != null && World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(hostOwner)) + EstateSettings es = World.RegionInfo.EstateSettings; + if(es != null && es.IsEstateManagerOrOwner(hostOwner)) return true; if(!landdata.IsGroupOwned) @@ -4756,6 +4757,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api sog.SetInertiaData(-1, Vector3.Zero, Vector3.Zero, Vector4.Zero ); } + private bool checkAllowObjectTPbyLandOwner(Vector3 pos) + { + ILandObject land = World.LandChannel.GetLandObject(pos); + if(land == null) + return true; + + LandData landdata = land.LandData; + if(landdata == null) + return true; + + UUID hostOwner = m_host.OwnerID; + if(landdata.OwnerID == hostOwner) + return true; + + EstateSettings es = World.RegionInfo.EstateSettings; + if(es != null && es.IsEstateManagerOrOwner(hostOwner)) + return true; + + if(!landdata.IsGroupOwned) + return false; + + UUID landGroup = landdata.GroupID; + if(landGroup == UUID.Zero) + return false; + + if(landGroup == m_host.GroupID) + return true; + + return false; + } + /// /// teleports a object (full linkset) /// @@ -4785,9 +4817,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } SceneObjectGroup sog = World.GetSceneObjectGroup(objUUID); - if(sog== null || sog.IsDeleted) + if(sog== null || sog.IsDeleted || sog.inTransit) return -1; + if(sog.OwnerID != m_host.OwnerID) + { + Vector3 pos = sog.AbsolutePosition; + if(!checkAllowObjectTPbyLandOwner(pos)) + return -1; + } + UUID myid = m_host.ParentGroup.UUID; return sog.TeleportObject(myid, targetPos, rotation, flags); -- cgit v1.1 From 9ea6580c37840e5da7453d1a6108fb81883c8dbc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Jun 2017 20:05:11 +0100 Subject: update osslEnable.ini. functions that have no level check are still listed but commented, just to be more visible --- bin/config-include/osslEnable.ini | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index 6481825..815a644 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -69,7 +69,11 @@ ; some ThreadLevel None functions no longer do level check. listed comment just to be visible ; ThreatLevel None -; Allow_osDrawEllipse = true ; no level check + +; Allow_osClearInertia() = true ; no level check +; Allow_osCheckODE = true ; no level check +; Allow_osCollisionSound = true ; no level check +; Allow_osDrawEllipse = true ; no level check ; Allow_osDrawFilledEllipse = true ; no level check ; Allow_osDrawFilledPolygon = true ; no level check ; Allow_osDrawFilledRectangle = true ; no level check @@ -85,10 +89,13 @@ Allow_osGetAgents = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetAvatarList = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetCurrentSunHour = true +; Allow_osGetPhysicsEngineName = true ; no level check Allow_osGetGender = true Allow_osGetHealth = true Allow_osGetHealRate = true +; Allow_osGetInertiaData = true ; no level check Allow_osGetInventoryDesc = true +; Allow_osGetLinkNumber = true ; no level check Allow_osGetMapTexture = true Allow_osGetRegionSize = true Allow_osGetRezzingObject = true @@ -103,6 +110,11 @@ Allow_osNpcGetOwner = ${XEngine|osslNPC} Allow_osParseJSON = true Allow_osParseJSONNew = true +; Allow_osSetInertia = true ; no level check +; Allow_osSetInertiaAsBox = true ; no level check +; Allow_osSetInertiaAsSphere = true ; no level check +; Allow_osSetInertiaAsCylinder = true ; no level check + ; Allow_osSetFontName = true ; no level check ; Allow_osSetFontSize = true ; no level check ; Allow_osSetPenCap = true ; no level check @@ -111,7 +123,7 @@ Allow_osSetSunParam = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osTeleportOwner = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osWindActiveModelPluginName = true - Allow_osCheckODE = true ; Here for completeness. This function cannot be turned off +; Allow_osVolumeDetect = true ; no level check ; ThreatLevel Nuisance Allow_osSetEstateSunSettings = ESTATE_MANAGER,ESTATE_OWNER @@ -126,6 +138,7 @@ Allow_osInviteToGroup = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osReplaceString = true Allow_osSetDynamicTextureData = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osSetDynamicTextureDataFace = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetDynamicTextureDataBlend = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetDynamicTextureDataBlendFace = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetDynamicTextureURL = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER -- cgit v1.1 From 3fda7c6315a0f6ae07adb8d7a1bac378ef8a31ff Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Jun 2017 20:23:24 +0100 Subject: take a few more out of level check --- bin/config-include/osslEnable.ini | 61 +++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index 815a644..1d7f25b 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -70,42 +70,42 @@ ; ThreatLevel None -; Allow_osClearInertia() = true ; no level check -; Allow_osCheckODE = true ; no level check -; Allow_osCollisionSound = true ; no level check -; Allow_osDrawEllipse = true ; no level check -; Allow_osDrawFilledEllipse = true ; no level check -; Allow_osDrawFilledPolygon = true ; no level check -; Allow_osDrawFilledRectangle = true ; no level check -; Allow_osDrawResetTransform = true ; no level check -; Allow_osDrawRotationTransform = true ; no level check -; Allow_osDrawScaleTransform = true ; no level check -; Allow_osDrawTranslationTransform = true ; no level check -; Allow_osDrawImage = true ; no level check -; Allow_osDrawLine = true ; no level check -; Allow_osDrawPolygon = true ; no level check -; Allow_osDrawRectangle = true ; no level check -; Allow_osDrawText = true ; no level check +; Allow_osClearInertia() = true ; no level check +; Allow_osCheckODE = true ; no level check +; Allow_osCollisionSound = true ; no level check +; Allow_osDrawEllipse = true ; no level check +; Allow_osDrawFilledEllipse = true ; no level check +; Allow_osDrawFilledPolygon = true ; no level check +; Allow_osDrawFilledRectangle = true ; no level check +; Allow_osDrawResetTransform = true ; no level check +; Allow_osDrawRotationTransform = true ; no level check +; Allow_osDrawScaleTransform = true ; no level check +; Allow_osDrawTranslationTransform = true ; no level check +; Allow_osDrawImage = true ; no level check +; Allow_osDrawLine = true ; no level check +; Allow_osDrawPolygon = true ; no level check +; Allow_osDrawRectangle = true ; no level check +; Allow_osDrawText = true ; no level check Allow_osGetAgents = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetAvatarList = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetCurrentSunHour = true -; Allow_osGetPhysicsEngineName = true ; no level check +; Allow_osGetCurrentSunHour = true ; no level check +; Allow_osGetPhysicsEngineName = true ; no level check Allow_osGetGender = true Allow_osGetHealth = true Allow_osGetHealRate = true -; Allow_osGetInertiaData = true ; no level check - Allow_osGetInventoryDesc = true -; Allow_osGetLinkNumber = true ; no level check - Allow_osGetMapTexture = true - Allow_osGetRegionSize = true +; Allow_osGetInertiaData = true ; no level check +; Allow_osGetInventoryDesc = true ; no level check +; Allow_osGetLinkNumber = true ; no level check +; Allow_osGetMapTexture = true ; no level check +; Allow_osGetRegionSize = true ; no level check Allow_osGetRezzingObject = true - Allow_osGetSunParam = true - Allow_osGetTerrainHeight = true - Allow_osIsNpc = true - Allow_osIsUUID = true - Allow_osList2Double = true - Allow_osMax = true - Allow_osMin = true +; Allow_osGetSunParam = true ; no level check +; Allow_osGetTerrainHeight = true ; no level check +; Allow_osIsNpc = true ; no level check +; Allow_osIsUUID = true ; no level check +; Allow_osList2Double = true ; no level check +; Allow_osMax = true ; no level check +; Allow_osMin = true ; no level check ; Allow_osMovePen = true ; no level check Allow_osNpcGetOwner = ${XEngine|osslNPC} Allow_osParseJSON = true @@ -114,7 +114,6 @@ ; Allow_osSetInertiaAsBox = true ; no level check ; Allow_osSetInertiaAsSphere = true ; no level check ; Allow_osSetInertiaAsCylinder = true ; no level check - ; Allow_osSetFontName = true ; no level check ; Allow_osSetFontSize = true ; no level check ; Allow_osSetPenCap = true ; no level check -- cgit v1.1 From b59ce7c96889d72ddad6babb75cf7b68c885e26c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Jun 2017 20:28:16 +0100 Subject: also on the actual source file --- .../Shared/Api/Implementation/OSSL_Api.cs | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 1a88529..823a4e5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -517,13 +517,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float osGetTerrainHeight(int x, int y) { - CheckThreatLevel(ThreatLevel.None, "osGetTerrainHeight"); + CheckThreatLevel(); return GetTerrainHeight(x, y); } public LSL_Float osTerrainGetHeight(int x, int y) { - CheckThreatLevel(ThreatLevel.None, "osTerrainGetHeight"); + CheckThreatLevel(); OSSLDeprecated("osTerrainGetHeight", "osGetTerrainHeight"); return GetTerrainHeight(x, y); } @@ -1518,7 +1518,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public double osGetCurrentSunHour() { - CheckThreatLevel(ThreatLevel.None, "osGetCurrentSunHour"); + CheckThreatLevel(); m_host.AddScriptLPS(1); @@ -1544,7 +1544,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public double osGetSunParam(string param) { - CheckThreatLevel(ThreatLevel.None, "osGetSunParam"); + CheckThreatLevel(); return GetSunParam(param); } @@ -1743,7 +1743,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // is not allowed to contain any. // This really should be removed. // - CheckThreatLevel(ThreatLevel.None, "osList2Double"); + CheckThreatLevel(); m_host.AddScriptLPS(1); if (index < 0) @@ -2818,7 +2818,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osIsNpc(LSL_Key npc) { - CheckThreatLevel(ThreatLevel.None, "osIsNpc"); + CheckThreatLevel(); m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); @@ -3539,7 +3539,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Key osGetMapTexture() { - CheckThreatLevel(ThreatLevel.None, "osGetMapTexture"); +// CheckThreatLevel(ThreatLevel.None, "osGetMapTexture"); + CheckThreatLevel(); m_host.AddScriptLPS(1); return m_ScriptEngine.World.RegionInfo.RegionSettings.TerrainImageID.ToString(); @@ -3597,7 +3598,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector osGetRegionSize() { - CheckThreatLevel(ThreatLevel.None, "osGetRegionSize"); + CheckThreatLevel(); m_host.AddScriptLPS(1); Scene scene = m_ScriptEngine.World; @@ -3859,6 +3860,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// Item description public LSL_String osGetInventoryDesc(string item) { + CheckThreatLevel(); m_host.AddScriptLPS(1); lock (m_host.TaskInventory) @@ -4239,7 +4241,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// 1 if thing is a valid UUID, 0 otherwise public LSL_Integer osIsUUID(string thing) { - CheckThreatLevel(ThreatLevel.None, "osIsUUID"); + CheckThreatLevel(); m_host.AddScriptLPS(1); UUID test; @@ -4254,7 +4256,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Float osMin(double a, double b) { - CheckThreatLevel(ThreatLevel.None, "osMin"); + CheckThreatLevel(); m_host.AddScriptLPS(1); return Math.Min(a, b); @@ -4268,7 +4270,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Float osMax(double a, double b) { - CheckThreatLevel(ThreatLevel.None, "osMax"); + CheckThreatLevel(); m_host.AddScriptLPS(1); return Math.Max(a, b); -- cgit v1.1 From e53f4399812224939e4ebec6790a9addb38cca95 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Jun 2017 20:42:49 +0100 Subject: add osGetNPCList() --- .../Shared/Api/Implementation/OSSL_Api.cs | 19 +++++++++++++++++++ .../ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 1 + .../ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 5 +++++ bin/config-include/osslEnable.ini | 1 + 4 files changed, 26 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 823a4e5..fa7ee21 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -3835,6 +3835,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return result; } + public LSL_List osGetNPCList() + { + CheckThreatLevel(ThreatLevel.None, "osGetNPCList"); + m_host.AddScriptLPS(1); + + LSL_List result = new LSL_List(); + World.ForEachRootScenePresence(delegate (ScenePresence avatar) + { + if (avatar != null && avatar.IsNPC) + { + result.Add(new LSL_String(avatar.UUID.ToString())); + result.Add(new LSL_Vector(avatar.AbsolutePosition)); + result.Add(new LSL_String(avatar.Name)); + } + }); + + return result; + } + /// /// Convert a unix time to a llGetTimestamp() like string /// diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index f7857da..6e6a0be 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -395,6 +395,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb); LSL_List osGetAvatarList(); + LSL_List osGetNPCList(); LSL_String osUnixTimeToTimestamp(long time); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index d6af32b..43113b8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -1041,6 +1041,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osGetAvatarList(); } + public LSL_List osGetNPCList() + { + return m_OSSL_Functions.osGetNPCList(); + } + public LSL_String osUnixTimeToTimestamp(long time) { return m_OSSL_Functions.osUnixTimeToTimestamp(time); diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index 1d7f25b..99c5fff 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -97,6 +97,7 @@ ; Allow_osGetInventoryDesc = true ; no level check ; Allow_osGetLinkNumber = true ; no level check ; Allow_osGetMapTexture = true ; no level check + Allow_osGetNPCList = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER ; Allow_osGetRegionSize = true ; no level check Allow_osGetRezzingObject = true ; Allow_osGetSunParam = true ; no level check -- cgit v1.1 From b319977a3f114442a0b8c93349f7d654745dc386 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Jun 2017 20:51:16 +0100 Subject: dont list deleted ones, that still don't know they are gone --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index fa7ee21..ef511aa 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -3843,7 +3843,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_List result = new LSL_List(); World.ForEachRootScenePresence(delegate (ScenePresence avatar) { - if (avatar != null && avatar.IsNPC) + // npcs are not childagents but that is now. + if (avatar != null && avatar.IsNPC && !avatar.IsDeleted && !avatar.IsChildAgent) { result.Add(new LSL_String(avatar.UUID.ToString())); result.Add(new LSL_Vector(avatar.AbsolutePosition)); -- cgit v1.1 From 5242853d684e2fbe81a28401809a19e3d57e1e51 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Jun 2017 20:55:44 +0100 Subject: dont list deleted ones, that still don't know they are gone --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index ef511aa..f41f011 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -3824,7 +3824,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_List result = new LSL_List(); World.ForEachRootScenePresence(delegate (ScenePresence avatar) { - if (avatar != null && avatar.UUID != m_host.OwnerID) + if (avatar != null && !avatar.IsDeleted && avatar.UUID != m_host.OwnerID ) { result.Add(new LSL_String(avatar.UUID.ToString())); result.Add(new LSL_Vector(avatar.AbsolutePosition)); @@ -3844,7 +3844,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api World.ForEachRootScenePresence(delegate (ScenePresence avatar) { // npcs are not childagents but that is now. - if (avatar != null && avatar.IsNPC && !avatar.IsDeleted && !avatar.IsChildAgent) + if (avatar != null && avatar.IsNPC && !avatar.IsDeleted && !avatar.IsChildAgent && !avatar.IsInTransit) { result.Add(new LSL_String(avatar.UUID.ToString())); result.Add(new LSL_Vector(avatar.AbsolutePosition)); -- cgit v1.1 From 936aee412d67edc0e143ab13213c5ee1cb1c2a0e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 27 Jun 2017 01:41:06 +0100 Subject: remove osGetAgentIP() this was not a good idea to have :( --- .../Shared/Api/Implementation/OSSL_Api.cs | 26 +--------------------- .../ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 1 - .../ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 7 +----- 3 files changed, 2 insertions(+), 32 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index f41f011..a1fd7cd 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1080,31 +1080,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api targetID, part.SitTargetPosition); } - - // Functions that get information from the agent itself. - // - // osGetAgentIP - this is used to determine the IP address of - //the client. This is needed to help configure other in world - //resources based on the IP address of the clients connected. - //I think High is a good risk level for this, as it is an - //information leak. - public string osGetAgentIP(string agent) - { - CheckThreatLevel(ThreatLevel.High, "osGetAgentIP"); - - UUID avatarID = (UUID)agent; - - m_host.AddScriptLPS(1); - if (World.Entities.ContainsKey((UUID)agent) && World.Entities[avatarID] is ScenePresence) - { - ScenePresence target = (ScenePresence)World.Entities[avatarID]; - return target.ControllingClient.RemoteEndPoint.Address.ToString(); - } - - // fall through case, just return nothing - return ""; - } - + // Get a list of all the avatars/agents in the region public LSL_List osGetAgents() { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 6e6a0be..6be3c3f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -144,7 +144,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces void osSetParcelSIPAddress(string SIPAddress); // Avatar Info Commands - string osGetAgentIP(string agent); LSL_List osGetAgents(); // Teleport commands diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 43113b8..f5d2a3a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -277,12 +277,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_OSSL_Functions.osTeleportOwner(position, lookat); } - // Avatar info functions - public string osGetAgentIP(string agent) - { - return m_OSSL_Functions.osGetAgentIP(agent); - } - public LSL_List osGetAgents() { return m_OSSL_Functions.osGetAgents(); @@ -430,6 +424,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { return m_OSSL_Functions.osSetPenColor(drawList, color); } + // Deprecated public string osSetPenColour(string drawList, string colour) { -- cgit v1.1 From b0a0163253e14514289578d31e83ce0afe9b91a3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 28 Jun 2017 01:29:49 +0100 Subject: BUG FIX: change lludp hovertext utf-8 cut point. Thx djphil --- OpenSim/Framework/Util.cs | 6 +++--- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 5 ++--- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 ++++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index af14939..ed24452 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -2221,9 +2221,9 @@ namespace OpenSim.Framework // might have gotten an oversized array even after the string trim byte[] data = UTF8.GetBytes(str); - if (data.Length > 256) + if (data.Length > 255) //play safe { - int cut = 255; + int cut = 254; if((data[cut] & 0x80 ) != 0 ) { while(cut > 0 && (data[cut] & 0xc0) != 0xc0) @@ -2325,7 +2325,7 @@ namespace OpenSim.Framework if (data.Length > MaxLength) { - int cut = MaxLength -1 ; + int cut = MaxLength - 1 ; if((data[cut] & 0x80 ) != 0 ) { while(cut > 0 && (data[cut] & 0xc0) != 0xc0) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 01c1fb9..b3e68ec 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5753,7 +5753,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP //update.JointPivot = Vector3.Zero; //update.JointType = 0; update.Material = part.Material; - update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim /* if (data.ParentGroup.IsAttachment) { @@ -5832,8 +5831,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP update.TextureAnim = part.TextureAnimation ?? Utils.EmptyBytes; update.TextureEntry = part.Shape.TextureEntry ?? Utils.EmptyBytes; update.Scale = part.Shape.Scale; - update.Text = Util.StringToBytes256(part.Text); - update.MediaURL = Util.StringToBytes256(part.MediaUrl); + update.Text = Util.StringToBytes(part.Text, 255); + update.MediaURL = Util.StringToBytes(part.MediaUrl, 255); #region PrimFlags diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index c2eac24..f9699b1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1103,8 +1103,8 @@ namespace OpenSim.Region.Framework.Scenes { get { - if (m_text.Length > 255) - return m_text.Substring(0, 254); + if (m_text.Length > 256) // yes > 254 + return m_text.Substring(0, 256); return m_text; } set { m_text = value; } @@ -1379,7 +1379,8 @@ namespace OpenSim.Region.Framework.Scenes public UUID LastOwnerID { get { return _lastOwnerID; } - set { _lastOwnerID = value; } + set { + _lastOwnerID = value; } } public UUID RezzerID -- cgit v1.1 From e243dd05193a1edcb16f52b2514c41de70ff8006 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 28 Jun 2017 02:19:27 +0100 Subject: put back getAgentIP bug restricted, script owner must be a Administrator (god) --- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 18 ++++++++++++++++++ .../ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 1 + .../ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 5 +++++ bin/config-include/osslEnable.ini | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index a1fd7cd..b84065f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1097,6 +1097,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return result; } + public string osGetAgentIP(string agent) + { + CheckThreatLevel(); // user god is the restriction + if(!(World.Permissions.IsGod(m_host.OwnerID))) + return ""; + + UUID avatarID = (UUID)agent; + + m_host.AddScriptLPS(1); + if (World.Entities.ContainsKey((UUID)agent) && World.Entities[avatarID] is ScenePresence) + { + ScenePresence target = (ScenePresence)World.Entities[avatarID]; + return target.ControllingClient.RemoteEndPoint.Address.ToString(); + } + + // fall through case, just return nothing + return ""; + } // Adam's super super custom animation functions public void osAvatarPlayAnimation(string avatar, string animation) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 6be3c3f..8f863af 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -145,6 +145,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces // Avatar Info Commands LSL_List osGetAgents(); + string osGetAgentIP(string agent); // Teleport commands void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index f5d2a3a..42e7bfb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -282,6 +282,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osGetAgents(); } + public string osGetAgentIP(string agent) + { + return m_OSSL_Functions.osGetAgentIP(agent); + } + // Animation Functions public void osAvatarPlayAnimation(string avatar, string animation) diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index 99c5fff..1d03f83 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -86,6 +86,7 @@ ; Allow_osDrawPolygon = true ; no level check ; Allow_osDrawRectangle = true ; no level check ; Allow_osDrawText = true ; no level check +; Allow_osGetAgentIP = ---- ;restricted to Administrators (GOD) Allow_osGetAgents = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetAvatarList = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER ; Allow_osGetCurrentSunHour = true ; no level check @@ -191,7 +192,6 @@ Allow_osForceCreateLink = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osForceDropAttachment = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osForceDropAttachmentAt = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetAgentIP = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetLinkPrimitiveParams = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetPhysicsEngineType = true Allow_osGetPrimitiveParams = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER -- cgit v1.1 From 6bac44e767819b6aa82d0ed503c5bcc7f72b9883 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 29 Jun 2017 00:42:35 +0100 Subject: bug fix --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index b3e68ec..53c185b 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5526,6 +5526,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion #region Helper Methods + private void ClampVectorForUint(ref Vector3 v, float max) + { + float a,b; + + a = Math.Abs(v.X); + b = Math.Abs(v.Y); + if(b > a) + a = b; + b= Math.Abs(v.Z); + if(b > a) + a = b; + + if (a > max) + { + a = max / a; + v.X *= a; + v.Y *= a; + v.Z *= a; + } + } protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedTerseBlock(ISceneEntity entity, bool sendTexture) { @@ -5616,11 +5636,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP pos += 12; // Velocity + ClampVectorForUint(ref velocity, 128f); Utils.UInt16ToBytes(Utils.FloatToUInt16(velocity.X, -128.0f, 128.0f), data, pos); pos += 2; Utils.UInt16ToBytes(Utils.FloatToUInt16(velocity.Y, -128.0f, 128.0f), data, pos); pos += 2; Utils.UInt16ToBytes(Utils.FloatToUInt16(velocity.Z, -128.0f, 128.0f), data, pos); pos += 2; // Acceleration + ClampVectorForUint(ref acceleration, 64f); Utils.UInt16ToBytes(Utils.FloatToUInt16(acceleration.X, -64.0f, 64.0f), data, pos); pos += 2; Utils.UInt16ToBytes(Utils.FloatToUInt16(acceleration.Y, -64.0f, 64.0f), data, pos); pos += 2; Utils.UInt16ToBytes(Utils.FloatToUInt16(acceleration.Z, -64.0f, 64.0f), data, pos); pos += 2; @@ -5632,6 +5654,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP Utils.UInt16ToBytes(Utils.FloatToUInt16(rotation.W, -1.0f, 1.0f), data, pos); pos += 2; // Angular Velocity + ClampVectorForUint(ref angularVelocity, 64f); Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.X, -64.0f, 64.0f), data, pos); pos += 2; Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Y, -64.0f, 64.0f), data, pos); pos += 2; Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Z, -64.0f, 64.0f), data, pos); pos += 2; -- cgit v1.1 From 190874344b21a77037bc04114eb3347b944af55f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 29 Jun 2017 21:14:20 +0100 Subject: ScriptsHttpReq does not need a permanent thread --- .../Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 57dc556..f5b575b 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -379,9 +379,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest if (ThreadPool == null) { STPStartInfo startInfo = new STPStartInfo(); - startInfo.IdleTimeout = 20000; + startInfo.IdleTimeout = 2000; startInfo.MaxWorkerThreads = maxThreads; - startInfo.MinWorkerThreads = 1; + startInfo.MinWorkerThreads = 0; startInfo.ThreadPriority = ThreadPriority.BelowNormal; startInfo.StartSuspended = true; startInfo.ThreadPoolName = "ScriptsHttpReq"; -- cgit v1.1 From cb2607d4fa68e2c7721a0272e503bb07b4109524 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 29 Jun 2017 21:17:41 +0100 Subject: fix scripts xmlrpc threads names --- OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs index f68c5f8..6028eef 100644 --- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs @@ -658,7 +658,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC public void Process() { _finished = false; - httpThread = WorkManager.StartThread(SendRequest, "HttpRequestThread", ThreadPriority.BelowNormal, true, false, null, int.MaxValue); + httpThread = WorkManager.StartThread(SendRequest, "XMLRPCreqThread", ThreadPriority.BelowNormal, true, false, null, int.MaxValue); } /* -- cgit v1.1 From aa4eb2bc147fc0ce8c5e5c9afa2d792ac17073c2 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 30 Jun 2017 00:30:46 +0100 Subject: update ode.dll (windoes only. need bins for others :( ) --- bin/lib32/ode.dll | Bin 541696 -> 541184 bytes bin/lib64/ode.dll | Bin 635392 -> 635392 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/bin/lib32/ode.dll b/bin/lib32/ode.dll index ddffcb3..5636903 100755 Binary files a/bin/lib32/ode.dll and b/bin/lib32/ode.dll differ diff --git a/bin/lib64/ode.dll b/bin/lib64/ode.dll index 0d6edbe..fdc0ddd 100755 Binary files a/bin/lib64/ode.dll and b/bin/lib64/ode.dll differ -- cgit v1.1 From 6b0a3e981cc06e7935960a5a806222a2aa2126d9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 30 Jun 2017 22:04:56 +0100 Subject: put osGetAgentIP() in threat control with level Severe so it can be disabled even for inworld administrators as needed on some grids. rearrage the osslEnable.ini file segregating the funtions only listed for information --- .../Shared/Api/Implementation/OSSL_Api.cs | 16 +-- bin/config-include/osslEnable.ini | 116 +++++++++++---------- 2 files changed, 66 insertions(+), 66 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index b84065f..1139579 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -452,7 +452,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - if (!m_FunctionPerms[function].AllowedCreators.Contains(m_item.CreatorID)) return( String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.", @@ -1099,8 +1098,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetAgentIP(string agent) { - CheckThreatLevel(); // user god is the restriction - if(!(World.Permissions.IsGod(m_host.OwnerID))) + CheckThreatLevel(ThreatLevel.Severe, "osGetAgentIP"); + if(!(World.Permissions.IsGod(m_host.OwnerID))) // user god always needed return ""; UUID avatarID = (UUID)agent; @@ -1115,6 +1114,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // fall through case, just return nothing return ""; } + // Adam's super super custom animation functions public void osAvatarPlayAnimation(string avatar, string animation) { @@ -1131,13 +1131,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if(!UUID.TryParse(avatar, out avatarID)) return; - if(!World.Entities.ContainsKey(avatarID)) - return; - - ScenePresence target = null; - if ((World.Entities[avatarID] is ScenePresence)) - target = (ScenePresence)World.Entities[avatarID]; - + ScenePresence target = World.GetScenePresence(avatarID); if (target == null) return; @@ -1417,7 +1411,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize) { - CheckThreatLevel(ThreatLevel.VeryLow, "osGetDrawStringSize"); + CheckThreatLevel(); m_host.AddScriptLPS(1); LSL_Vector vec = new LSL_Vector(0,0,0); diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index 1d03f83..83d9756 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -31,7 +31,7 @@ ; higher threat level OSSL functions, as detailed later on. OSFunctionThreatLevel = VeryLow - ; Each of the OSSL functions can be enabled or disabled individually. + ; Some of the OSSL functions can be enabled or disabled individually. ; To disable, set the value to 'false'. ; To enable for everyone, set the value to 'true'. ; To enable for individuals or groups, set it to a comma separated list. This checks @@ -45,12 +45,10 @@ ; "PARCEL_OWNER" -- enable for parcel owner ; "PARCEL_GROUP_MEMBER" -- enable for any member of the parcel group ; uuid -- enable for specified ID (may be avatar or group ID) - - ; The OSSL function name is prepended with "Allow_" and it checks against - ; the owners of the containing prim. There can also be entries beginning with - ; 'Creators_". The 'Creators_" parameters can only be a list of UUIDs and it is - ; checked against the creator of the script itself. - + ; from this we can also create macros that can be include in the list as + ; ${XEngine|macroname} see examples below + + ; parcel macros ; Allowing ossl functions for anyone owning a parcel can be dangerous especially if ; a region is selling or otherwise giving away parcel ownership. By default, parcel ; ownership or group membership does not enable OSSL functions. Uncomment the @@ -62,69 +60,32 @@ ; osslParcelO = "PARCEL_OWNER," ; osslParcelOG = "PARCEL_GROUP_MEMBER,PARCEL_OWNER," - ; There are a block of functions for creating and controlling NPCs. + ; NPC macros + ; There are a block of macros to creating and controlling NPCs. ; These can be mis-used so limit use to those you can trust. - osslNPC = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - -; some ThreadLevel None functions no longer do level check. listed comment just to be visible + osslNPC = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - ; ThreatLevel None + ; The OSSL function name is prepended with "Allow_" and it checks against + ; the owners of the containing prim. There can also be entries beginning with + ; 'Creators_". The 'Creators_" parameters can only be a list of UUIDs and it is + ; checked against the creator of the script itself. -; Allow_osClearInertia() = true ; no level check -; Allow_osCheckODE = true ; no level check -; Allow_osCollisionSound = true ; no level check -; Allow_osDrawEllipse = true ; no level check -; Allow_osDrawFilledEllipse = true ; no level check -; Allow_osDrawFilledPolygon = true ; no level check -; Allow_osDrawFilledRectangle = true ; no level check -; Allow_osDrawResetTransform = true ; no level check -; Allow_osDrawRotationTransform = true ; no level check -; Allow_osDrawScaleTransform = true ; no level check -; Allow_osDrawTranslationTransform = true ; no level check -; Allow_osDrawImage = true ; no level check -; Allow_osDrawLine = true ; no level check -; Allow_osDrawPolygon = true ; no level check -; Allow_osDrawRectangle = true ; no level check -; Allow_osDrawText = true ; no level check -; Allow_osGetAgentIP = ---- ;restricted to Administrators (GOD) +; ************************************************* + + ; ThreatLevel None Allow_osGetAgents = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetAvatarList = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER -; Allow_osGetCurrentSunHour = true ; no level check -; Allow_osGetPhysicsEngineName = true ; no level check Allow_osGetGender = true Allow_osGetHealth = true Allow_osGetHealRate = true -; Allow_osGetInertiaData = true ; no level check -; Allow_osGetInventoryDesc = true ; no level check -; Allow_osGetLinkNumber = true ; no level check -; Allow_osGetMapTexture = true ; no level check Allow_osGetNPCList = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER -; Allow_osGetRegionSize = true ; no level check Allow_osGetRezzingObject = true -; Allow_osGetSunParam = true ; no level check -; Allow_osGetTerrainHeight = true ; no level check -; Allow_osIsNpc = true ; no level check -; Allow_osIsUUID = true ; no level check -; Allow_osList2Double = true ; no level check -; Allow_osMax = true ; no level check -; Allow_osMin = true ; no level check -; Allow_osMovePen = true ; no level check Allow_osNpcGetOwner = ${XEngine|osslNPC} Allow_osParseJSON = true Allow_osParseJSONNew = true -; Allow_osSetInertia = true ; no level check -; Allow_osSetInertiaAsBox = true ; no level check -; Allow_osSetInertiaAsSphere = true ; no level check -; Allow_osSetInertiaAsCylinder = true ; no level check -; Allow_osSetFontName = true ; no level check -; Allow_osSetFontSize = true ; no level check -; Allow_osSetPenCap = true ; no level check -; Allow_osSetPenColor = true ; no level check -; Allow_osSetPenSize = true ; no level check Allow_osSetSunParam = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osTeleportOwner = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osWindActiveModelPluginName = true -; Allow_osVolumeDetect = true ; no level check ; ThreatLevel Nuisance Allow_osSetEstateSunSettings = ESTATE_MANAGER,ESTATE_OWNER @@ -134,7 +95,6 @@ Allow_osEjectFromGroup = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osForceBreakAllLinks = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osForceBreakLink = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetDrawStringSize = true Allow_osGetWindParam = true Allow_osInviteToGroup = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osReplaceString = true @@ -258,3 +218,49 @@ Allow_osTeleportAgent = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osTeleportObject = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER +; funtions ThreatLevel Severe with aditional internal restrictions + Allow_osGetAgentIP = true ; always restricted to Administrators (true or false to disable) + +; avaiable funtions out of Threat level control (for reference only) +; Allow_osClearInertia = true +; Allow_osCheckODE = true +; Allow_osCollisionSound = true +; Allow_osDrawEllipse = true +; Allow_osDrawFilledEllipse = true +; Allow_osDrawFilledPolygon = true +; Allow_osDrawFilledRectangle = true +; Allow_osDrawResetTransform = true +; Allow_osDrawRotationTransform = true +; Allow_osDrawScaleTransform = true +; Allow_osDrawTranslationTransform = true +; Allow_osDrawImage = true +; Allow_osDrawLine = true +; Allow_osDrawPolygon = true +; Allow_osDrawRectangle = true +; Allow_osDrawText = true +; Allow_osGetCurrentSunHour = true +; Allow_osGetPhysicsEngineName = true +; Allow_osGetInertiaData = true +; Allow_osGetInventoryDesc = true +; Allow_osGetLinkNumber = true +; Allow_osGetMapTexture = true +; Allow_osGetRegionSize = true +; Allow_osGetSunParam = true +; Allow_osGetTerrainHeight = true +; Allow_osGetDrawStringSize = true +; Allow_osIsNpc = true +; Allow_osIsUUID = true +; Allow_osList2Double = true +; Allow_osMax = true +; Allow_osMin = true +; Allow_osMovePen = true +; Allow_osSetInertia = true +; Allow_osSetInertiaAsBox = true +; Allow_osSetInertiaAsSphere = true +; Allow_osSetInertiaAsCylinder = true +; Allow_osSetFontName = true +; Allow_osSetFontSize = true +; Allow_osSetPenCap = true +; Allow_osSetPenColor = true +; Allow_osSetPenSize = true +; Allow_osVolumeDetect = true -- cgit v1.1 From 965d004fbe2f3753ea915bab00c5ab08a54648ca Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 30 Jun 2017 22:39:19 +0100 Subject: do calls to m_host.AddScriptLPS() on the right place on osslm this stat is of course still wrong LPS does not mean api function calls --- .../Shared/Api/Implementation/OSSL_Api.cs | 224 ++------------------- bin/config-include/osslEnable.ini | 4 +- 2 files changed, 18 insertions(+), 210 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 1139579..22d247d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -264,6 +264,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // for safe funtions always active public void CheckThreatLevel() { + m_host.AddScriptLPS(1); if (!m_OSFunctionsEnabled) OSSLError(String.Format("{0} permission denied. All OS functions are disabled.")); // throws } @@ -271,6 +272,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Returns if the function is allowed. Throws a script exception if not allowed. public void CheckThreatLevel(ThreatLevel level, string function) { + m_host.AddScriptLPS(1); if (!m_OSFunctionsEnabled) OSSLError(String.Format("{0} permission denied. All OS functions are disabled.", function)); // throws @@ -498,8 +500,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private LSL_Integer SetTerrainHeight(int x, int y, double val) { - m_host.AddScriptLPS(1); - if (x > (World.RegionInfo.RegionSizeX - 1) || x < 0 || y > (World.RegionInfo.RegionSizeY - 1) || y < 0) OSSLError("osSetTerrainHeight: Coordinate out of bounds"); @@ -529,7 +529,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private LSL_Float GetTerrainHeight(int x, int y) { - m_host.AddScriptLPS(1); if (x > (World.RegionInfo.RegionSizeX - 1) || x < 0 || y > (World.RegionInfo.RegionSizeY - 1) || y < 0) OSSLError("osGetTerrainHeight: Coordinate out of bounds"); @@ -539,7 +538,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osTerrainFlush() { CheckThreatLevel(ThreatLevel.VeryLow, "osTerrainFlush"); - m_host.AddScriptLPS(1); ITerrainModule terrainModule = World.RequestModuleInterface(); if (terrainModule != null) terrainModule.TaintTerrain(); @@ -556,7 +554,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api CheckThreatLevel(ThreatLevel.High, "osRegionRestart"); IRestartModule restartModule = World.RequestModuleInterface(); - m_host.AddScriptLPS(1); if (World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false) && (restartModule != null)) { if (seconds < 15) @@ -579,7 +576,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api CheckThreatLevel(ThreatLevel.High, "osRegionRestart"); IRestartModule restartModule = World.RequestModuleInterface(); - m_host.AddScriptLPS(1); if (World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false) && (restartModule != null)) { if (seconds < 15) @@ -630,8 +626,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // CheckThreatLevel(ThreatLevel.VeryHigh, "osRegionNotice"); - m_host.AddScriptLPS(1); - IDialogModule dm = World.RequestModuleInterface(); if (dm != null) @@ -645,7 +639,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // CheckThreatLevel(ThreatLevel.VeryHigh, "osSetRot"); - m_host.AddScriptLPS(1); if (World.Entities.ContainsKey(target)) { EntityBase entity; @@ -671,7 +664,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURL"); - m_host.AddScriptLPS(1); if (dynamicID == String.Empty) { IDynamicTextureManager textureManager = World.RequestModuleInterface(); @@ -693,7 +685,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURLBlend"); - m_host.AddScriptLPS(1); if (dynamicID == String.Empty) { IDynamicTextureManager textureManager = World.RequestModuleInterface(); @@ -715,7 +706,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURLBlendFace"); - m_host.AddScriptLPS(1); if (dynamicID == String.Empty) { IDynamicTextureManager textureManager = World.RequestModuleInterface(); @@ -743,7 +733,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureData"); - m_host.AddScriptLPS(1); if (dynamicID == String.Empty) { IDynamicTextureManager textureManager = World.RequestModuleInterface(); @@ -773,7 +762,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlend"); - m_host.AddScriptLPS(1); if (dynamicID == String.Empty) { IDynamicTextureManager textureManager = World.RequestModuleInterface(); @@ -802,7 +790,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.VeryLow , "osSetDynamicTextureDataBlendFace"); - m_host.AddScriptLPS(1); if (dynamicID == String.Empty) { IDynamicTextureManager textureManager = World.RequestModuleInterface(); @@ -830,8 +817,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.Severe, "osConsoleCommand"); - m_host.AddScriptLPS(1); - // For safety, we add another permission check here, and don't rely only on the standard OSSL permissions if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) { @@ -846,8 +831,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.VeryLow, "osSetPrimFloatOnWater"); - m_host.AddScriptLPS(1); - m_host.ParentGroup.RootPart.SetFloatOnWater(floatYN); } @@ -905,7 +888,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private void TeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { - m_host.AddScriptLPS(1); if(String.IsNullOrEmpty(regionName)) regionName = World.RegionInfo.RegionName; @@ -956,8 +938,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private void TeleportAgent(string agent, int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { - m_host.AddScriptLPS(1); - ulong regionHandle = Util.RegionGridLocToHandle((uint)regionGridX, (uint)regionGridY); UUID agentId; @@ -986,7 +966,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { - m_host.AddScriptLPS(1); UUID agentId; if (UUID.TryParse(agent, out agentId)) { @@ -1024,6 +1003,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { + CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); + osTeleportAgent(m_host.OwnerID.ToString(), position, lookat); } @@ -1038,8 +1019,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.VeryHigh, "osForceOtherSit"); - m_host.AddScriptLPS(1); - ForceSit(avatar, m_host.UUID); } @@ -1053,8 +1032,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.VeryHigh, "osForceOtherSit"); - m_host.AddScriptLPS(1); - UUID targetID = new UUID(target); ForceSit(avatar, targetID); @@ -1086,7 +1063,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // threat level is None as we could get this information with an // in-world script as well, just not as efficient CheckThreatLevel(ThreatLevel.None, "osGetAgents"); - m_host.AddScriptLPS(1); LSL_List result = new LSL_List(); World.ForEachRootScenePresence(delegate(ScenePresence sp) @@ -1104,7 +1080,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UUID avatarID = (UUID)agent; - m_host.AddScriptLPS(1); if (World.Entities.ContainsKey((UUID)agent) && World.Entities[avatarID] is ScenePresence) { ScenePresence target = (ScenePresence)World.Entities[avatarID]; @@ -1125,8 +1100,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private void AvatarPlayAnimation(string avatar, string animation) { - m_host.AddScriptLPS(1); - UUID avatarID; if(!UUID.TryParse(avatar, out avatarID)) return; @@ -1167,8 +1140,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { UUID avatarID = (UUID)avatar; - m_host.AddScriptLPS(1); - // FIXME: What we really want to do here is factor out the similar code in llStopAnimation() to a common // method (though see that doesn't do the is animation check, which is probably a bug) and have both // these functions call that common code. However, this does mean navigating the brain-dead requirement @@ -1203,7 +1174,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawResetTransform(string drawList) { CheckThreatLevel(); - m_host.AddScriptLPS(1); + drawList += "ResetTransf;"; return drawList; } @@ -1211,7 +1182,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawRotationTransform(string drawList, LSL_Float x) { CheckThreatLevel(); - m_host.AddScriptLPS(1); + drawList += "RotTransf " + x + ";"; return drawList; } @@ -1220,7 +1191,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "ScaleTransf " + x + "," + y + ";"; return drawList; } @@ -1229,7 +1199,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "TransTransf " + x + "," + y + ";"; return drawList; } @@ -1238,7 +1207,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "MoveTo " + x + "," + y + ";"; return drawList; } @@ -1247,7 +1215,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "MoveTo "+ startX+","+ startY +"; LineTo "+endX +","+endY +"; "; return drawList; } @@ -1256,7 +1223,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "LineTo " + endX + "," + endY + "; "; return drawList; } @@ -1265,7 +1231,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.None, "osDrawText"); - m_host.AddScriptLPS(1); drawList += "Text " + text + "; "; return drawList; } @@ -1274,7 +1239,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "Ellipse " + width + "," + height + "; "; return drawList; } @@ -1283,7 +1247,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "FillEllipse " + width + "," + height + "; "; return drawList; } @@ -1292,7 +1255,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "Rectangle " + width + "," + height + "; "; return drawList; } @@ -1301,7 +1263,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "FillRectangle " + width + "," + height + "; "; return drawList; } @@ -1310,8 +1271,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); - if (x.Length != y.Length || x.Length < 3) { return ""; @@ -1329,8 +1288,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); - if (x.Length != y.Length || x.Length < 3) { return ""; @@ -1348,7 +1305,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "FontSize "+ fontSize +"; "; return drawList; } @@ -1357,7 +1313,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "FontName "+ fontName +"; "; return drawList; } @@ -1366,7 +1321,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "PenSize " + penSize + "; "; return drawList; } @@ -1375,7 +1329,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "PenColor " + color + "; "; return drawList; } @@ -1386,7 +1339,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api CheckThreatLevel(); OSSLDeprecated("osSetPenColour", "osSetPenColor"); - m_host.AddScriptLPS(1); drawList += "PenColour " + colour + "; "; return drawList; } @@ -1395,7 +1347,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList += "PenCap " + direction + "," + type + "; "; return drawList; } @@ -1404,7 +1355,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); drawList +="Image " +width + "," + height+ ","+ imageUrl +"; " ; return drawList; } @@ -1412,7 +1362,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize) { CheckThreatLevel(); - m_host.AddScriptLPS(1); LSL_Vector vec = new LSL_Vector(0,0,0); IDynamicTextureManager textureManager = World.RequestModuleInterface(); @@ -1435,7 +1384,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // should be removed // CheckThreatLevel(ThreatLevel.High, "osSetStateEvents"); - m_host.AddScriptLPS(1); m_host.SetScriptEvents(m_item.ItemID, events); } @@ -1444,8 +1392,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.High, "osSetRegionWaterHeight"); - m_host.AddScriptLPS(1); - World.EventManager.TriggerRequestChangeWaterHeight((float)height); } @@ -1459,8 +1405,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.High, "osSetRegionSunSettings"); - m_host.AddScriptLPS(1); - while (sunHour > 24.0) sunHour -= 24.0; @@ -1484,8 +1428,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.High, "osSetEstateSunSettings"); - m_host.AddScriptLPS(1); - while (sunHour > 24.0) sunHour -= 24.0; @@ -1508,8 +1450,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(); - m_host.AddScriptLPS(1); - // Must adjust for the fact that Region Sun Settings are still LL offset double sunHour = World.RegionInfo.RegionSettings.SunPosition - 6; @@ -1538,8 +1478,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private double GetSunParam(string param) { - m_host.AddScriptLPS(1); - double value = 0.0; ISunModule module = World.RequestModuleInterface(); @@ -1566,8 +1504,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private void SetSunParam(string param, double value) { - m_host.AddScriptLPS(1); - ISunModule module = World.RequestModuleInterface(); if (module != null) { @@ -1578,7 +1514,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osWindActiveModelPluginName() { CheckThreatLevel(ThreatLevel.None, "osWindActiveModelPluginName"); - m_host.AddScriptLPS(1); IWindModule module = World.RequestModuleInterface(); if (module != null) @@ -1592,7 +1527,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetWindParam(string plugin, string param, LSL_Float value) { CheckThreatLevel(ThreatLevel.VeryLow, "osSetWindParam"); - m_host.AddScriptLPS(1); IWindModule module = World.RequestModuleInterface(); if (module != null) @@ -1608,7 +1542,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float osGetWindParam(string plugin, string param) { CheckThreatLevel(ThreatLevel.VeryLow, "osGetWindParam"); - m_host.AddScriptLPS(1); IWindModule module = World.RequestModuleInterface(); if (module != null) @@ -1623,7 +1556,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osParcelJoin(LSL_Vector pos1, LSL_Vector pos2) { CheckThreatLevel(ThreatLevel.High, "osParcelJoin"); - m_host.AddScriptLPS(1); int startx = (int)(pos1.x < pos2.x ? pos1.x : pos2.x); int starty = (int)(pos1.y < pos2.y ? pos1.y : pos2.y); @@ -1636,7 +1568,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osParcelSubdivide(LSL_Vector pos1, LSL_Vector pos2) { CheckThreatLevel(ThreatLevel.High, "osParcelSubdivide"); - m_host.AddScriptLPS(1); int startx = (int)(pos1.x < pos2.x ? pos1.x : pos2.x); int starty = (int)(pos1.y < pos2.y ? pos1.y : pos2.y); @@ -1663,8 +1594,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private void SetParcelDetails(LSL_Vector pos, LSL_List rules, string functionName) { - m_host.AddScriptLPS(1); - // Get a reference to the land data and make sure the owner of the script // can modify it @@ -1733,7 +1662,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // CheckThreatLevel(); - m_host.AddScriptLPS(1); if (index < 0) { index = src.Length + index; @@ -1751,8 +1679,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // CheckThreatLevel(ThreatLevel.VeryLow, "osSetParcelMediaURL"); - m_host.AddScriptLPS(1); - ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (land.LandData.OwnerID != m_host.OwnerID) @@ -1767,8 +1693,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // CheckThreatLevel(ThreatLevel.VeryLow, "osSetParcelSIPAddress"); - m_host.AddScriptLPS(1); - ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (land.LandData.OwnerID != m_host.OwnerID) @@ -1795,8 +1719,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // CheckThreatLevel(ThreatLevel.High, "osGetScriptEngineName"); - m_host.AddScriptLPS(1); - int scriptEngineNameIndex = 0; if (!String.IsNullOrEmpty(m_ScriptEngine.ScriptEngineName)) @@ -1822,7 +1744,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osCheckODE() { CheckThreatLevel(); - m_host.AddScriptLPS(1); LSL_Integer ret = 0; // false if (m_ScriptEngine.World.PhysicsScene != null) @@ -1846,6 +1767,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // about the physics engine, this function returns an empty string if // the user does not have permission to see it. This as opposed to // throwing an exception. + m_host.AddScriptLPS(1); string ret = String.Empty; if (String.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.High, "osGetPhysicsEngineType"))) @@ -1865,7 +1787,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetPhysicsEngineName() { CheckThreatLevel(); - m_host.AddScriptLPS(1); string ret = "NoEngine"; if (m_ScriptEngine.World.PhysicsScene != null) @@ -1886,7 +1807,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // kiddie) // CheckThreatLevel(ThreatLevel.High,"osGetSimulatorVersion"); - m_host.AddScriptLPS(1); return m_ScriptEngine.World.GetSimulatorVersion(); } @@ -1932,8 +1852,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.None, "osParseJSONNew"); - m_host.AddScriptLPS(1); - try { OSD decoded = OSDParser.DeserializeJson(JSON); @@ -1950,8 +1868,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.None, "osParseJSON"); - m_host.AddScriptLPS(1); - Object decoded = osParseJSONNew(JSON); if ( decoded is Hashtable ) { @@ -1982,7 +1898,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osMessageObject(LSL_Key objectUUID, string message) { CheckThreatLevel(ThreatLevel.Low, "osMessageObject"); - m_host.AddScriptLPS(1); UUID objUUID; if (!UUID.TryParse(objectUUID, out objUUID)) // prior to patching, a thrown exception regarding invalid GUID format would be shouted instead. @@ -2023,7 +1938,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // if this is restricted to objects rezzed by this host level can be reduced CheckThreatLevel(ThreatLevel.Low, "osDie"); - m_host.AddScriptLPS(1); UUID objUUID; if (!UUID.TryParse(objectUUID, out objUUID)) @@ -2073,7 +1987,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osMakeNotecard(string notecardName, LSL_Types.list contents) { CheckThreatLevel(ThreatLevel.High, "osMakeNotecard"); - m_host.AddScriptLPS(1); StringBuilder notecardData = new StringBuilder(); @@ -2259,7 +2172,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetNotecardLine(string name, int line) { CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecardLine"); - m_host.AddScriptLPS(1); UUID assetID = CacheNotecard(name); @@ -2287,7 +2199,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetNotecard(string name) { CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecard"); - m_host.AddScriptLPS(1); string text = LoadNotecard(name); @@ -2317,7 +2228,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public int osGetNumberOfNotecardLines(string name) { CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNumberOfNotecardLines"); - m_host.AddScriptLPS(1); UUID assetID = CacheNotecard(name); @@ -2333,7 +2243,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osAvatarName2Key(string firstname, string lastname) { CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key"); - m_host.AddScriptLPS(1); IUserManagement userManager = World.RequestModuleInterface(); if (userManager == null) @@ -2385,7 +2294,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osKey2Name(string id) { CheckThreatLevel(ThreatLevel.Low, "osKey2Name"); - m_host.AddScriptLPS(1); UUID key = new UUID(); @@ -2495,7 +2403,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetGridNick() { CheckThreatLevel(ThreatLevel.Moderate, "osGetGridNick"); - m_host.AddScriptLPS(1); string nick = String.Empty; IConfigSource config = m_ScriptEngine.ConfigSource; @@ -2512,7 +2419,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetGridName() { CheckThreatLevel(ThreatLevel.Moderate, "osGetGridName"); - m_host.AddScriptLPS(1); string name = String.Empty; IConfigSource config = m_ScriptEngine.ConfigSource; @@ -2529,7 +2435,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetGridLoginURI() { CheckThreatLevel(ThreatLevel.Moderate, "osGetGridLoginURI"); - m_host.AddScriptLPS(1); string loginURI = String.Empty; IConfigSource config = m_ScriptEngine.ConfigSource; @@ -2546,7 +2451,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetGridHomeURI() { CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI"); - m_host.AddScriptLPS(1); IConfigSource config = m_ScriptEngine.ConfigSource; string HomeURI = Util.GetConfigVarFromSections(config, "HomeURI", @@ -2568,7 +2472,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetGridGatekeeperURI() { CheckThreatLevel(ThreatLevel.Moderate, "osGetGridGatekeeperURI"); - m_host.AddScriptLPS(1); IConfigSource config = m_ScriptEngine.ConfigSource; string gatekeeperURI = Util.GetConfigVarFromSections(config, "GatekeeperURI", @@ -2587,7 +2490,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetGridCustom(string key) { CheckThreatLevel(ThreatLevel.Moderate, "osGetGridCustom"); - m_host.AddScriptLPS(1); string retval = String.Empty; IConfigSource config = m_ScriptEngine.ConfigSource; @@ -2604,7 +2506,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetAvatarHomeURI(string uuid) { CheckThreatLevel(ThreatLevel.Low, "osGetAvatarHomeURI"); - m_host.AddScriptLPS(1); IUserManagement userManager = m_ScriptEngine.World.RequestModuleInterface(); string returnValue = ""; @@ -2637,7 +2538,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osFormatString(string str, LSL_List strings) { CheckThreatLevel(ThreatLevel.VeryLow, "osFormatString"); - m_host.AddScriptLPS(1); return String.Format(str, strings.Data); } @@ -2645,7 +2545,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List osMatchString(string src, string pattern, int start) { CheckThreatLevel(ThreatLevel.VeryLow, "osMatchString"); - m_host.AddScriptLPS(1); LSL_List result = new LSL_List(); @@ -2687,7 +2586,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start) { CheckThreatLevel(ThreatLevel.VeryLow, "osReplaceString"); - m_host.AddScriptLPS(1); // Normalize indices (if negative). // After normlaization they may still be @@ -2712,7 +2610,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osLoadedCreationDate() { CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate"); - m_host.AddScriptLPS(1); return World.RegionInfo.RegionSettings.LoadedCreationDate; } @@ -2720,7 +2617,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osLoadedCreationTime() { CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationTime"); - m_host.AddScriptLPS(1); return World.RegionInfo.RegionSettings.LoadedCreationTime; } @@ -2728,7 +2624,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osLoadedCreationID() { CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationID"); - m_host.AddScriptLPS(1); return World.RegionInfo.RegionSettings.LoadedCreationID; } @@ -2749,7 +2644,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules) { CheckThreatLevel(ThreatLevel.High, "osGetLinkPrimitiveParams"); - m_host.AddScriptLPS(1); + InitLSL(); // One needs to cast m_LSL_Api because we're using functions not // on the ILSL_Api interface. @@ -2778,8 +2673,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.VeryLow, "osForceCreateLink"); - m_host.AddScriptLPS(1); - InitLSL(); ((LSL_Api)m_LSL_Api).CreateLink(target, parent); } @@ -2788,8 +2681,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.VeryLow, "osForceBreakLink"); - m_host.AddScriptLPS(1); - InitLSL(); ((LSL_Api)m_LSL_Api).BreakLink(linknum); } @@ -2798,8 +2689,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.VeryLow, "osForceBreakAllLinks"); - m_host.AddScriptLPS(1); - InitLSL(); ((LSL_Api)m_LSL_Api).BreakAllLinks(); } @@ -2807,7 +2696,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osIsNpc(LSL_Key npc) { CheckThreatLevel(); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -2824,7 +2712,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard) { CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); - m_host.AddScriptLPS(1); // have to get the npc module also here to set the default Not Owned INPCModule module = World.RequestModuleInterface(); @@ -2839,7 +2726,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) { CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); - m_host.AddScriptLPS(1); return NpcCreate( firstname, lastname, position, notecard, @@ -2982,7 +2868,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osNpcSaveAppearance(LSL_Key npc, string notecard) { CheckThreatLevel(ThreatLevel.High, "osNpcSaveAppearance"); - m_host.AddScriptLPS(1); INPCModule npcModule = World.RequestModuleInterface(); @@ -3004,7 +2889,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcLoadAppearance(LSL_Key npc, string notecard) { CheckThreatLevel(ThreatLevel.High, "osNpcLoadAppearance"); - m_host.AddScriptLPS(1); INPCModule npcModule = World.RequestModuleInterface(); @@ -3036,7 +2920,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osNpcGetOwner(LSL_Key npc) { CheckThreatLevel(ThreatLevel.None, "osNpcGetOwner"); - m_host.AddScriptLPS(1); INPCModule npcModule = World.RequestModuleInterface(); if (npcModule != null) @@ -3058,7 +2941,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector osNpcGetPos(LSL_Key npc) { CheckThreatLevel(ThreatLevel.High, "osNpcGetPos"); - m_host.AddScriptLPS(1); INPCModule npcModule = World.RequestModuleInterface(); if (npcModule != null) @@ -3082,7 +2964,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos) { CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3101,7 +2982,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcMoveToTarget(LSL_Key npc, LSL_Vector target, int options) { CheckThreatLevel(ThreatLevel.High, "osNpcMoveToTarget"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3126,7 +3006,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation osNpcGetRot(LSL_Key npc) { CheckThreatLevel(ThreatLevel.High, "osNpcGetRot"); - m_host.AddScriptLPS(1); INPCModule npcModule = World.RequestModuleInterface(); if (npcModule != null) @@ -3150,7 +3029,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation) { CheckThreatLevel(ThreatLevel.High, "osNpcSetRot"); - m_host.AddScriptLPS(1); INPCModule npcModule = World.RequestModuleInterface(); if (npcModule != null) @@ -3172,7 +3050,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcStopMoveToTarget(LSL_Key npc) { CheckThreatLevel(ThreatLevel.High, "osNpcStopMoveToTarget"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3189,7 +3066,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcSetProfileAbout(LSL_Key npc, string about) { CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileAbout"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3208,7 +3084,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcSetProfileImage(LSL_Key npc, string image) { CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileImage"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3242,7 +3117,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcSay(LSL_Key npc, int channel, string message) { CheckThreatLevel(ThreatLevel.High, "osNpcSay"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3259,7 +3133,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcShout(LSL_Key npc, int channel, string message) { CheckThreatLevel(ThreatLevel.High, "osNpcShout"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3276,7 +3149,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcSit(LSL_Key npc, LSL_Key target, int options) { CheckThreatLevel(ThreatLevel.High, "osNpcSit"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3293,7 +3165,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcStand(LSL_Key npc) { CheckThreatLevel(ThreatLevel.High, "osNpcStand"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3310,7 +3181,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcRemove(LSL_Key npc) { CheckThreatLevel(ThreatLevel.High, "osNpcRemove"); - m_host.AddScriptLPS(1); try { @@ -3331,7 +3201,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcPlayAnimation(LSL_Key npc, string animation) { CheckThreatLevel(ThreatLevel.High, "osNpcPlayAnimation"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3346,7 +3215,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcStopAnimation(LSL_Key npc, string animation) { CheckThreatLevel(ThreatLevel.High, "osNpcStopAnimation"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3361,7 +3229,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcWhisper(LSL_Key npc, int channel, string message) { CheckThreatLevel(ThreatLevel.High, "osNpcWhisper"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3378,7 +3245,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num) { CheckThreatLevel(ThreatLevel.High, "osNpcTouch"); - m_host.AddScriptLPS(1); INPCModule module = World.RequestModuleInterface(); int linkNum = link_num.value; @@ -3423,7 +3289,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osOwnerSaveAppearance(string notecard) { CheckThreatLevel(ThreatLevel.High, "osOwnerSaveAppearance"); - m_host.AddScriptLPS(1); return SaveAppearanceToNotecard(m_host.OwnerID, notecard); } @@ -3431,7 +3296,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osAgentSaveAppearance(LSL_Key avatarId, string notecard) { CheckThreatLevel(ThreatLevel.VeryHigh, "osAgentSaveAppearance"); - m_host.AddScriptLPS(1); return SaveAppearanceToNotecard(avatarId, notecard); } @@ -3484,7 +3348,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osGetGender(LSL_Key rawAvatarId) { CheckThreatLevel(ThreatLevel.None, "osGetGender"); - m_host.AddScriptLPS(1); UUID avatarId; if (!UUID.TryParse(rawAvatarId, out avatarId)) @@ -3527,9 +3390,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Key osGetMapTexture() { -// CheckThreatLevel(ThreatLevel.None, "osGetMapTexture"); CheckThreatLevel(); - m_host.AddScriptLPS(1); return m_ScriptEngine.World.RegionInfo.RegionSettings.TerrainImageID.ToString(); } @@ -3542,7 +3403,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osGetRegionMapTexture(string regionName) { CheckThreatLevel(ThreatLevel.High, "osGetRegionMapTexture"); - m_host.AddScriptLPS(1); Scene scene = m_ScriptEngine.World; UUID key = UUID.Zero; @@ -3573,7 +3433,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List osGetRegionStats() { CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats"); - m_host.AddScriptLPS(1); + LSL_List ret = new LSL_List(); float[] stats = World.StatsReporter.LastReportedSimStats; @@ -3587,7 +3447,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector osGetRegionSize() { CheckThreatLevel(); - m_host.AddScriptLPS(1); Scene scene = m_ScriptEngine.World; RegionInfo reg = World.RegionInfo; @@ -3599,7 +3458,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public int osGetSimulatorMemory() { CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory"); - m_host.AddScriptLPS(1); + long pws = System.Diagnostics.Process.GetCurrentProcess().WorkingSet64; if (pws > Int32.MaxValue) @@ -3613,7 +3472,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetSpeed(string UUID, LSL_Float SpeedModifier) { CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); - m_host.AddScriptLPS(1); + ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); if (avatar != null) @@ -3623,7 +3482,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osKickAvatar(string FirstName, string SurName, string alert) { CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); - m_host.AddScriptLPS(1); World.ForEachRootScenePresence(delegate(ScenePresence sp) { @@ -3642,7 +3500,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float osGetHealth(string avatar) { CheckThreatLevel(ThreatLevel.None, "osGetHealth"); - m_host.AddScriptLPS(1); LSL_Float health = new LSL_Float(-1); ScenePresence presence = World.GetScenePresence(new UUID(avatar)); @@ -3654,7 +3511,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osCauseDamage(string avatar, double damage) { CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); - m_host.AddScriptLPS(1); UUID avatarId = new UUID(avatar); Vector3 pos = m_host.GetWorldPosition(); @@ -3682,7 +3538,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osCauseHealing(string avatar, double healing) { CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); - m_host.AddScriptLPS(1); UUID avatarId = new UUID(avatar); ScenePresence presence = World.GetScenePresence(avatarId); @@ -3702,7 +3557,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetHealth(string avatar, double health) { CheckThreatLevel(ThreatLevel.High, "osSetHealth"); - m_host.AddScriptLPS(1); UUID avatarId = new UUID(avatar); ScenePresence presence = World.GetScenePresence(avatarId); @@ -3721,7 +3575,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetHealRate(string avatar, double healrate) { CheckThreatLevel(ThreatLevel.High, "osSetHealRate"); - m_host.AddScriptLPS(1); UUID avatarId = new UUID(avatar); ScenePresence presence = World.GetScenePresence(avatarId); @@ -3733,7 +3586,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float osGetHealRate(string avatar) { CheckThreatLevel(ThreatLevel.None, "osGetHealRate"); - m_host.AddScriptLPS(1); LSL_Float rate = new LSL_Float(0); ScenePresence presence = World.GetScenePresence(new UUID(avatar)); @@ -3745,18 +3597,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules) { CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams"); - m_host.AddScriptLPS(1); - InitLSL(); + InitLSL(); return m_LSL_Api.GetPrimitiveParamsEx(prim, rules); } public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules) { CheckThreatLevel(ThreatLevel.High, "osSetPrimitiveParams"); - m_host.AddScriptLPS(1); - InitLSL(); + InitLSL(); m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams"); } @@ -3765,8 +3615,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb) { - CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams"); - osSetProjectionParams(UUID.Zero.ToString(), projection, texture, fov, focus, amb); } @@ -3776,7 +3624,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb) { CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams"); - m_host.AddScriptLPS(1); SceneObjectPart obj = null; if (prim == UUID.Zero.ToString()) @@ -3807,7 +3654,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List osGetAvatarList() { CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); - m_host.AddScriptLPS(1); LSL_List result = new LSL_List(); World.ForEachRootScenePresence(delegate (ScenePresence avatar) @@ -3826,7 +3672,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List osGetNPCList() { CheckThreatLevel(ThreatLevel.None, "osGetNPCList"); - m_host.AddScriptLPS(1); LSL_List result = new LSL_List(); World.ForEachRootScenePresence(delegate (ScenePresence avatar) @@ -3851,7 +3696,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osUnixTimeToTimestamp(long time) { CheckThreatLevel(ThreatLevel.VeryLow, "osUnixTimeToTimestamp"); - m_host.AddScriptLPS(1); long baseTicks = 621355968000000000; long tickResolution = 10000000; @@ -3869,7 +3713,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osGetInventoryDesc(string item) { CheckThreatLevel(); - m_host.AddScriptLPS(1); lock (m_host.TaskInventory) { @@ -3893,7 +3736,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osInviteToGroup(LSL_Key agentId) { CheckThreatLevel(ThreatLevel.VeryLow, "osInviteToGroup"); - m_host.AddScriptLPS(1); UUID agent = new UUID(agentId); @@ -3928,7 +3770,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osEjectFromGroup(LSL_Key agentId) { CheckThreatLevel(ThreatLevel.VeryLow, "osEjectFromGroup"); - m_host.AddScriptLPS(1); UUID agent = new UUID(agentId); @@ -3964,7 +3805,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.High, "osSetTerrainTexture"); - m_host.AddScriptLPS(1); //Check to make sure that the script's owner is the estate manager/master //World.Permissions.GenericEstatePermission( if (World.Permissions.IsGod(m_host.OwnerID)) @@ -3994,7 +3834,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.High, "osSetTerrainTextureHeight"); - m_host.AddScriptLPS(1); //Check to make sure that the script's owner is the estate manager/master //World.Permissions.GenericEstatePermission( if (World.Permissions.IsGod(m_host.OwnerID)) @@ -4015,8 +3854,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.High, "osForceAttachToAvatar"); - m_host.AddScriptLPS(1); - InitLSL(); ((LSL_Api)m_LSL_Api).AttachToAvatar(attachmentPoint); } @@ -4025,8 +3862,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.High, "osForceAttachToAvatarFromInventory"); - m_host.AddScriptLPS(1); - ForceAttachToAvatarFromInventory(m_host.OwnerID, itemName, attachmentPoint); } @@ -4034,8 +3869,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.VeryHigh, "osForceAttachToOtherAvatarFromInventory"); - m_host.AddScriptLPS(1); - UUID avatarId; if (!UUID.TryParse(rawAvatarId, out avatarId)) @@ -4095,8 +3928,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.High, "osForceDetachFromAvatar"); - m_host.AddScriptLPS(1); - InitLSL(); ((LSL_Api)m_LSL_Api).DetachFromAvatar(); } @@ -4105,8 +3936,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.Moderate, "osGetNumberOfAttachments"); - m_host.AddScriptLPS(1); - UUID targetUUID; ScenePresence target; LSL_List resp = new LSL_List(); @@ -4140,7 +3969,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osMessageAttachments(LSL_Key avatar, string message, LSL_List attachmentPoints, int options) { CheckThreatLevel(ThreatLevel.Moderate, "osMessageAttachments"); - m_host.AddScriptLPS(1); UUID targetUUID; if(!UUID.TryParse(avatar.ToString(), out targetUUID)) @@ -4250,7 +4078,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osIsUUID(string thing) { CheckThreatLevel(); - m_host.AddScriptLPS(1); UUID test; return UUID.TryParse(thing, out test) ? 1 : 0; @@ -4265,7 +4092,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float osMin(double a, double b) { CheckThreatLevel(); - m_host.AddScriptLPS(1); return Math.Min(a, b); } @@ -4279,7 +4105,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float osMax(double a, double b) { CheckThreatLevel(); - m_host.AddScriptLPS(1); return Math.Max(a, b); } @@ -4287,7 +4112,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osGetRezzingObject() { CheckThreatLevel(ThreatLevel.None, "osGetRezzingObject"); - m_host.AddScriptLPS(1); + UUID rezID = m_host.ParentGroup.RezzerID; if(rezID == UUID.Zero || m_host.ParentGroup.Scene.GetScenePresence(rezID) != null) return new LSL_Key(UUID.Zero.ToString()); @@ -4312,7 +4137,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// boolean indicating whether an error was shouted. protected bool ShoutErrorOnLackingOwnerPerms(int perms, string errorPrefix) { - m_host.AddScriptLPS(1); bool fail = false; if (m_item.PermsGranter != m_host.OwnerID) { @@ -4363,7 +4187,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osDropAttachment() { CheckThreatLevel(ThreatLevel.Moderate, "osDropAttachment"); - m_host.AddScriptLPS(1); DropAttachment(true); } @@ -4371,7 +4194,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osForceDropAttachment() { CheckThreatLevel(ThreatLevel.High, "osForceDropAttachment"); - m_host.AddScriptLPS(1); DropAttachment(false); } @@ -4379,7 +4201,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osDropAttachmentAt(LSL_Vector pos, LSL_Rotation rot) { CheckThreatLevel(ThreatLevel.Moderate, "osDropAttachmentAt"); - m_host.AddScriptLPS(1); DropAttachmentAt(true, pos, rot); } @@ -4387,7 +4208,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osForceDropAttachmentAt(LSL_Vector pos, LSL_Rotation rot) { CheckThreatLevel(ThreatLevel.High, "osForceDropAttachmentAt"); - m_host.AddScriptLPS(1); DropAttachmentAt(false, pos, rot); } @@ -4395,7 +4215,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield) { CheckThreatLevel(ThreatLevel.Low, "osListenRegex"); - m_host.AddScriptLPS(1); + UUID keyID; UUID.TryParse(ID, out keyID); @@ -4443,7 +4263,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osRegexIsMatch(string input, string pattern) { CheckThreatLevel(ThreatLevel.Low, "osRegexIsMatch"); - m_host.AddScriptLPS(1); + try { return Regex.IsMatch(input, pattern) ? 1 : 0; @@ -4458,7 +4278,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osRequestURL(LSL_List options) { CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL"); - m_host.AddScriptLPS(1); Hashtable opts = new Hashtable(); for (int i = 0 ; i < options.Length ; i++) @@ -4476,7 +4295,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osRequestSecureURL(LSL_List options) { CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL"); - m_host.AddScriptLPS(1); Hashtable opts = new Hashtable(); for (int i = 0 ; i < options.Length ; i++) @@ -4494,7 +4312,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osCollisionSound(string impact_sound, double impact_volume) { CheckThreatLevel(); - m_host.AddScriptLPS(1); if(impact_sound == "") { @@ -4527,7 +4344,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osVolumeDetect(int detect) { CheckThreatLevel(); - m_host.AddScriptLPS(1); if (m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted || m_host.ParentGroup.IsAttachment) return; @@ -4550,7 +4366,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List osGetInertiaData() { CheckThreatLevel(); - m_host.AddScriptLPS(1); LSL_List result = new LSL_List(); float TotalMass; @@ -4598,7 +4413,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetInertia(LSL_Float mass, LSL_Vector centerOfMass, LSL_Vector principalInertiaScaled, LSL_Rotation lslrot) { CheckThreatLevel(); - m_host.AddScriptLPS(1); SceneObjectGroup sog = m_host.ParentGroup; if(sog== null || sog.IsDeleted) @@ -4637,7 +4451,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetInertiaAsBox(LSL_Float mass, LSL_Vector boxSize, LSL_Vector centerOfMass, LSL_Rotation lslrot) { CheckThreatLevel(); - m_host.AddScriptLPS(1); SceneObjectGroup sog = m_host.ParentGroup; if(sog== null || sog.IsDeleted) @@ -4679,7 +4492,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, LSL_Vector centerOfMass) { CheckThreatLevel(); - m_host.AddScriptLPS(1); SceneObjectGroup sog = m_host.ParentGroup; if(sog== null || sog.IsDeleted) @@ -4719,7 +4531,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, LSL_Vector centerOfMass, LSL_Rotation lslrot) { CheckThreatLevel(); - m_host.AddScriptLPS(1); SceneObjectGroup sog = m_host.ParentGroup; if(sog== null || sog.IsDeleted) @@ -4758,7 +4569,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osClearInertia() { CheckThreatLevel(); - m_host.AddScriptLPS(1); SceneObjectGroup sog = m_host.ParentGroup; if(sog== null || sog.IsDeleted) @@ -4817,7 +4627,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osTeleportObject(LSL_Key objectUUID, LSL_Vector targetPos, LSL_Rotation rotation, LSL_Integer flags) { CheckThreatLevel(ThreatLevel.Severe, "osTeleportObject"); - m_host.AddScriptLPS(1); UUID objUUID; if (!UUID.TryParse(objectUUID, out objUUID)) @@ -4846,7 +4655,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osGetLinkNumber(LSL_String name) { CheckThreatLevel(); - m_host.AddScriptLPS(1); SceneObjectGroup sog = m_host.ParentGroup; if(sog== null || sog.IsDeleted) diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index 83d9756..5f9eeb8 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -218,10 +218,10 @@ Allow_osTeleportAgent = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osTeleportObject = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER -; funtions ThreatLevel Severe with aditional internal restrictions +; funtions ThreatLevel Severe with additional internal restrictions Allow_osGetAgentIP = true ; always restricted to Administrators (true or false to disable) -; avaiable funtions out of Threat level control (for reference only) +; available funtions out of Threat level control (for reference only) ; Allow_osClearInertia = true ; Allow_osCheckODE = true ; Allow_osCollisionSound = true -- cgit v1.1 From edc7575f9ec3cd61aeec4ae9c3d65dc1235eb6ec Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 1 Jul 2017 01:43:58 +0100 Subject: a few changes to ubOde avatar collisions --- .../Region/PhysicsModules/ubOde/ODECharacter.cs | 65 ++++++++++++--------- OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | 12 +--- bin/config-include/osslEnable.ini | 1 - bin/lib32/ode.dll | Bin 541184 -> 541696 bytes bin/lib64/ode.dll | Bin 635392 -> 635392 bytes 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs index de7e879..b0f3f52 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs @@ -103,7 +103,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde public float walkDivisor = 1.3f; public float runDivisor = 0.8f; - private bool flying = false; + private bool m_flying = false; private bool m_iscolliding = false; private bool m_iscollidingGround = false; private bool m_iscollidingObj = false; @@ -298,10 +298,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde public override bool Flying { - get { return flying; } + get { return m_flying; } set { - flying = value; + m_flying = value; // m_log.DebugFormat("[PHYSICS]: Set OdeCharacter Flying to {0}", flying); } } @@ -900,10 +900,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde } public bool Collide(IntPtr me, IntPtr other, bool reverse, ref d.ContactGeom contact, - ref d.ContactGeom altContact , ref bool useAltcontact, ref bool feetcollision) + ref bool feetcollision) { feetcollision = false; - useAltcontact = false; if (me == capsule) { @@ -943,12 +942,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde } return true; } -/* - d.AABB aabb; - d.GeomGetAABB(other,out aabb); - float othertop = aabb.MaxZ - _position.Z; -*/ -// if (offset.Z > 0 || othertop > -feetOff || contact.normal.Z > 0.35f) + if (offset.Z > 0 || contact.normal.Z > 0.35f) { if (offset.Z <= 0) @@ -965,27 +959,40 @@ namespace OpenSim.Region.PhysicsModule.ubOde return true; } - altContact = contact; - useAltcontact = true; + if(m_flying) + return true; offset.Z -= 0.2f; offset.Normalize(); - if (contact.depth > 0.1f) - contact.depth = 0.1f; + float tdp = contact.depth; + float t = contact.normal.Z * contact.normal.Z; + t = Math.Abs(t); + if(t > 1e-6) + { + tdp /= t; + tdp *= offset.Z * offset.Z; + } + else + tdp *= 10; + + if (tdp > 0.25f) + tdp = 0.25f; + + contact.depth = tdp; if (reverse) { - altContact.normal.X = offset.X; - altContact.normal.Y = offset.Y; - altContact.normal.Z = offset.Z; + contact.normal.X = offset.X; + contact.normal.Y = offset.Y; + contact.normal.Z = offset.Z; } else { - altContact.normal.X = -offset.X; - altContact.normal.Y = -offset.Y; - altContact.normal.Z = -offset.Z; + contact.normal.X = -offset.X; + contact.normal.Y = -offset.Y; + contact.normal.Z = -offset.Z; } feetcollision = true; @@ -1098,7 +1105,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde float ftmp; - if (flying) + if (m_flying) { ftmp = timeStep; posch.X += vel.X * ftmp; @@ -1122,7 +1129,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde vec.Z = depth * PID_P * 50; - if (!flying) + if (!m_flying) { vec.Z += -vel.Z * PID_D; if(n.Z < 0.4f) @@ -1259,7 +1266,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde // movement relative to surface if moving on it // dont disturbe vertical movement, ie jumps - if (m_iscolliding && !flying && ctz.Z == 0 && m_collideNormal.Z > 0.2f && m_collideNormal.Z < 0.94f) + if (m_iscolliding && !m_flying && ctz.Z == 0 && m_collideNormal.Z > 0.2f && m_collideNormal.Z < 0.94f) { float p = ctz.X * m_collideNormal.X + ctz.Y * m_collideNormal.Y; ctz.X *= (float)Math.Sqrt(1 - m_collideNormal.X * m_collideNormal.X); @@ -1276,7 +1283,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde { // if velocity is zero, use position control; otherwise, velocity control - if (tviszero && m_iscolliding && !flying) + if (tviszero && m_iscolliding && !m_flying) { // keep track of where we stopped. No more slippin' & slidin' if (!_zeroFlag) @@ -1313,7 +1320,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (m_iscolliding) { - if (!flying) + if (!m_flying) { // we are on a surface if (ctz.Z > 0f) @@ -1361,7 +1368,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde } else // ie not colliding { - if (flying || hoverPIDActive) //(!m_iscolliding && flying) + if (m_flying || hoverPIDActive) //(!m_iscolliding && flying) { // we're in mid air suspended vec.X += (ctz.X - vel.X) * (PID_D); @@ -1397,13 +1404,13 @@ namespace OpenSim.Region.PhysicsModule.ubOde breakfactor = m_mass; vec.X -= breakfactor * vel.X; vec.Y -= breakfactor * vel.Y; - if (flying) + if (m_flying) vec.Z -= 0.5f * breakfactor * vel.Z; else vec.Z -= .16f* m_mass * vel.Z; } - if (flying || hoverPIDActive) + if (m_flying || hoverPIDActive) { vec.Z -= m_parent_scene.gravityz * m_mass; diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs index 86d41ea..0837bfb 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs @@ -951,8 +951,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde SharedTmpcontact.surface.mu = mu; SharedTmpcontact.surface.bounce = bounce; - d.ContactGeom altContact = new d.ContactGeom(); - bool useAltcontact = false; bool noskip = true; if(dop1ava || dop2ava) @@ -961,11 +959,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde while (true) { noskip = true; - useAltcontact = false; if (dop1ava) { - if ((((OdeCharacter)p1).Collide(g1, g2, false, ref curContact, ref altContact , ref useAltcontact, ref FeetCollision))) + if ((((OdeCharacter)p1).Collide(g1, g2, false, ref curContact, ref FeetCollision))) { if (p2.PhysicsActorType == (int)ActorTypes.Agent) { @@ -980,7 +977,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde } else if (dop2ava) { - if ((((OdeCharacter)p2).Collide(g2, g1, true, ref curContact, ref altContact , ref useAltcontact, ref FeetCollision))) + if ((((OdeCharacter)p2).Collide(g2, g1, true, ref curContact, ref FeetCollision))) { if (p1.PhysicsActorType == (int)ActorTypes.Agent) { @@ -996,10 +993,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (noskip) { - if(useAltcontact) - Joint = CreateContacJoint(ref altContact,smoothMesh); - else - Joint = CreateContacJoint(ref curContact,smoothMesh); + Joint = CreateContacJoint(ref curContact,smoothMesh); if (Joint == IntPtr.Zero) break; diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index 5f9eeb8..5987952 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -61,7 +61,6 @@ ; osslParcelOG = "PARCEL_GROUP_MEMBER,PARCEL_OWNER," ; NPC macros - ; There are a block of macros to creating and controlling NPCs. ; These can be mis-used so limit use to those you can trust. osslNPC = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER diff --git a/bin/lib32/ode.dll b/bin/lib32/ode.dll index 5636903..f7677d2 100755 Binary files a/bin/lib32/ode.dll and b/bin/lib32/ode.dll differ diff --git a/bin/lib64/ode.dll b/bin/lib64/ode.dll index fdc0ddd..87ece28 100755 Binary files a/bin/lib64/ode.dll and b/bin/lib64/ode.dll differ -- cgit v1.1 From f3a920237b479149537f39d203c824571123d032 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 2 Jul 2017 01:34:06 +0100 Subject: oops i forgot the avatar knees bending on ramps... so go back.. --- .../Region/PhysicsModules/ubOde/ODECharacter.cs | 42 ++++++++++++---------- OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | 15 +++++--- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs index b0f3f52..6016530 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs @@ -899,10 +899,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde y = tx * sin + y * cos; } - public bool Collide(IntPtr me, IntPtr other, bool reverse, ref d.ContactGeom contact, - ref bool feetcollision) - { + public bool Collide(IntPtr me, IntPtr other, bool reverse, ref d.ContactGeom contact, + ref d.ContactGeom altContact , ref bool useAltcontact, ref bool feetcollision) + { feetcollision = false; + useAltcontact = false; if (me == capsule) { @@ -962,6 +963,18 @@ namespace OpenSim.Region.PhysicsModule.ubOde if(m_flying) return true; + feetcollision = true; + if (h < boneOff) + { + m_collideNormal.X = contact.normal.X; + m_collideNormal.Y = contact.normal.Y; + m_collideNormal.Z = contact.normal.Z; + IsColliding = true; + } + + altContact = contact; + useAltcontact = true; + offset.Z -= 0.2f; offset.Normalize(); @@ -980,28 +993,19 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (tdp > 0.25f) tdp = 0.25f; - contact.depth = tdp; + altContact.depth = tdp; if (reverse) { - contact.normal.X = offset.X; - contact.normal.Y = offset.Y; - contact.normal.Z = offset.Z; + altContact.normal.X = offset.X; + altContact.normal.Y = offset.Y; + altContact.normal.Z = offset.Z; } else { - contact.normal.X = -offset.X; - contact.normal.Y = -offset.Y; - contact.normal.Z = -offset.Z; - } - - feetcollision = true; - if (h < boneOff) - { - m_collideNormal.X = contact.normal.X; - m_collideNormal.Y = contact.normal.Y; - m_collideNormal.Z = contact.normal.Z; - IsColliding = true; + altContact.normal.X = -offset.X; + altContact.normal.Y = -offset.Y; + altContact.normal.Z = -offset.Z; } return true; } diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs index 0837bfb..844d02b 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs @@ -951,7 +951,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde SharedTmpcontact.surface.mu = mu; SharedTmpcontact.surface.bounce = bounce; - bool noskip = true; + d.ContactGeom altContact = new d.ContactGeom(); + bool useAltcontact; + bool noskip; if(dop1ava || dop2ava) smoothMesh = false; @@ -959,10 +961,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde while (true) { noskip = true; + useAltcontact = false; if (dop1ava) { - if ((((OdeCharacter)p1).Collide(g1, g2, false, ref curContact, ref FeetCollision))) + if ((((OdeCharacter)p1).Collide(g1, g2, false, ref curContact, ref altContact , ref useAltcontact, ref FeetCollision))) { if (p2.PhysicsActorType == (int)ActorTypes.Agent) { @@ -977,7 +980,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde } else if (dop2ava) { - if ((((OdeCharacter)p2).Collide(g2, g1, true, ref curContact, ref FeetCollision))) + if ((((OdeCharacter)p2).Collide(g2, g1, true, ref curContact, ref altContact , ref useAltcontact, ref FeetCollision))) { if (p1.PhysicsActorType == (int)ActorTypes.Agent) { @@ -993,8 +996,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (noskip) { - Joint = CreateContacJoint(ref curContact,smoothMesh); - + if(useAltcontact) + Joint = CreateContacJoint(ref altContact,smoothMesh); + else + Joint = CreateContacJoint(ref curContact,smoothMesh); if (Joint == IntPtr.Zero) break; -- cgit v1.1 From c5a4c299cbe02d9ade7434c3db10d51302a1b303 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 2 Jul 2017 05:59:49 +0100 Subject: update ode.dll ( windows) --- bin/lib32/ode.dll | Bin 541696 -> 542208 bytes bin/lib64/ode.dll | Bin 635392 -> 635392 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/bin/lib32/ode.dll b/bin/lib32/ode.dll index f7677d2..bd9ab62 100755 Binary files a/bin/lib32/ode.dll and b/bin/lib32/ode.dll differ diff --git a/bin/lib64/ode.dll b/bin/lib64/ode.dll index 87ece28..c268dee 100755 Binary files a/bin/lib64/ode.dll and b/bin/lib64/ode.dll differ -- cgit v1.1 From 39751891f49afb07d57fadd3002655b498698e31 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 3 Jul 2017 22:47:27 +0100 Subject: ubOde: dont do avatar step climb on small true spheres. lets play simple football --- .../Region/PhysicsModules/ubOde/ODECharacter.cs | 10 ++++++++-- bin/lib32/ode.dll | Bin 542208 -> 541696 bytes bin/lib64/ode.dll | Bin 635392 -> 635392 bytes 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs index 6016530..3c4675c 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs @@ -944,6 +944,12 @@ namespace OpenSim.Region.PhysicsModule.ubOde return true; } + if (gtype == d.GeomClassID.SphereClass) + { + if(d.GeomSphereGetRadius(other) < 0.5) + return true; + } + if (offset.Z > 0 || contact.normal.Z > 0.35f) { if (offset.Z <= 0) @@ -980,12 +986,12 @@ namespace OpenSim.Region.PhysicsModule.ubOde offset.Normalize(); float tdp = contact.depth; - float t = contact.normal.Z * contact.normal.Z; + float t = offset.X; t = Math.Abs(t); if(t > 1e-6) { tdp /= t; - tdp *= offset.Z * offset.Z; + tdp *= contact.normal.X; } else tdp *= 10; diff --git a/bin/lib32/ode.dll b/bin/lib32/ode.dll index bd9ab62..9657355 100755 Binary files a/bin/lib32/ode.dll and b/bin/lib32/ode.dll differ diff --git a/bin/lib64/ode.dll b/bin/lib64/ode.dll index c268dee..f52c29c 100755 Binary files a/bin/lib64/ode.dll and b/bin/lib64/ode.dll differ -- cgit v1.1 From 1dc56eb15f25748cc7d4df21a5dc2992332aa504 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 3 Jul 2017 23:38:55 +0100 Subject: ubOde: but only do that if sphere is physical.. --- OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs index 3c4675c..0e46471 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs @@ -944,7 +944,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde return true; } - if (gtype == d.GeomClassID.SphereClass) + if (gtype == d.GeomClassID.SphereClass && d.GeomGetBody(other) != IntPtr.Zero) { if(d.GeomSphereGetRadius(other) < 0.5) return true; -- cgit v1.1 From dfef16297b51fb81550745aeea05bd10cb1fc766 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 7 Jul 2017 01:49:34 +0100 Subject: ubOde don't use old ode body sleep option, a few changes on sleep control, update ode.dll (windows, others needed) (keep older versions.. bc.. well bugs happen) --- OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs | 1 + OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs | 36 +++++++++++++++++---- OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | 2 +- bin/lib32/ode.dll | Bin 541696 -> 541696 bytes bin/lib64/ode.dll | Bin 635392 -> 635904 bytes 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs index 2e6a7db..ce10065 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs @@ -345,6 +345,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (rootPrim.Body != IntPtr.Zero && !d.BodyIsEnabled(rootPrim.Body) && !rootPrim.m_isSelected && !rootPrim.m_disabled) d.BodyEnable(rootPrim.Body); + break; case Vehicle.LINEAR_FRICTION_TIMESCALE: if (pValue < m_timestep) pValue = m_timestep; diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs index 4bed0d2..005caee 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs @@ -1847,8 +1847,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde ApplyCollisionCatFlags(); _zeroFlag = true; + d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); d.BodyEnable(Body); - } } resetCollisionAccounting(); @@ -2900,6 +2900,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (Body != IntPtr.Zero && !m_disabled) { _zeroFlag = true; + d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); d.BodyEnable(Body); } } @@ -2933,6 +2934,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (!d.BodyIsEnabled(Body)) { _zeroFlag = true; + d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); d.BodyEnable(Body); } } @@ -2947,6 +2949,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (Body != IntPtr.Zero && !d.BodyIsEnabled(Body)) { _zeroFlag = true; + d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); d.BodyEnable(Body); } } @@ -3012,6 +3015,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (Body != IntPtr.Zero && !d.BodyIsEnabled(Body)) { _zeroFlag = true; + d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); d.BodyEnable(Body); } } @@ -3070,6 +3074,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (Body != IntPtr.Zero && !d.BodyIsEnabled(Body)) { _zeroFlag = true; + d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); d.BodyEnable(Body); } } @@ -3312,8 +3317,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (m_disabled) enableBodySoft(); else if (!d.BodyIsEnabled(Body)) + { + d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); d.BodyEnable(Body); - + } } m_torque = newtorque; } @@ -3323,7 +3330,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde { m_force = force; if (!m_isSelected && !m_outbounds && Body != IntPtr.Zero && !d.BodyIsEnabled(Body)) + { + d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); d.BodyEnable(Body); + } } private void changeAddForce(Vector3 theforce) @@ -3339,7 +3349,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (m_disabled) enableBodySoft(); else if (!d.BodyIsEnabled(Body)) + { + d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); d.BodyEnable(Body); + } } } m_collisionscore = 0; @@ -3359,7 +3372,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (m_disabled) enableBodySoft(); else if (!d.BodyIsEnabled(Body)) + { + d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); d.BodyEnable(Body); + } } } m_collisionscore = 0; @@ -3382,7 +3398,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (m_disabled) enableBodySoft(); else if (!d.BodyIsEnabled(Body)) + { + d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); d.BodyEnable(Body); + } d.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z); } //resetCollisionAccounting(); @@ -3406,7 +3425,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (m_disabled) enableBodySoft(); else if (!d.BodyIsEnabled(Body)) + { + d.BodySetAutoDisableSteps(Body, m_body_autodisable_frames); d.BodyEnable(Body); + } d.BodySetAngularVel(Body, newAngVel.X, newAngVel.Y, newAngVel.Z); } //resetCollisionAccounting(); @@ -3571,12 +3593,13 @@ namespace OpenSim.Region.PhysicsModule.ubOde d.BodySetAngularVel(Body,0f,0f,0f); d.BodySetLinearVel(Body,0f,0f,0f); _zeroFlag = true; + d.BodySetAutoDisableSteps(Body, 1); d.BodyEnable(Body); m_bodydisablecontrol = -4; } if(m_bodydisablecontrol < 0) - m_bodydisablecontrol ++; + m_bodydisablecontrol++; d.Vector3 lpos = d.GeomGetPosition(prim_geom); // root position that is seem by rest of simulator @@ -3741,13 +3764,12 @@ namespace OpenSim.Region.PhysicsModule.ubOde public void UpdatePositionAndVelocity(int frame) { - if (_parent == null && !m_disabled && !m_building && !m_outbounds && Body != IntPtr.Zero) + if (_parent == null && !m_isSelected && !m_disabled && !m_building && !m_outbounds && Body != IntPtr.Zero) { - bool bodyenabled = d.BodyIsEnabled(Body); - if(m_bodydisablecontrol < 0) return; + bool bodyenabled = d.BodyIsEnabled(Body); if (bodyenabled || !_zeroFlag) { bool lastZeroFlag = _zeroFlag; @@ -3891,7 +3913,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde // disable interpolators _velocity = Vector3.Zero; m_acceleration = Vector3.Zero; - m_rotationalVelocity = Vector3.Zero; + m_rotationalVelocity = Vector3.Zero; } else { diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs index 844d02b..5758e0a 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs @@ -481,7 +481,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde contactsPerCollision = physicsconfig.GetInt("contacts_per_collision", contactsPerCollision); geomDefaultDensity = physicsconfig.GetFloat("geometry_default_density", geomDefaultDensity); - bodyFramesAutoDisable = physicsconfig.GetInt("body_frames_auto_disable", bodyFramesAutoDisable); +// bodyFramesAutoDisable = physicsconfig.GetInt("body_frames_auto_disable", bodyFramesAutoDisable); physics_logging = physicsconfig.GetBoolean("physics_logging", false); physics_logging_interval = physicsconfig.GetInt("physics_logging_interval", 0); diff --git a/bin/lib32/ode.dll b/bin/lib32/ode.dll index 9657355..cb4d1a0 100755 Binary files a/bin/lib32/ode.dll and b/bin/lib32/ode.dll differ diff --git a/bin/lib64/ode.dll b/bin/lib64/ode.dll index f52c29c..050ee46 100755 Binary files a/bin/lib64/ode.dll and b/bin/lib64/ode.dll differ -- cgit v1.1 From ead95e85c55e00abaac729109dfed47f10bc8c91 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 7 Jul 2017 04:57:57 +0100 Subject: bug fix: dynamic testures set to ALL_SIDES, preserve other face data already present --- .../CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index c0b7ab5..090cb7d 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs @@ -428,12 +428,16 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture // FIXME: Need to return the appropriate ID if only a single face is replaced. oldID = tmptex.DefaultTexture.TextureID; + // not using parts number of faces because that fails on old meshs if (Face == ALL_SIDES) { oldID = tmptex.DefaultTexture.TextureID; tmptex.DefaultTexture.TextureID = textureID; for(int i = 0; i < tmptex.FaceTextures.Length; i++) - tmptex.FaceTextures[i] = null; + { + if(tmptex.FaceTextures[i] != null) + tmptex.FaceTextures[i].TextureID = textureID; + } } else { -- cgit v1.1 From cc5d6f6b7bcf23b698d1d6a98b60d04bc5ecb036 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 9 Jul 2017 00:14:30 +0100 Subject: throttle collision sounds on a SOG. --- OpenSim/Region/Framework/Scenes/CollisionSounds.cs | 24 ++++++++++++----- .../Region/Framework/Scenes/SceneObjectGroup.cs | 30 +++++++++++++++++++++- 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs index e76fef4..f87043e 100644 --- a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs +++ b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs @@ -116,16 +116,20 @@ namespace OpenSim.Region.Framework.Scenes public static void PartCollisionSound(SceneObjectPart part, List collidersinfolist) { + if (part.CollisionSoundType < 0) + return; + if (collidersinfolist.Count == 0 || part == null) return; if (part.VolumeDetectActive || (part.Flags & PrimFlags.Physics) == 0) return; - if (part.ParentGroup == null) + SceneObjectGroup sog = part.ParentGroup; + if (sog == null || sog.IsDeleted || sog.inTransit) return; - if (part.CollisionSoundType < 0) + if(sog.CollisionSoundThrootled(part.CollisionSoundType)) return; float volume = part.CollisionSoundVolume; @@ -189,15 +193,23 @@ namespace OpenSim.Region.Framework.Scenes continue; } - SceneObjectPart otherPart = part.ParentGroup.Scene.GetSceneObjectPart(id); + SceneObjectPart otherPart = sog.Scene.GetSceneObjectPart(id); if (otherPart != null) { - if (otherPart.CollisionSoundType < 0 || otherPart.VolumeDetectActive) + SceneObjectGroup othersog = otherPart.ParentGroup; + if(othersog == null || othersog.IsDeleted || othersog.inTransit) + continue; + + int otherType = otherPart.CollisionSoundType; + if (otherType < 0 || otherPart.VolumeDetectActive) continue; if (!HaveSound) { - if (otherPart.CollisionSoundType == 1) + if(othersog.CollisionSoundThrootled(otherType)) + continue; + + if (otherType == 1) { soundID = otherPart.CollisionSound; volume = otherPart.CollisionSoundVolume; @@ -206,7 +218,7 @@ namespace OpenSim.Region.Framework.Scenes } else { - if (otherPart.CollisionSoundType == 2) + if (otherType == 2) { volume = otherPart.CollisionSoundVolume; if (volume == 0.0f) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index fdfe8ae..bf915e0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1259,6 +1259,8 @@ namespace OpenSim.Region.Framework.Scenes set { m_LoopSoundSlavePrims = value; } } + private double m_lastCollisionSoundMS; + /// /// The UUID for the region this object is in. /// @@ -1336,7 +1338,7 @@ namespace OpenSim.Region.Framework.Scenes /// public SceneObjectGroup() { - + m_lastCollisionSoundMS = Util.GetTimeStampMS() + 1000.0; } /// @@ -5528,7 +5530,33 @@ namespace OpenSim.Region.Framework.Scenes } } + public bool CollisionSoundThrootled(int collisionSoundType) + { + double time = m_lastCollisionSoundMS; +// m_lastCollisionSoundMS = Util.GetTimeStampMS(); +// time = m_lastCollisionSoundMS - time; + double now = Util.GetTimeStampMS(); + time = now - time; + switch (collisionSoundType) + { + case 0: // default sounds + case 2: // default sounds with volume set by script + if(time < 300.0) + return true; + break; + case 1: // selected sound + if(time < 200.0) + return true; + break; + default: + break; + } + m_lastCollisionSoundMS = now; + return false; + } + #endregion } + } -- cgit v1.1 From 63e3fc21efa1089bf90ff2aa703128e8955d9aed Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 10 Jul 2017 13:48:28 +0100 Subject: fix the name of a funtion on last commit --- OpenSim/Region/Framework/Scenes/CollisionSounds.cs | 4 ++-- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs index f87043e..63aafcd 100644 --- a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs +++ b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs @@ -129,7 +129,7 @@ namespace OpenSim.Region.Framework.Scenes if (sog == null || sog.IsDeleted || sog.inTransit) return; - if(sog.CollisionSoundThrootled(part.CollisionSoundType)) + if(sog.CollisionSoundThrottled(part.CollisionSoundType)) return; float volume = part.CollisionSoundVolume; @@ -206,7 +206,7 @@ namespace OpenSim.Region.Framework.Scenes if (!HaveSound) { - if(othersog.CollisionSoundThrootled(otherType)) + if(othersog.CollisionSoundThrottled(otherType)) continue; if (otherType == 1) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index bf915e0..c4b768b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -5530,7 +5530,7 @@ namespace OpenSim.Region.Framework.Scenes } } - public bool CollisionSoundThrootled(int collisionSoundType) + public bool CollisionSoundThrottled(int collisionSoundType) { double time = m_lastCollisionSoundMS; // m_lastCollisionSoundMS = Util.GetTimeStampMS(); -- cgit v1.1 From 9dbcb4e5f687f576ec23794cdf85b41130fea0b0 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 10 Jul 2017 19:31:35 +0100 Subject: on entities updates throttles vectors needed to be compared as vectors, not just their norms --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 133 ++++++++++++++++++--- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 15 +-- 2 files changed, 116 insertions(+), 32 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index f9699b1..576a013 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -369,9 +369,9 @@ namespace OpenSim.Region.Framework.Scenes protected Vector3 m_lastPosition; protected Quaternion m_lastRotation; protected Vector3 m_lastVelocity; - protected Vector3 m_lastAcceleration; + protected Vector3 m_lastAcceleration; // acceleration is a derived var with high noise protected Vector3 m_lastAngularVelocity; - protected int m_lastUpdateSentTime; + protected double m_lastUpdateSentTime; protected float m_buoyancy = 0.0f; protected Vector3 m_force; protected Vector3 m_torque; @@ -2875,7 +2875,7 @@ namespace OpenSim.Region.Framework.Scenes public void PhysicsCollision(EventArgs e) { - if (ParentGroup.Scene == null || ParentGroup.IsDeleted) + if (ParentGroup.Scene == null || ParentGroup.IsDeleted || ParentGroup.inTransit) return; // this a thread from physics ( heartbeat ) @@ -3331,7 +3331,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter m_lastVelocity = Velocity; m_lastAcceleration = Acceleration; m_lastAngularVelocity = AngularVelocity; - m_lastUpdateSentTime = Environment.TickCount; + m_lastUpdateSentTime = Util.GetTimeStampMS(); ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) { @@ -3350,7 +3350,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter m_lastVelocity = Velocity; m_lastAcceleration = Acceleration; m_lastAngularVelocity = AngularVelocity; - m_lastUpdateSentTime = Environment.TickCount; + m_lastUpdateSentTime = Util.GetTimeStampMS(); if (ParentGroup.IsAttachment) { @@ -3396,31 +3396,122 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter ParentGroup.Scene.StatsReporter.AddObjectUpdates(1); } + /// /// Tell all the prims which have had updates scheduled /// public void SendScheduledUpdates() { const float ROTATION_TOLERANCE = 0.01f; - const float VELOCITY_TOLERANCE = 0.001f; + const float VELOCITY_TOLERANCE = 0.1f; // terse update vel has low resolution const float POSITION_TOLERANCE = 0.05f; // I don't like this, but I suppose it's necessary - const int TIME_MS_TOLERANCE = 200; //llSetPos has a 200ms delay. This should NOT be 3 seconds. - + const double TIME_MS_TOLERANCE = 200f; //llSetPos has a 200ms delay. This should NOT be 3 seconds. + switch (UpdateFlag) { + // this is wrong we need to get back to this case UpdateRequired.TERSE: { ClearUpdateSchedule(); - // Throw away duplicate or insignificant updates - if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || - !Acceleration.Equals(m_lastAcceleration) || - !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || - Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) || - !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) || - !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || - Environment.TickCount - m_lastUpdateSentTime > TIME_MS_TOLERANCE) + + bool needupdate = true; + double now = Util.GetTimeStampMS(); + Vector3 curvel = Velocity; + Vector3 curacc = Acceleration; + Vector3 angvel = AngularVelocity; + + while(true) // just to avoid ugly goto { - SendTerseUpdateToAllClientsInternal(); + double elapsed = now - m_lastUpdateSentTime; + + // minimal rate also for the other things on terse updates + if (elapsed > TIME_MS_TOLERANCE) + break; + + if( Math.Abs(curacc.X - m_lastAcceleration.X) > VELOCITY_TOLERANCE || + Math.Abs(curacc.Y - m_lastAcceleration.Y) > VELOCITY_TOLERANCE || + Math.Abs(curacc.Z - m_lastAcceleration.Z) > VELOCITY_TOLERANCE) + break; + + // velocity change is also direction not only norm) + if( Math.Abs(curvel.X - m_lastVelocity.X) > VELOCITY_TOLERANCE || + Math.Abs(curvel.Y - m_lastVelocity.Y) > VELOCITY_TOLERANCE || + Math.Abs(curvel.Z - m_lastVelocity.Z) > VELOCITY_TOLERANCE) + break; + + float vx = Math.Abs(curvel.X); + if(vx > 128.0) + break; + float vy = Math.Abs(curvel.Y); + if(vy > 128.0) + break; + float vz = Math.Abs(curvel.Z); + if(vz > 128.0) + break; + + if ( + vx < VELOCITY_TOLERANCE && + vy < VELOCITY_TOLERANCE && + vz < VELOCITY_TOLERANCE + ) + { + if(!OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) + break; + + if (vx < 1e-4 && + vy < 1e-4 && + vz < 1e-4 && + ( + Math.Abs(m_lastVelocity.X) > 1e-4 || + Math.Abs(m_lastVelocity.Y) > 1e-4 || + Math.Abs(m_lastVelocity.Z) > 1e-4 + )) + break; + } + + if( Math.Abs(angvel.X - m_lastAngularVelocity.X) > VELOCITY_TOLERANCE || + Math.Abs(angvel.Y - m_lastAngularVelocity.Y) > VELOCITY_TOLERANCE || + Math.Abs(angvel.Z - m_lastAngularVelocity.Z) > VELOCITY_TOLERANCE) + break; + + // viewer interpolators have a limit of 128m/s + float ax = Math.Abs(angvel.X); + if(ax > 64.0) + break; + float ay = Math.Abs(angvel.Y); + if(ay > 64.0) + break; + float az = Math.Abs(angvel.Z); + if(az > 64.0) + break; + + if ( + ax < VELOCITY_TOLERANCE && + ay < VELOCITY_TOLERANCE && + az < VELOCITY_TOLERANCE && + !RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) + ) + break; + + needupdate = false; + break; + } + + if(needupdate) + { + + // Update the "last" values + m_lastPosition = OffsetPosition; + m_lastRotation = RotationOffset; + m_lastVelocity = curvel; + m_lastAcceleration = curacc; + m_lastAngularVelocity = angvel; + m_lastUpdateSentTime = now; + + ParentGroup.Scene.ForEachClient(delegate(IClientAPI client) + { + SendTerseUpdateToClient(client); + }); } break; } @@ -3442,13 +3533,15 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter if (ParentGroup == null || ParentGroup.Scene == null) return; + ClearUpdateSchedule(); + // Update the "last" values m_lastPosition = OffsetPosition; m_lastRotation = RotationOffset; m_lastVelocity = Velocity; m_lastAcceleration = Acceleration; m_lastAngularVelocity = AngularVelocity; - m_lastUpdateSentTime = Environment.TickCount; + m_lastUpdateSentTime = Util.GetTimeStampMS(); ParentGroup.Scene.ForEachClient(delegate(IClientAPI client) { @@ -3461,13 +3554,15 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter if (ParentGroup == null || ParentGroup.Scene == null) return; + ClearUpdateSchedule(); + // Update the "last" values m_lastPosition = OffsetPosition; m_lastRotation = RotationOffset; m_lastVelocity = Velocity; m_lastAcceleration = Acceleration; m_lastAngularVelocity = AngularVelocity; - m_lastUpdateSentTime = Environment.TickCount; + m_lastUpdateSentTime = Util.GetTimeStampMS(); if (ParentGroup.IsAttachment) { diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7e3adb9..c1b62af 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3789,17 +3789,6 @@ namespace OpenSim.Region.Framework.Scenes // Send terse position update if not sitting and position, velocity, or rotation // has changed significantly from last sent update - if (!IsSatOnObject && ( - !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) - || !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) - || !m_pos.ApproxEquals(m_lastPosition, POSITION_LARGETOLERANCE) - // if velocity is zero and it wasn't zero last time, send the update - || (Velocity == Vector3.Zero && m_lastVelocity != Vector3.Zero) - // if position has moved just a little and velocity is very low, send the update - || (!m_pos.ApproxEquals(m_lastPosition, POSITION_SMALLTOLERANCE) && Velocity.LengthSquared() < LOWVELOCITYSQ ) - ) ) - { -/* if (!IsSatOnObject) { // this does need to be more complex later @@ -3813,6 +3802,7 @@ namespace OpenSim.Region.Framework.Scenes Math.Abs(m_bodyRot.Y - m_lastRotation.Y) > ROTATION_TOLERANCE || Math.Abs(m_bodyRot.Z - m_lastRotation.Z) > ROTATION_TOLERANCE || + (vel == Vector3.Zero && m_lastVelocity != Vector3.Zero) || Math.Abs(dpos.X) > POSITION_LARGETOLERANCE || Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE || Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE || @@ -3823,9 +3813,8 @@ namespace OpenSim.Region.Framework.Scenes && vel.LengthSquared() < LOWVELOCITYSQ )) { -*/ SendTerseUpdateToAllClients(); -// } + } } CheckForSignificantMovement(); } -- cgit v1.1 From f8cdccc16729212e374cc001ab4f0be8e5960259 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 10 Jul 2017 21:12:34 +0100 Subject: a few more changes on entities updates --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 30 ++++++++------- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 43 +++++++--------------- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 36 +++++++++++------- 3 files changed, 52 insertions(+), 57 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 53c185b..954f21f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -6256,20 +6256,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// private bool CheckAgentCameraUpdateSignificance(AgentUpdatePacket.AgentDataBlock x) { - float vdelta = Vector3.Distance(x.CameraAtAxis, m_thisAgentUpdateArgs.CameraAtAxis); - if((vdelta > VDELTA)) - return true; - - vdelta = Vector3.Distance(x.CameraCenter, m_thisAgentUpdateArgs.CameraCenter); - if((vdelta > VDELTA)) - return true; - - vdelta = Vector3.Distance(x.CameraLeftAxis, m_thisAgentUpdateArgs.CameraLeftAxis); - if((vdelta > VDELTA)) - return true; - - vdelta = Vector3.Distance(x.CameraUpAxis, m_thisAgentUpdateArgs.CameraUpAxis); - if((vdelta > VDELTA)) + if(Math.Abs(x.CameraCenter.X - m_thisAgentUpdateArgs.CameraCenter.X) > VDELTA || + Math.Abs(x.CameraCenter.Y - m_thisAgentUpdateArgs.CameraCenter.Y) > VDELTA || + Math.Abs(x.CameraCenter.Z - m_thisAgentUpdateArgs.CameraCenter.Z) > VDELTA || + + Math.Abs(x.CameraAtAxis.X - m_thisAgentUpdateArgs.CameraAtAxis.X) > VDELTA || + Math.Abs(x.CameraAtAxis.Y - m_thisAgentUpdateArgs.CameraAtAxis.Y) > VDELTA || +// Math.Abs(x.CameraAtAxis.Z - m_thisAgentUpdateArgs.CameraAtAxis.Z) > VDELTA || + + Math.Abs(x.CameraLeftAxis.X - m_thisAgentUpdateArgs.CameraLeftAxis.X) > VDELTA || + Math.Abs(x.CameraLeftAxis.Y - m_thisAgentUpdateArgs.CameraLeftAxis.Y) > VDELTA || +// Math.Abs(x.CameraLeftAxis.Z - m_thisAgentUpdateArgs.CameraLeftAxis.Z) > VDELTA || + + Math.Abs(x.CameraUpAxis.X - m_thisAgentUpdateArgs.CameraUpAxis.X) > VDELTA || + Math.Abs(x.CameraUpAxis.Y - m_thisAgentUpdateArgs.CameraUpAxis.Y) > VDELTA +// Math.Abs(x.CameraLeftAxis.Z - m_thisAgentUpdateArgs.CameraLeftAxis.Z) > VDELTA || + ) return true; return false; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 576a013..2e16663 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -3237,7 +3237,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// Schedule a terse update for this prim. Terse updates only send position, - /// rotation, velocity and rotational velocity information. + /// rotation, velocity and rotational velocity information. WRONG!!!! /// public void ScheduleTerseUpdate() { @@ -3296,21 +3296,6 @@ namespace OpenSim.Region.Framework.Scenes sp.SendAttachmentUpdate(this, UpdateRequired.FULL); } } - -/* this does nothing -SendFullUpdateToClient(remoteClient, Position) ignores position parameter - if (IsRoot) - { - if (ParentGroup.IsAttachment) - { - SendFullUpdateToClient(remoteClient, AttachedPos); - } - else - { - SendFullUpdateToClient(remoteClient, AbsolutePosition); - } - } -*/ else { SendFullUpdateToClient(remoteClient); @@ -3396,24 +3381,26 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter ParentGroup.Scene.StatsReporter.AddObjectUpdates(1); } + + private const float ROTATION_TOLERANCE = 0.01f; + private const float VELOCITY_TOLERANCE = 0.1f; // terse update vel has low resolution + private const float POSITION_TOLERANCE = 0.05f; // I don't like this, but I suppose it's necessary + private const double TIME_MS_TOLERANCE = 200f; //llSetPos has a 200ms delay. This should NOT be 3 seconds. /// /// Tell all the prims which have had updates scheduled /// public void SendScheduledUpdates() - { - const float ROTATION_TOLERANCE = 0.01f; - const float VELOCITY_TOLERANCE = 0.1f; // terse update vel has low resolution - const float POSITION_TOLERANCE = 0.05f; // I don't like this, but I suppose it's necessary - const double TIME_MS_TOLERANCE = 200f; //llSetPos has a 200ms delay. This should NOT be 3 seconds. - + { switch (UpdateFlag) { - // this is wrong we need to get back to this - case UpdateRequired.TERSE: - { + case UpdateRequired.NONE: ClearUpdateSchedule(); + break; + + case UpdateRequired.TERSE: + ClearUpdateSchedule(); bool needupdate = true; double now = Util.GetTimeStampMS(); Vector3 curvel = Velocity; @@ -3423,8 +3410,6 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter while(true) // just to avoid ugly goto { double elapsed = now - m_lastUpdateSentTime; - - // minimal rate also for the other things on terse updates if (elapsed > TIME_MS_TOLERANCE) break; @@ -3514,13 +3499,11 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter }); } break; - } + case UpdateRequired.FULL: - { ClearUpdateSchedule(); SendFullUpdateToAllClientsInternal(); break; - } } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c1b62af..ba3aaae 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -279,8 +279,11 @@ namespace OpenSim.Region.Framework.Scenes private bool MouseDown = false; public Vector3 lastKnownAllowedPosition; public bool sentMessageAboutRestrictedParcelFlyingDown; + public Vector4 CollisionPlane = Vector4.UnitW; + public Vector4 m_lastCollisionPlane = Vector4.UnitW; + private byte m_lastState; private Vector3 m_lastPosition; private Quaternion m_lastRotation; private Vector3 m_lastVelocity; @@ -2818,16 +2821,13 @@ namespace OpenSim.Region.Framework.Scenes CameraAtAxis = agentData.CameraAtAxis; CameraLeftAxis = agentData.CameraLeftAxis; CameraUpAxis = agentData.CameraUpAxis; - Quaternion camRot = Util.Axes2Rot(CameraAtAxis, CameraLeftAxis, CameraUpAxis); - CameraRotation = camRot; - - // The Agent's Draw distance setting - // When we get to the point of re-computing neighbors everytime this - // changes, then start using the agent's drawdistance rather than the - // region's draw distance. - DrawDistance = agentData.Far; + CameraAtAxis.Normalize(); + CameraLeftAxis.Normalize(); + CameraUpAxis.Normalize(); + Quaternion camRot = Util.Axes2Rot(CameraAtAxis, CameraLeftAxis, CameraUpAxis); + CameraRotation = camRot; // Check if Client has camera in 'follow cam' or 'build' mode. // Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); @@ -3794,15 +3794,17 @@ namespace OpenSim.Region.Framework.Scenes // this does need to be more complex later Vector3 vel = Velocity; Vector3 dpos = m_pos - m_lastPosition; - if( Math.Abs(vel.X - m_lastVelocity.X) > VELOCITY_TOLERANCE || + if( State != m_lastState || + Math.Abs(vel.X - m_lastVelocity.X) > VELOCITY_TOLERANCE || Math.Abs(vel.Y - m_lastVelocity.Y) > VELOCITY_TOLERANCE || Math.Abs(vel.Z - m_lastVelocity.Z) > VELOCITY_TOLERANCE || Math.Abs(m_bodyRot.X - m_lastRotation.X) > ROTATION_TOLERANCE || Math.Abs(m_bodyRot.Y - m_lastRotation.Y) > ROTATION_TOLERANCE || Math.Abs(m_bodyRot.Z - m_lastRotation.Z) > ROTATION_TOLERANCE || - + (vel == Vector3.Zero && m_lastVelocity != Vector3.Zero) || + Math.Abs(dpos.X) > POSITION_LARGETOLERANCE || Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE || Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE || @@ -3811,7 +3813,12 @@ namespace OpenSim.Region.Framework.Scenes Math.Abs(dpos.Y) > POSITION_SMALLTOLERANCE || Math.Abs(dpos.Z) > POSITION_SMALLTOLERANCE) && vel.LengthSquared() < LOWVELOCITYSQ - )) + ) || + + Math.Abs(CollisionPlane.X - m_lastCollisionPlane.X) > POSITION_SMALLTOLERANCE || + Math.Abs(CollisionPlane.Y - m_lastCollisionPlane.Y) > POSITION_SMALLTOLERANCE || + Math.Abs(CollisionPlane.W - m_lastCollisionPlane.W) > POSITION_SMALLTOLERANCE + ) { SendTerseUpdateToAllClients(); } @@ -3910,11 +3917,14 @@ namespace OpenSim.Region.Framework.Scenes /// public void SendTerseUpdateToAllClients() { - m_scene.ForEachScenePresence(SendTerseUpdateToAgent); - // Update the "last" values + m_lastState = State; m_lastPosition = m_pos; m_lastRotation = m_bodyRot; m_lastVelocity = Velocity; + m_lastCollisionPlane = CollisionPlane; + + m_scene.ForEachScenePresence(SendTerseUpdateToAgent); + // Update the "last" values TriggerScenePresenceUpdated(); } -- cgit v1.1 From 40b16f1705bd6361d7fd0cd2bc458ae9ea381bf1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 10 Jul 2017 22:01:38 +0100 Subject: SimpleAngularDistance update prioritization scheme ameks no sense without ordered dequeue of the updates --- OpenSim/Framework/PriorityQueue.cs | 21 +++++++++++++++ .../Region/ClientStack/Linden/UDP/LLClientView.cs | 30 +++++++++++++++++++--- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/OpenSim/Framework/PriorityQueue.cs b/OpenSim/Framework/PriorityQueue.cs index 5b9185e..22ffcdc 100644 --- a/OpenSim/Framework/PriorityQueue.cs +++ b/OpenSim/Framework/PriorityQueue.cs @@ -216,6 +216,27 @@ namespace OpenSim.Framework return false; } + public bool TryOrderedDequeue(out EntityUpdate value, out Int32 timeinqueue) + { + // If there is anything in imediate queues, return it first no + // matter what else. Breaks fairness. But very useful. + for (int iq = 0; iq < NumberOfQueues; iq++) + { + if (m_heaps[iq].Count > 0) + { + MinHeapItem item = m_heaps[iq].RemoveMin(); + m_lookupTable.Remove(item.Value.Entity.LocalId); + timeinqueue = Util.EnvironmentTickCountSubtract(item.EntryTime); + value = item.Value; + return true; + } + } + + timeinqueue = 0; + value = default(EntityUpdate); + return false; + } + /// /// Reapply the prioritization function to each of the updates currently /// stored in the priority queues. diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 954f21f..861b79e 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -4137,6 +4137,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP Vector3 mypos = Vector3.Zero; ScenePresence mysp = (ScenePresence)SceneAgent; + bool orderedDequeue = m_scene.UpdatePrioritizationScheme == UpdatePrioritizationSchemes.SimpleAngularDistance; // we should have a presence if(mysp == null) return; @@ -4151,8 +4152,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP while (maxUpdatesBytes > 0) { lock (m_entityUpdates.SyncRoot) - if (!m_entityUpdates.TryDequeue(out update, out timeinqueue)) - break; + { + if(orderedDequeue) + { + if (!m_entityUpdates.TryOrderedDequeue(out update, out timeinqueue)) + break; + } + else + { + if (!m_entityUpdates.TryDequeue(out update, out timeinqueue)) + break; + } + } PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags; @@ -4850,6 +4861,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // OpenSim.Framework.Lazy> propertyUpdates = // new OpenSim.Framework.Lazy>(); + bool orderedDequeue = m_scene.UpdatePrioritizationScheme == UpdatePrioritizationSchemes.SimpleAngularDistance; EntityUpdate iupdate; Int32 timeinqueue; // this is just debugging code & can be dropped later @@ -4857,8 +4869,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP while (maxUpdateBytes > 0) { lock (m_entityProps.SyncRoot) - if (!m_entityProps.TryDequeue(out iupdate, out timeinqueue)) - break; + { + if(orderedDequeue) + { + if (!m_entityProps.TryOrderedDequeue(out iupdate, out timeinqueue)) + break; + } + else + { + if (!m_entityProps.TryDequeue(out iupdate, out timeinqueue)) + break; + } + } ObjectPropertyUpdate update = (ObjectPropertyUpdate)iupdate; if (update.SendFamilyProps) -- cgit v1.1 From 72bce8c4b41406e8f19e263be634f2434bc54765 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 11 Jul 2017 02:33:48 +0100 Subject: do lsl object rez checks on script thread before wasting time possible creating a new poll thread --- .../Shared/Api/Implementation/LSL_Api.cs | 40 ++++++++++++---------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index af88e4f..f4b7aa3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3534,32 +3534,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot) { m_host.AddScriptLPS(1); + if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) + return; - Util.FireAndForget(x => - { - if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) - return; + float dist = (float)llVecDist(llGetPos(), pos); - float dist = (float)llVecDist(llGetPos(), pos); + if (dist > m_ScriptDistanceFactor * 10.0f) + return; - if (dist > m_ScriptDistanceFactor * 10.0f) - return; + TaskInventoryItem item = m_host.Inventory.GetInventoryItem(inventory); - TaskInventoryItem item = m_host.Inventory.GetInventoryItem(inventory); + if (item == null) + { + Error("llRez(AtRoot/Object)", "Can't find object '" + inventory + "'"); + return; + } - if (item == null) - { - Error("llRez(AtRoot/Object)", "Can't find object '" + inventory + "'"); - return; - } + if (item.InvType != (int)InventoryType.Object) + { + Error("llRez(AtRoot/Object)", "Can't create requested object; object is missing from database"); + return; + } - if (item.InvType != (int)InventoryType.Object) - { - Error("llRez(AtRoot/Object)", "Can't create requested object; object is missing from database"); - return; - } + Util.FireAndForget(x => + { - List new_groups = World.RezObject(m_host, item, pos, rot, vel, param, atRoot); + Quaternion wrot = rot; + wrot.Normalize(); + List new_groups = World.RezObject(m_host, item, pos, wrot, vel, param, atRoot); // If either of these are null, then there was an unknown error. if (new_groups == null) -- cgit v1.1 From f5324833eeff9d99caf437fc47b920e616699de1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 11 Jul 2017 02:47:37 +0100 Subject: remove wrong comment on lsl object rez. we can't add delays on async process --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index f4b7aa3..c13e8b2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3598,9 +3598,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) - } - + } }, null, "LSL_Api.doObjectRez"); //ScriptSleep((int)((groupmass * velmag) / 10)); -- cgit v1.1 From c8a9b0321f1e3ea724d8230ea1106b8bfd682fc3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 12 Jul 2017 01:44:34 +0100 Subject: osSetParcelDetails: place hard restrictions on change owner,claimdate (both estate owner or manager) and group (same plus parcel owner that also needes to be a member of the new group); add PARCEL_DETAILS_SEE_AVATARS, PARCEL_DETAILS_ANY_AVATAR_SOUNDS and PARCEL_DETAILS_GROUP_SOUNDS --- .../Shared/Api/Implementation/OSSL_Api.cs | 115 ++++++++++++++++++--- .../Shared/Api/Runtime/LSL_Constants.cs | 4 +- OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 3 +- 3 files changed, 103 insertions(+), 19 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 22d247d..4bf8729 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1606,13 +1606,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, startLandObject, GroupPowers.LandOptions, false)) { - OSSLShoutError("You do not have permission to modify the parcel"); + OSSLShoutError("script owner does not have permission to modify the parcel"); return; } // Create a new land data object we can modify LandData newLand = startLandObject.LandData.Copy(); UUID uuid; + EstateSettings es = World.RegionInfo.EstateSettings; + + bool changed = false; // Process the rules, not sure what the impact would be of changing owner or group for (int idx = 0; idx < rules.Length;) @@ -1622,35 +1625,115 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api switch (code) { case ScriptBaseClass.PARCEL_DETAILS_NAME: - newLand.Name = arg; + if(newLand.Name != arg) + { + newLand.Name = arg; + changed = true; + } break; case ScriptBaseClass.PARCEL_DETAILS_DESC: - newLand.Description = arg; + if(newLand.Description != arg) + { + newLand.Description = arg; + changed = true; + } break; case ScriptBaseClass.PARCEL_DETAILS_OWNER: - CheckThreatLevel(ThreatLevel.VeryHigh, functionName); - if (UUID.TryParse(arg, out uuid)) - newLand.OwnerID = uuid; + if(es != null && !es.IsEstateManagerOrOwner(m_host.OwnerID)) + { + OSSLError("script owner does not have permission to modify the parcel owner"); + } + else + { + if (UUID.TryParse(arg, out uuid)) + { + if(newLand.OwnerID != uuid) + { + changed = true; + newLand.OwnerID = uuid; + newLand.GroupID = UUID.Zero; + } + } + } break; case ScriptBaseClass.PARCEL_DETAILS_GROUP: - CheckThreatLevel(ThreatLevel.VeryHigh, functionName); - if (UUID.TryParse(arg, out uuid)) - newLand.GroupID = uuid; + if(m_host.OwnerID == newLand.OwnerID || es == null || es.IsEstateManagerOrOwner(m_host.OwnerID)) + { + if (UUID.TryParse(arg, out uuid)) + { + if(newLand.GroupID != uuid) + { + IGroupsModule groupsModule = m_ScriptEngine.World.RequestModuleInterface(); + GroupMembershipData member = null; + if (groupsModule != null) + member = groupsModule.GetMembershipData(uuid, newLand.OwnerID); + if (member == null) + OSSLError(string.Format("land owner is not member of the new group for parcel")); + else + { + changed = true; + newLand.GroupID = uuid; + } + } + } + } + else + { + OSSLError("script owner does not have permission to modify the parcel group"); + } break; case ScriptBaseClass.PARCEL_DETAILS_CLAIMDATE: - CheckThreatLevel(ThreatLevel.VeryHigh, functionName); - newLand.ClaimDate = Convert.ToInt32(arg); - if (newLand.ClaimDate == 0) - newLand.ClaimDate = Util.UnixTimeSinceEpoch(); + if(es != null && !es.IsEstateManagerOrOwner(m_host.OwnerID)) + { + OSSLError("script owner does not have permission to modify the parcel CLAIM DATE"); + } + else + { + int date = Convert.ToInt32(arg); + if (date == 0) + date = Util.UnixTimeSinceEpoch(); + if(newLand.ClaimDate != date) + { + changed = true; + newLand.ClaimDate = date; + } + } break; - } - } - World.LandChannel.UpdateLandObject(newLand.LocalID,newLand); + case ScriptBaseClass.PARCEL_DETAILS_SEE_AVATARS: + bool newavs = (Convert.ToInt32(arg) != 0); + if(newLand.SeeAVs != newavs) + { + changed = true; + newLand.SeeAVs = newavs; + } + break; + + case ScriptBaseClass.PARCEL_DETAILS_ANY_AVATAR_SOUNDS: + bool newavsounds = (Convert.ToInt32(arg) != 0); + if(newLand.AnyAVSounds != newavsounds) + { + changed = true; + newLand.AnyAVSounds = newavsounds; + } + break; + + case ScriptBaseClass.PARCEL_DETAILS_GROUP_SOUNDS: + bool newgrpsounds = (Convert.ToInt32(arg) != 0); + if(newLand.GroupAVSounds != newgrpsounds) + { + changed = true; + newLand.GroupAVSounds = newgrpsounds; + } + break; + } + } + if(changed) + World.LandChannel.UpdateLandObject(newLand.LocalID,newLand); } public double osList2Double(LSL_Types.list src, int index) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index a277f6c..e4c1ca0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -697,7 +697,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PARCEL_DETAILS_GROUP = 3; public const int PARCEL_DETAILS_AREA = 4; public const int PARCEL_DETAILS_ID = 5; - public const int PARCEL_DETAILS_SEE_AVATARS = 6; // not implemented + public const int PARCEL_DETAILS_SEE_AVATARS = 6; + public const int PARCEL_DETAILS_ANY_AVATAR_SOUNDS = 7; + public const int PARCEL_DETAILS_GROUP_SOUNDS = 8; //osSetParcelDetails public const int PARCEL_DETAILS_CLAIMDATE = 10; diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 4d7a698..8780e49 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs @@ -39,7 +39,6 @@ using OMV_Quaternion = OpenMetaverse.Quaternion; namespace OpenSim.Region.ScriptEngine.Shared { - [Serializable] public partial class LSL_Types { // Types are kept is separate .dll to avoid having to add whatever .dll it is in it to script AppDomain @@ -526,7 +525,7 @@ namespace OpenSim.Region.ScriptEngine.Shared } [Serializable] - public class list + public class list: MarshalByRefObject { private object[] m_data; -- cgit v1.1 From 3847f861e39a6792b7b6063289dabb9911580d71 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 12 Jul 2017 01:52:01 +0100 Subject: osSetParcelDetails: allow parcel group to be cleared also --- .../Shared/Api/Implementation/OSSL_Api.cs | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 4bf8729..4aac9a0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1666,17 +1666,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if(newLand.GroupID != uuid) { - IGroupsModule groupsModule = m_ScriptEngine.World.RequestModuleInterface(); - GroupMembershipData member = null; - if (groupsModule != null) - member = groupsModule.GetMembershipData(uuid, newLand.OwnerID); - if (member == null) - OSSLError(string.Format("land owner is not member of the new group for parcel")); - else + if(uuid == UUID.Zero) { changed = true; newLand.GroupID = uuid; } + else + { + IGroupsModule groupsModule = m_ScriptEngine.World.RequestModuleInterface(); + GroupMembershipData member = null; + if (groupsModule != null) + member = groupsModule.GetMembershipData(uuid, newLand.OwnerID); + if (member == null) + OSSLError(string.Format("land owner is not member of the new group for parcel")); + else + { + changed = true; + newLand.GroupID = uuid; + } + } } } } -- cgit v1.1 From a069ed09a82bfe07ef84a78202f502ed3b312134 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 12 Jul 2017 03:47:34 +0100 Subject: osSetParcelDetails: make seeAVs send updates. This is a temporary patch, this function does need to call a framework land function that deos issue proper updates about all fields to all cleints. ( sounds will not stop/start also for now) --- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 4aac9a0..f274cd3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1616,6 +1616,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api EstateSettings es = World.RegionInfo.EstateSettings; bool changed = false; + bool changedSeeAvs = false; // Process the rules, not sure what the impact would be of changing owner or group for (int idx = 0; idx < rules.Length;) @@ -1717,6 +1718,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if(newLand.SeeAVs != newavs) { changed = true; + changedSeeAvs = true; newLand.SeeAVs = newavs; } break; @@ -1741,7 +1743,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } if(changed) + { World.LandChannel.UpdateLandObject(newLand.LocalID,newLand); + + if(changedSeeAvs) + { + UUID parcelID= newLand.GlobalID; + World.ForEachScenePresence(delegate (ScenePresence avatar) + { + if (avatar != null && !avatar.IsDeleted && avatar.currentParcelUUID == parcelID ) + avatar.currentParcelUUID = parcelID; // force parcel flags review + }); + } + } + } public double osList2Double(LSL_Types.list src, int index) -- cgit v1.1 From aff9c345dddfa290222ceaf42b6c452a590a2276 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 12 Jul 2017 07:27:21 +0100 Subject: osSetParcelDetails: add more land update code --- OpenSim/Framework/ILandChannel.cs | 1 + .../Region/CoreModules/World/Land/LandChannel.cs | 8 +++++++ .../Shared/Api/Implementation/OSSL_Api.cs | 26 +++++++++++++++++----- OpenSim/Tests/Common/Mock/TestLandChannel.cs | 1 + 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/OpenSim/Framework/ILandChannel.cs b/OpenSim/Framework/ILandChannel.cs index 12a8228..8667837 100644 --- a/OpenSim/Framework/ILandChannel.cs +++ b/OpenSim/Framework/ILandChannel.cs @@ -88,6 +88,7 @@ namespace OpenSim.Region.Framework.Interfaces bool IsForcefulBansAllowed(); void UpdateLandObject(int localID, LandData data); + void SendParcelsOverlay(IClientAPI client); void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient); void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index b59e2af..5ff063b 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs @@ -176,6 +176,14 @@ namespace OpenSim.Region.CoreModules.World.Land } } + public void SendParcelsOverlay(IClientAPI client) + { + if (m_landManagementModule != null) + { + m_landManagementModule.SendParcelOverlay(client); + } + } + public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) { if (m_landManagementModule != null) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index f274cd3..79367fb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1617,6 +1617,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api bool changed = false; bool changedSeeAvs = false; + bool changedoverlay = false; + bool changedneedupdate = false; // Process the rules, not sure what the impact would be of changing owner or group for (int idx = 0; idx < rules.Length;) @@ -1719,6 +1721,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { changed = true; changedSeeAvs = true; + changedoverlay = true; + changedneedupdate = true; newLand.SeeAVs = newavs; } break; @@ -1744,19 +1748,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } if(changed) { - World.LandChannel.UpdateLandObject(newLand.LocalID,newLand); + World.LandChannel.UpdateLandObject(newLand.LocalID, newLand); - if(changedSeeAvs) + if(changedneedupdate) { UUID parcelID= newLand.GlobalID; - World.ForEachScenePresence(delegate (ScenePresence avatar) + World.ForEachRootScenePresence(delegate (ScenePresence avatar) { - if (avatar != null && !avatar.IsDeleted && avatar.currentParcelUUID == parcelID ) + if (avatar == null || avatar.IsDeleted || avatar.IsInTransit) + return; + + if(changedSeeAvs && avatar.currentParcelUUID == parcelID ) avatar.currentParcelUUID = parcelID; // force parcel flags review + + if(avatar.ControllingClient == null) + return; + + // this will be needed for some things like damage etc +// if(avatar.currentParcelUUID == parcelID) +// startLandObject.SendLandUpdateToClient(avatar.ControllingClient); + + if(changedoverlay && !avatar.IsNPC) + World.LandChannel.SendParcelsOverlay(avatar.ControllingClient); }); } } - } public double osList2Double(LSL_Types.list src, int index) diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs index 48dc840..05db03fe 100644 --- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs +++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs @@ -109,6 +109,7 @@ namespace OpenSim.Tests.Common public bool IsLandPrimCountTainted() { return false; } public bool IsForcefulBansAllowed() { return false; } public void UpdateLandObject(int localID, LandData data) {} + public void SendParcelsOverlay(IClientAPI client) {} public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) {} public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {} public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {} -- cgit v1.1 From 457551d0699558520c9ce47e05fcace828a706e5 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 12 Jul 2017 10:28:11 +0100 Subject: rename SOG.UpdatePrimFlags as just UpdateFlags since this is relative to the group never individual prims/parts and so confusing --- OpenSim/Region/Framework/Scenes/EventManager.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- .../Region/Framework/Scenes/SceneObjectGroup.cs | 131 +++++++++------------ 3 files changed, 59 insertions(+), 76 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 827f91e..f76f882 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -855,7 +855,7 @@ namespace OpenSim.Region.Framework.Scenes /// , /// , /// , - /// , + /// , /// /// public event ParcelPrimCountTainted OnParcelPrimCountTainted; diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index ae827f4..61a243d 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1649,7 +1649,7 @@ namespace OpenSim.Region.Framework.Scenes else // else turn it off vdtc = false; - group.UpdatePrimFlags(localID, UsePhysics, SetTemporary, SetPhantom, vdtc); + group.UpdateFlags(UsePhysics, SetTemporary, SetPhantom, vdtc); } else { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index c4b768b..6f46a92 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2718,35 +2718,22 @@ namespace OpenSim.Region.Framework.Scenes RootPart.KeyframeMotion.Stop(); RootPart.KeyframeMotion = null; } - UpdatePrimFlags(RootPart.LocalId, usePhysics, IsTemporary, IsPhantom, IsVolumeDetect); + UpdateFlags(usePhysics, IsTemporary, IsPhantom, IsVolumeDetect); } public void ScriptSetTemporaryStatus(bool makeTemporary) { - UpdatePrimFlags(RootPart.LocalId, UsesPhysics, makeTemporary, IsPhantom, IsVolumeDetect); + UpdateFlags(UsesPhysics, makeTemporary, IsPhantom, IsVolumeDetect); } public void ScriptSetPhantomStatus(bool makePhantom) { - UpdatePrimFlags(RootPart.LocalId, UsesPhysics, IsTemporary, makePhantom, IsVolumeDetect); + UpdateFlags(UsesPhysics, IsTemporary, makePhantom, IsVolumeDetect); } public void ScriptSetVolumeDetect(bool makeVolumeDetect) { - UpdatePrimFlags(RootPart.LocalId, UsesPhysics, IsTemporary, IsPhantom, makeVolumeDetect); - - /* - ScriptSetPhantomStatus(false); // What ever it was before, now it's not phantom anymore - - if (PhysActor != null) // Should always be the case now - { - PhysActor.SetVolumeDetect(param); - } - if (param != 0) - AddFlag(PrimFlags.Phantom); - - ScheduleFullUpdate(); - */ + UpdateFlags(UsesPhysics, IsTemporary, IsPhantom, makeVolumeDetect); } public void applyImpulse(Vector3 impulse) @@ -4031,84 +4018,80 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// - public void UpdatePrimFlags(uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVolumeDetect) + public void UpdateFlags(bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVolumeDetect) { - HasGroupChanged = true; + if (m_scene == null || IsDeleted) + return; - SceneObjectPart selectionPart = GetPart(localID); + HasGroupChanged = true; - if (Scene != null) + if (SetTemporary) { - if (SetTemporary) - { - DetachFromBackup(); - // Remove from database and parcel prim count - // - m_scene.DeleteFromStorage(UUID); - } - else if (!Backup) - { - // Previously been temporary now switching back so make it - // available for persisting again - AttachToBackup(); - } - - m_scene.EventManager.TriggerParcelPrimCountTainted(); + DetachFromBackup(); + // Remove from database and parcel prim count + // + m_scene.DeleteFromStorage(UUID); } - - if (selectionPart != null) + else if (!Backup) { - SceneObjectPart[] parts = m_parts.GetArray(); + // Previously been temporary now switching back so make it + // available for persisting again + AttachToBackup(); + } - if (Scene != null && UsePhysics) - { - int maxprims = m_scene.m_linksetPhysCapacity; - bool checkShape = (maxprims > 0 && - parts.Length > maxprims); - for (int i = 0; i < parts.Length; i++) - { - SceneObjectPart part = parts[i]; + SceneObjectPart[] parts = m_parts.GetArray(); - if(part.PhysicsShapeType == (byte)PhysicsShapeType.None) - continue; // assuming root type was checked elsewhere + if (UsePhysics) + { + int maxprims = m_scene.m_linksetPhysCapacity; + bool checkShape = (maxprims > 0 && + parts.Length > maxprims); - if (checkShape) - { - if (--maxprims < 0) - { - UsePhysics = false; - break; - } - } + for (int i = 0; i < parts.Length; i++) + { + SceneObjectPart part = parts[i]; - if (part.Scale.X > m_scene.m_maxPhys || - part.Scale.Y > m_scene.m_maxPhys || - part.Scale.Z > m_scene.m_maxPhys ) + if(part.PhysicsShapeType == (byte)PhysicsShapeType.None) + continue; // assuming root type was checked elsewhere + + if (checkShape) + { + if (--maxprims < 0) { - UsePhysics = false; // Reset physics + UsePhysics = false; break; } } - } - if (parts.Length > 1) - { - m_rootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, true); - - for (int i = 0; i < parts.Length; i++) + if (part.Scale.X > m_scene.m_maxPhys || + part.Scale.Y > m_scene.m_maxPhys || + part.Scale.Z > m_scene.m_maxPhys ) { - - if (parts[i].UUID != m_rootPart.UUID) - parts[i].UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, true); + UsePhysics = false; // Reset physics + break; } + } + } - if (m_rootPart.PhysActor != null) - m_rootPart.PhysActor.Building = false; + if (parts.Length > 1) + { + m_rootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, true); + + for (int i = 0; i < parts.Length; i++) + { + + if (parts[i].UUID != m_rootPart.UUID) + parts[i].UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, true); } - else - m_rootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, false); + + if (m_rootPart.PhysActor != null) + m_rootPart.PhysActor.Building = false; } + else + m_rootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, false); + + m_scene.EventManager.TriggerParcelPrimCountTainted(); } public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data) -- cgit v1.1 From 51d32e3bed8a8d2ce8bd1e0ed3b9644eb4f97793 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 13 Jul 2017 02:57:57 +0100 Subject: add more missing en-us culture on scene serializer writes --- .../CoalescedSceneObjectsSerializer.cs | 12 ++--- .../Scenes/Serialization/SceneObjectSerializer.cs | 51 +++++++++++----------- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs index 7f7977e..d151002 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs @@ -86,9 +86,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteStartElement("CoalescedObject"); - writer.WriteAttributeString("x", size.X.ToString()); - writer.WriteAttributeString("y", size.Y.ToString()); - writer.WriteAttributeString("z", size.Z.ToString()); + writer.WriteAttributeString("x", size.X.ToString(Utils.EnUsCulture)); + writer.WriteAttributeString("y", size.Y.ToString(Utils.EnUsCulture)); + writer.WriteAttributeString("z", size.Z.ToString(Utils.EnUsCulture)); // Embed the offsets into the group XML for (int i = 0; i < coaObjects.Count; i++) @@ -100,9 +100,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization // i, obj.Name); writer.WriteStartElement("SceneObjectGroup"); - writer.WriteAttributeString("offsetx", offsets[i].X.ToString()); - writer.WriteAttributeString("offsety", offsets[i].Y.ToString()); - writer.WriteAttributeString("offsetz", offsets[i].Z.ToString()); + writer.WriteAttributeString("offsetx", offsets[i].X.ToString(Utils.EnUsCulture)); + writer.WriteAttributeString("offsety", offsets[i].Y.ToString(Utils.EnUsCulture)); + writer.WriteAttributeString("offsetz", offsets[i].Z.ToString(Utils.EnUsCulture)); SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, doScriptStates); diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index b012a08..4ca4434 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -65,7 +65,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization { using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) { - try { + try + { return FromOriginalXmlFormat(reader); } catch (Exception e) @@ -1505,7 +1506,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString()); WriteFlags(writer, "Flags", sop.Flags.ToString(), options); WriteUUID(writer, "CollisionSound", sop.CollisionSound, options); - writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString()); + writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString(Utils.EnUsCulture)); if (sop.MediaUrl != null) writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); WriteVector(writer, "AttachedPos", sop.AttachedPos); @@ -1525,7 +1526,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); - writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString()); + writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString(Utils.EnUsCulture)); WriteVector(writer, "Force", sop.Force); WriteVector(writer, "Torque", sop.Torque); @@ -1542,22 +1543,22 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("RotationAxisLocks", sop.RotationAxisLocks.ToString().ToLower()); writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower()); if (sop.Density != 1000.0f) - writer.WriteElementString("Density", sop.Density.ToString().ToLower()); + writer.WriteElementString("Density", sop.Density.ToString(Utils.EnUsCulture)); if (sop.Friction != 0.6f) - writer.WriteElementString("Friction", sop.Friction.ToString().ToLower()); + writer.WriteElementString("Friction", sop.Friction.ToString(Utils.EnUsCulture)); if (sop.Restitution != 0.5f) - writer.WriteElementString("Bounce", sop.Restitution.ToString().ToLower()); + writer.WriteElementString("Bounce", sop.Restitution.ToString(Utils.EnUsCulture)); if (sop.GravityModifier != 1.0f) - writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower()); + writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString(Utils.EnUsCulture)); WriteVector(writer, "CameraEyeOffset", sop.GetCameraEyeOffset()); WriteVector(writer, "CameraAtOffset", sop.GetCameraAtOffset()); // if (sop.Sound != UUID.Zero) force it till sop crossing does clear it on child prim { WriteUUID(writer, "SoundID", sop.Sound, options); - writer.WriteElementString("SoundGain", sop.SoundGain.ToString().ToLower()); + writer.WriteElementString("SoundGain", sop.SoundGain.ToString(Utils.EnUsCulture)); writer.WriteElementString("SoundFlags", sop.SoundFlags.ToString().ToLower()); - writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString().ToLower()); + writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString(Utils.EnUsCulture)); } writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower()); @@ -1731,22 +1732,22 @@ namespace OpenSim.Region.Framework.Scenes.Serialization // Don't serialize SculptData. It's just a copy of the asset, which can be loaded separately using 'SculptTexture'. writer.WriteElementString("FlexiSoftness", shp.FlexiSoftness.ToString()); - writer.WriteElementString("FlexiTension", shp.FlexiTension.ToString()); - writer.WriteElementString("FlexiDrag", shp.FlexiDrag.ToString()); - writer.WriteElementString("FlexiGravity", shp.FlexiGravity.ToString()); - writer.WriteElementString("FlexiWind", shp.FlexiWind.ToString()); - writer.WriteElementString("FlexiForceX", shp.FlexiForceX.ToString()); - writer.WriteElementString("FlexiForceY", shp.FlexiForceY.ToString()); - writer.WriteElementString("FlexiForceZ", shp.FlexiForceZ.ToString()); - - writer.WriteElementString("LightColorR", shp.LightColorR.ToString()); - writer.WriteElementString("LightColorG", shp.LightColorG.ToString()); - writer.WriteElementString("LightColorB", shp.LightColorB.ToString()); - writer.WriteElementString("LightColorA", shp.LightColorA.ToString()); - writer.WriteElementString("LightRadius", shp.LightRadius.ToString()); - writer.WriteElementString("LightCutoff", shp.LightCutoff.ToString()); - writer.WriteElementString("LightFalloff", shp.LightFalloff.ToString()); - writer.WriteElementString("LightIntensity", shp.LightIntensity.ToString()); + writer.WriteElementString("FlexiTension", shp.FlexiTension.ToString(Utils.EnUsCulture)); + writer.WriteElementString("FlexiDrag", shp.FlexiDrag.ToString(Utils.EnUsCulture)); + writer.WriteElementString("FlexiGravity", shp.FlexiGravity.ToString(Utils.EnUsCulture)); + writer.WriteElementString("FlexiWind", shp.FlexiWind.ToString(Utils.EnUsCulture)); + writer.WriteElementString("FlexiForceX", shp.FlexiForceX.ToString(Utils.EnUsCulture)); + writer.WriteElementString("FlexiForceY", shp.FlexiForceY.ToString(Utils.EnUsCulture)); + writer.WriteElementString("FlexiForceZ", shp.FlexiForceZ.ToString(Utils.EnUsCulture)); + + writer.WriteElementString("LightColorR", shp.LightColorR.ToString(Utils.EnUsCulture)); + writer.WriteElementString("LightColorG", shp.LightColorG.ToString(Utils.EnUsCulture)); + writer.WriteElementString("LightColorB", shp.LightColorB.ToString(Utils.EnUsCulture)); + writer.WriteElementString("LightColorA", shp.LightColorA.ToString(Utils.EnUsCulture)); + writer.WriteElementString("LightRadius", shp.LightRadius.ToString(Utils.EnUsCulture)); + writer.WriteElementString("LightCutoff", shp.LightCutoff.ToString(Utils.EnUsCulture)); + writer.WriteElementString("LightFalloff", shp.LightFalloff.ToString(Utils.EnUsCulture)); + writer.WriteElementString("LightIntensity", shp.LightIntensity.ToString(Utils.EnUsCulture)); writer.WriteElementString("FlexiEntry", shp.FlexiEntry.ToString().ToLower()); writer.WriteElementString("LightEntry", shp.LightEntry.ToString().ToLower()); -- cgit v1.1 From 61e3fe42bd78b98ffffb3a0f1b8f8bf32583bb9f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 13 Jul 2017 03:26:43 +0100 Subject: fix wrong test --- OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs index 045fd3c..4ce6a95 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs @@ -54,8 +54,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests UUID ownerId = TestHelpers.ParseTail(0x1); SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(3, ownerId, "so1", 0x10); - so1.ScriptSetPhysicsStatus(true); m_scene.AddSceneObject(so1); + so1.ScriptSetPhysicsStatus(true); Assert.That(m_scene.SceneGraph.GetTotalObjectsCount(), Is.EqualTo(3)); Assert.That(m_scene.SceneGraph.GetActiveObjectsCount(), Is.EqualTo(3)); -- cgit v1.1 From bd249bdf5b175ee6d84588a777444f2b89d7df1e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 13 Jul 2017 04:14:33 +0100 Subject: replace the wrong libOMV user modifiable Utils.EnUSCulture by our own no User modifiable Culture.FormatProvider, and also for internal coerence. We do use the libomv on other code paths, so that must be fixed --- OpenSim/Capabilities/LLSD.cs | 2 +- OpenSim/Framework/PhysicsInertia.cs | 16 ++--- OpenSim/Region/Framework/Scenes/SOPVehicle.cs | 16 ++--- .../CoalescedSceneObjectsSerializer.cs | 12 ++-- .../Scenes/Serialization/SceneObjectSerializer.cs | 70 +++++++++++----------- 5 files changed, 58 insertions(+), 58 deletions(-) diff --git a/OpenSim/Capabilities/LLSD.cs b/OpenSim/Capabilities/LLSD.cs index c59cede..8f3cab7 100644 --- a/OpenSim/Capabilities/LLSD.cs +++ b/OpenSim/Capabilities/LLSD.cs @@ -566,7 +566,7 @@ namespace OpenSim.Framework.Capabilities endPos = FindEnd(llsd, 1); if (Double.TryParse(llsd.Substring(1, endPos - 1), NumberStyles.Float, - Utils.EnUsCulture.NumberFormat, out value)) + Culture.FormatProvider.NumberFormat, out value)) return value; else throw new LLSDParseException("Failed to parse double value type"); diff --git a/OpenSim/Framework/PhysicsInertia.cs b/OpenSim/Framework/PhysicsInertia.cs index af70634..6e15791 100644 --- a/OpenSim/Framework/PhysicsInertia.cs +++ b/OpenSim/Framework/PhysicsInertia.cs @@ -64,25 +64,25 @@ namespace OpenSim.Framework private void XWfloat(string name, float f) { - writer.WriteElementString(name, f.ToString(Utils.EnUsCulture)); + writer.WriteElementString(name, f.ToString(Culture.FormatProvider)); } private void XWVector(string name, Vector3 vec) { writer.WriteStartElement(name); - writer.WriteElementString("X", vec.X.ToString(Utils.EnUsCulture)); - writer.WriteElementString("Y", vec.Y.ToString(Utils.EnUsCulture)); - writer.WriteElementString("Z", vec.Z.ToString(Utils.EnUsCulture)); + writer.WriteElementString("X", vec.X.ToString(Culture.FormatProvider)); + writer.WriteElementString("Y", vec.Y.ToString(Culture.FormatProvider)); + writer.WriteElementString("Z", vec.Z.ToString(Culture.FormatProvider)); writer.WriteEndElement(); } private void XWVector4(string name, Vector4 quat) { writer.WriteStartElement(name); - writer.WriteElementString("X", quat.X.ToString(Utils.EnUsCulture)); - writer.WriteElementString("Y", quat.Y.ToString(Utils.EnUsCulture)); - writer.WriteElementString("Z", quat.Z.ToString(Utils.EnUsCulture)); - writer.WriteElementString("W", quat.W.ToString(Utils.EnUsCulture)); + writer.WriteElementString("X", quat.X.ToString(Culture.FormatProvider)); + writer.WriteElementString("Y", quat.Y.ToString(Culture.FormatProvider)); + writer.WriteElementString("Z", quat.Z.ToString(Culture.FormatProvider)); + writer.WriteElementString("W", quat.W.ToString(Culture.FormatProvider)); writer.WriteEndElement(); } diff --git a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs index 8d11331..351eda3 100644 --- a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs +++ b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs @@ -425,25 +425,25 @@ namespace OpenSim.Region.Framework.Scenes private void XWfloat(string name, float f) { - writer.WriteElementString(name, f.ToString(Utils.EnUsCulture)); + writer.WriteElementString(name, f.ToString(Culture.FormatProvider)); } private void XWVector(string name, Vector3 vec) { writer.WriteStartElement(name); - writer.WriteElementString("X", vec.X.ToString(Utils.EnUsCulture)); - writer.WriteElementString("Y", vec.Y.ToString(Utils.EnUsCulture)); - writer.WriteElementString("Z", vec.Z.ToString(Utils.EnUsCulture)); + writer.WriteElementString("X", vec.X.ToString(Culture.FormatProvider)); + writer.WriteElementString("Y", vec.Y.ToString(Culture.FormatProvider)); + writer.WriteElementString("Z", vec.Z.ToString(Culture.FormatProvider)); writer.WriteEndElement(); } private void XWQuat(string name, Quaternion quat) { writer.WriteStartElement(name); - writer.WriteElementString("X", quat.X.ToString(Utils.EnUsCulture)); - writer.WriteElementString("Y", quat.Y.ToString(Utils.EnUsCulture)); - writer.WriteElementString("Z", quat.Z.ToString(Utils.EnUsCulture)); - writer.WriteElementString("W", quat.W.ToString(Utils.EnUsCulture)); + writer.WriteElementString("X", quat.X.ToString(Culture.FormatProvider)); + writer.WriteElementString("Y", quat.Y.ToString(Culture.FormatProvider)); + writer.WriteElementString("Z", quat.Z.ToString(Culture.FormatProvider)); + writer.WriteElementString("W", quat.W.ToString(Culture.FormatProvider)); writer.WriteEndElement(); } diff --git a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs index d151002..41f3ef4 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs @@ -86,9 +86,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteStartElement("CoalescedObject"); - writer.WriteAttributeString("x", size.X.ToString(Utils.EnUsCulture)); - writer.WriteAttributeString("y", size.Y.ToString(Utils.EnUsCulture)); - writer.WriteAttributeString("z", size.Z.ToString(Utils.EnUsCulture)); + writer.WriteAttributeString("x", size.X.ToString(Culture.FormatProvider)); + writer.WriteAttributeString("y", size.Y.ToString(Culture.FormatProvider)); + writer.WriteAttributeString("z", size.Z.ToString(Culture.FormatProvider)); // Embed the offsets into the group XML for (int i = 0; i < coaObjects.Count; i++) @@ -100,9 +100,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization // i, obj.Name); writer.WriteStartElement("SceneObjectGroup"); - writer.WriteAttributeString("offsetx", offsets[i].X.ToString(Utils.EnUsCulture)); - writer.WriteAttributeString("offsety", offsets[i].Y.ToString(Utils.EnUsCulture)); - writer.WriteAttributeString("offsetz", offsets[i].Z.ToString(Utils.EnUsCulture)); + writer.WriteAttributeString("offsetx", offsets[i].X.ToString(Culture.FormatProvider)); + writer.WriteAttributeString("offsety", offsets[i].Y.ToString(Culture.FormatProvider)); + writer.WriteAttributeString("offsetz", offsets[i].Z.ToString(Culture.FormatProvider)); SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, doScriptStates); diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 4ca4434..3d867a4 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -1460,10 +1460,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("Description", sop.Description); writer.WriteStartElement("Color"); - writer.WriteElementString("R", sop.Color.R.ToString(Utils.EnUsCulture)); - writer.WriteElementString("G", sop.Color.G.ToString(Utils.EnUsCulture)); - writer.WriteElementString("B", sop.Color.B.ToString(Utils.EnUsCulture)); - writer.WriteElementString("A", sop.Color.A.ToString(Utils.EnUsCulture)); + writer.WriteElementString("R", sop.Color.R.ToString(Culture.FormatProvider)); + writer.WriteElementString("G", sop.Color.G.ToString(Culture.FormatProvider)); + writer.WriteElementString("B", sop.Color.B.ToString(Culture.FormatProvider)); + writer.WriteElementString("A", sop.Color.A.ToString(Culture.FormatProvider)); writer.WriteEndElement(); writer.WriteElementString("Text", sop.Text); @@ -1506,7 +1506,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString()); WriteFlags(writer, "Flags", sop.Flags.ToString(), options); WriteUUID(writer, "CollisionSound", sop.CollisionSound, options); - writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString(Utils.EnUsCulture)); + writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString(Culture.FormatProvider)); if (sop.MediaUrl != null) writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); WriteVector(writer, "AttachedPos", sop.AttachedPos); @@ -1526,7 +1526,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); - writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString(Utils.EnUsCulture)); + writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString(Culture.FormatProvider)); WriteVector(writer, "Force", sop.Force); WriteVector(writer, "Torque", sop.Torque); @@ -1543,22 +1543,22 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("RotationAxisLocks", sop.RotationAxisLocks.ToString().ToLower()); writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower()); if (sop.Density != 1000.0f) - writer.WriteElementString("Density", sop.Density.ToString(Utils.EnUsCulture)); + writer.WriteElementString("Density", sop.Density.ToString(Culture.FormatProvider)); if (sop.Friction != 0.6f) - writer.WriteElementString("Friction", sop.Friction.ToString(Utils.EnUsCulture)); + writer.WriteElementString("Friction", sop.Friction.ToString(Culture.FormatProvider)); if (sop.Restitution != 0.5f) - writer.WriteElementString("Bounce", sop.Restitution.ToString(Utils.EnUsCulture)); + writer.WriteElementString("Bounce", sop.Restitution.ToString(Culture.FormatProvider)); if (sop.GravityModifier != 1.0f) - writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString(Utils.EnUsCulture)); + writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString(Culture.FormatProvider)); WriteVector(writer, "CameraEyeOffset", sop.GetCameraEyeOffset()); WriteVector(writer, "CameraAtOffset", sop.GetCameraAtOffset()); // if (sop.Sound != UUID.Zero) force it till sop crossing does clear it on child prim { WriteUUID(writer, "SoundID", sop.Sound, options); - writer.WriteElementString("SoundGain", sop.SoundGain.ToString(Utils.EnUsCulture)); + writer.WriteElementString("SoundGain", sop.SoundGain.ToString(Culture.FormatProvider)); writer.WriteElementString("SoundFlags", sop.SoundFlags.ToString().ToLower()); - writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString(Utils.EnUsCulture)); + writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString(Culture.FormatProvider)); } writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower()); @@ -1578,19 +1578,19 @@ namespace OpenSim.Region.Framework.Scenes.Serialization static void WriteVector(XmlTextWriter writer, string name, Vector3 vec) { writer.WriteStartElement(name); - writer.WriteElementString("X", vec.X.ToString(Utils.EnUsCulture)); - writer.WriteElementString("Y", vec.Y.ToString(Utils.EnUsCulture)); - writer.WriteElementString("Z", vec.Z.ToString(Utils.EnUsCulture)); + writer.WriteElementString("X", vec.X.ToString(Culture.FormatProvider)); + writer.WriteElementString("Y", vec.Y.ToString(Culture.FormatProvider)); + writer.WriteElementString("Z", vec.Z.ToString(Culture.FormatProvider)); writer.WriteEndElement(); } static void WriteQuaternion(XmlTextWriter writer, string name, Quaternion quat) { writer.WriteStartElement(name); - writer.WriteElementString("X", quat.X.ToString(Utils.EnUsCulture)); - writer.WriteElementString("Y", quat.Y.ToString(Utils.EnUsCulture)); - writer.WriteElementString("Z", quat.Z.ToString(Utils.EnUsCulture)); - writer.WriteElementString("W", quat.W.ToString(Utils.EnUsCulture)); + writer.WriteElementString("X", quat.X.ToString(Culture.FormatProvider)); + writer.WriteElementString("Y", quat.Y.ToString(Culture.FormatProvider)); + writer.WriteElementString("Z", quat.Z.ToString(Culture.FormatProvider)); + writer.WriteElementString("W", quat.W.ToString(Culture.FormatProvider)); writer.WriteEndElement(); } @@ -1732,22 +1732,22 @@ namespace OpenSim.Region.Framework.Scenes.Serialization // Don't serialize SculptData. It's just a copy of the asset, which can be loaded separately using 'SculptTexture'. writer.WriteElementString("FlexiSoftness", shp.FlexiSoftness.ToString()); - writer.WriteElementString("FlexiTension", shp.FlexiTension.ToString(Utils.EnUsCulture)); - writer.WriteElementString("FlexiDrag", shp.FlexiDrag.ToString(Utils.EnUsCulture)); - writer.WriteElementString("FlexiGravity", shp.FlexiGravity.ToString(Utils.EnUsCulture)); - writer.WriteElementString("FlexiWind", shp.FlexiWind.ToString(Utils.EnUsCulture)); - writer.WriteElementString("FlexiForceX", shp.FlexiForceX.ToString(Utils.EnUsCulture)); - writer.WriteElementString("FlexiForceY", shp.FlexiForceY.ToString(Utils.EnUsCulture)); - writer.WriteElementString("FlexiForceZ", shp.FlexiForceZ.ToString(Utils.EnUsCulture)); - - writer.WriteElementString("LightColorR", shp.LightColorR.ToString(Utils.EnUsCulture)); - writer.WriteElementString("LightColorG", shp.LightColorG.ToString(Utils.EnUsCulture)); - writer.WriteElementString("LightColorB", shp.LightColorB.ToString(Utils.EnUsCulture)); - writer.WriteElementString("LightColorA", shp.LightColorA.ToString(Utils.EnUsCulture)); - writer.WriteElementString("LightRadius", shp.LightRadius.ToString(Utils.EnUsCulture)); - writer.WriteElementString("LightCutoff", shp.LightCutoff.ToString(Utils.EnUsCulture)); - writer.WriteElementString("LightFalloff", shp.LightFalloff.ToString(Utils.EnUsCulture)); - writer.WriteElementString("LightIntensity", shp.LightIntensity.ToString(Utils.EnUsCulture)); + writer.WriteElementString("FlexiTension", shp.FlexiTension.ToString(Culture.FormatProvider)); + writer.WriteElementString("FlexiDrag", shp.FlexiDrag.ToString(Culture.FormatProvider)); + writer.WriteElementString("FlexiGravity", shp.FlexiGravity.ToString(Culture.FormatProvider)); + writer.WriteElementString("FlexiWind", shp.FlexiWind.ToString(Culture.FormatProvider)); + writer.WriteElementString("FlexiForceX", shp.FlexiForceX.ToString(Culture.FormatProvider)); + writer.WriteElementString("FlexiForceY", shp.FlexiForceY.ToString(Culture.FormatProvider)); + writer.WriteElementString("FlexiForceZ", shp.FlexiForceZ.ToString(Culture.FormatProvider)); + + writer.WriteElementString("LightColorR", shp.LightColorR.ToString(Culture.FormatProvider)); + writer.WriteElementString("LightColorG", shp.LightColorG.ToString(Culture.FormatProvider)); + writer.WriteElementString("LightColorB", shp.LightColorB.ToString(Culture.FormatProvider)); + writer.WriteElementString("LightColorA", shp.LightColorA.ToString(Culture.FormatProvider)); + writer.WriteElementString("LightRadius", shp.LightRadius.ToString(Culture.FormatProvider)); + writer.WriteElementString("LightCutoff", shp.LightCutoff.ToString(Culture.FormatProvider)); + writer.WriteElementString("LightFalloff", shp.LightFalloff.ToString(Culture.FormatProvider)); + writer.WriteElementString("LightIntensity", shp.LightIntensity.ToString(Culture.FormatProvider)); writer.WriteElementString("FlexiEntry", shp.FlexiEntry.ToString().ToLower()); writer.WriteElementString("LightEntry", shp.LightEntry.ToString().ToLower()); -- cgit v1.1 From a17abe7518b301a52307193dbd311e985b237af9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 13 Jul 2017 04:28:35 +0100 Subject: typo fix --- OpenSim/Capabilities/LLSD.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Capabilities/LLSD.cs b/OpenSim/Capabilities/LLSD.cs index 8f3cab7..76e439f 100644 --- a/OpenSim/Capabilities/LLSD.cs +++ b/OpenSim/Capabilities/LLSD.cs @@ -566,7 +566,7 @@ namespace OpenSim.Framework.Capabilities endPos = FindEnd(llsd, 1); if (Double.TryParse(llsd.Substring(1, endPos - 1), NumberStyles.Float, - Culture.FormatProvider.NumberFormat, out value)) + Culture.NumberFormatInfo, out value)) return value; else throw new LLSDParseException("Failed to parse double value type"); -- cgit v1.1 From 4fe13ef639efa23ebedb3055fd266a6f41372864 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 13 Jul 2017 05:21:00 +0100 Subject: update libomv fixing EnUsCulture --- bin/OpenMetaverse.Rendering.Meshmerizer.dll | Bin 20480 -> 24576 bytes bin/OpenMetaverse.StructuredData.XML | 349 - bin/OpenMetaverse.StructuredData.dll | Bin 102400 -> 118784 bytes bin/OpenMetaverse.XML | 36656 -------------------------- bin/OpenMetaverse.dll | Bin 2199552 -> 2404352 bytes bin/OpenMetaverseTypes.XML | 2667 -- bin/OpenMetaverseTypes.dll | Bin 110592 -> 118784 bytes 7 files changed, 39672 deletions(-) delete mode 100644 bin/OpenMetaverse.StructuredData.XML delete mode 100644 bin/OpenMetaverse.XML delete mode 100644 bin/OpenMetaverseTypes.XML diff --git a/bin/OpenMetaverse.Rendering.Meshmerizer.dll b/bin/OpenMetaverse.Rendering.Meshmerizer.dll index d376015..eab5fc7 100755 Binary files a/bin/OpenMetaverse.Rendering.Meshmerizer.dll and b/bin/OpenMetaverse.Rendering.Meshmerizer.dll differ diff --git a/bin/OpenMetaverse.StructuredData.XML b/bin/OpenMetaverse.StructuredData.XML deleted file mode 100644 index 8f0dd81..0000000 --- a/bin/OpenMetaverse.StructuredData.XML +++ /dev/null @@ -1,349 +0,0 @@ - - - - OpenMetaverse.StructuredData - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Uses reflection to create an SDMap from all of the SD - serializable types in an object - - Class or struct containing serializable types - An SDMap holding the serialized values from the - container object - - - - Uses reflection to deserialize member variables in an object from - an SDMap - - Reference to an object to fill with deserialized - values - Serialized values to put in the target - object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deserializes binary LLSD - - Serialized data - OSD containting deserialized data - - - - Deserializes binary LLSD - - Stream to read the data from - OSD containting deserialized data - - - - Serializes OSD to binary format. It does no prepend header - - OSD to serialize - Serialized data - - - - Serializes OSD to binary format - - OSD to serialize - - Serialized data - - - - Serializes OSD to binary format. It does no prepend header - - OSD to serialize - Serialized data - - - - Serializes OSD to binary format - - OSD to serialize - - Serialized data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bin/OpenMetaverse.StructuredData.dll b/bin/OpenMetaverse.StructuredData.dll index d269154..999463d 100755 Binary files a/bin/OpenMetaverse.StructuredData.dll and b/bin/OpenMetaverse.StructuredData.dll differ diff --git a/bin/OpenMetaverse.XML b/bin/OpenMetaverse.XML deleted file mode 100644 index ce8ca86..0000000 --- a/bin/OpenMetaverse.XML +++ /dev/null @@ -1,36656 +0,0 @@ - - - - OpenMetaverse - - - - - Permission request flags, asked when a script wants to control an Avatar - - - - Placeholder for empty values, shouldn't ever see this - - - Script wants ability to take money from you - - - Script wants to take camera controls for you - - - Script wants to remap avatars controls - - - Script wants to trigger avatar animations - This function is not implemented on the grid - - - Script wants to attach or detach the prim or primset to your avatar - - - Script wants permission to release ownership - This function is not implemented on the grid - The concept of "public" objects does not exist anymore. - - - Script wants ability to link/delink with other prims - - - Script wants permission to change joints - This function is not implemented on the grid - - - Script wants permissions to change permissions - This function is not implemented on the grid - - - Script wants to track avatars camera position and rotation - - - Script wants to control your camera - - - Script wants the ability to teleport you - - - - Special commands used in Instant Messages - - - - Indicates a regular IM from another agent - - - Simple notification box with an OK button - - - You've been invited to join a group. - - - Inventory offer - - - Accepted inventory offer - - - Declined inventory offer - - - Group vote - - - An object is offering its inventory - - - Accept an inventory offer from an object - - - Decline an inventory offer from an object - - - Unknown - - - Start a session, or add users to a session - - - Start a session, but don't prune offline users - - - Start a session with your group - - - Start a session without a calling card (finder or objects) - - - Send a message to a session - - - Leave a session - - - Indicates that the IM is from an object - - - Sent an IM to a busy user, this is the auto response - - - Shows the message in the console and chat history - - - Send a teleport lure - - - Response sent to the agent which inititiated a teleport invitation - - - Response sent to the agent which inititiated a teleport invitation - - - Only useful if you have Linden permissions - - - Request a teleport lure - - - IM to tell the user to go to an URL - - - IM for help - - - IM sent automatically on call for help, sends a lure - to each Helper reached - - - Like an IM but won't go to email - - - IM from a group officer to all group members - - - Unknown - - - Unknown - - - Accept a group invitation - - - Decline a group invitation - - - Unknown - - - An avatar is offering you friendship - - - An avatar has accepted your friendship offer - - - An avatar has declined your friendship offer - - - Indicates that a user has started typing - - - Indicates that a user has stopped typing - - - - Flag in Instant Messages, whether the IM should be delivered to - offline avatars as well - - - - Only deliver to online avatars - - - If the avatar is offline the message will be held until - they login next, and possibly forwarded to their e-mail account - - - - Conversion type to denote Chat Packet types in an easier-to-understand format - - - - Whisper (5m radius) - - - Normal chat (10/20m radius), what the official viewer typically sends - - - Shouting! (100m radius) - - - Event message when an Avatar has begun to type - - - Event message when an Avatar has stopped typing - - - Send the message to the debug channel - - - Event message when an object uses llOwnerSay - - - Event message when an object uses llRegionSayTo - - - Special value to support llRegionSay, never sent to the client - - - - Identifies the source of a chat message - - - - Chat from the grid or simulator - - - Chat from another avatar - - - Chat from an object - - - - - - - - - - - - - - - - - - Effect type used in ViewerEffect packets - - - - - - - - - - - - - - - - - - - - - - - - - Project a beam from a source to a destination, such as - the one used when editing an object - - - - - - - - - - - - Create a swirl of particles around an object - - - - - - - - - Cause an avatar to look at an object - - - Cause an avatar to point at an object - - - - The action an avatar is doing when looking at something, used in - ViewerEffect packets for the LookAt effect - - - - - - - - - - - - - - - - - - - - - - Deprecated - - - - - - - - - - - - - - - - The action an avatar is doing when pointing at something, used in - ViewerEffect packets for the PointAt effect - - - - - - - - - - - - - - - - - Money transaction types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Flags sent when a script takes or releases a control - - NOTE: (need to verify) These might be a subset of the ControlFlags enum in Movement, - - - No Flags set - - - Forward (W or up Arrow) - - - Back (S or down arrow) - - - Move left (shift+A or left arrow) - - - Move right (shift+D or right arrow) - - - Up (E or PgUp) - - - Down (C or PgDown) - - - Rotate left (A or left arrow) - - - Rotate right (D or right arrow) - - - Left Mouse Button - - - Left Mouse button in MouseLook - - - - Currently only used to hide your group title - - - - No flags set - - - Hide your group title - - - - Action state of the avatar, which can currently be typing and - editing - - - - - - - - - - - - - - Current teleport status - - - - Unknown status - - - Teleport initialized - - - Teleport in progress - - - Teleport failed - - - Teleport completed - - - Teleport cancelled - - - - - - - - No flags set, or teleport failed - - - Set when newbie leaves help island for first time - - - - - - Via Lure - - - Via Landmark - - - Via Location - - - Via Home - - - Via Telehub - - - Via Login - - - Linden Summoned - - - Linden Forced me - - - - - - Agent Teleported Home via Script - - - - - - - - - - - - forced to new location for example when avatar is banned or ejected - - - Teleport Finished via a Lure - - - Finished, Sim Changed - - - Finished, Same Sim - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Type of mute entry - - - - Object muted by name - - - Muted residet - - - Object muted by UUID - - - Muted group - - - Muted external entry - - - - Flags of mute entry - - - - No exceptions - - - Don't mute text chat - - - Don't mute voice chat - - - Don't mute particles - - - Don't mute sounds - - - Don't mute - - - - Instant Message - - - - Key of sender - - - Name of sender - - - Key of destination avatar - - - ID of originating estate - - - Key of originating region - - - Coordinates in originating region - - - Instant message type - - - Group IM session toggle - - - Key of IM session, for Group Messages, the groups UUID - - - Timestamp of the instant message - - - Instant message text - - - Whether this message is held for offline avatars - - - Context specific packed data - - - Print the struct data as a string - A string containing the field name, and field value - - - Represents muted object or resident - - - Type of the mute entry - - - UUID of the mute etnry - - - Mute entry name - - - Mute flags - - - Transaction detail sent with MoneyBalanceReply message - - - Type of the transaction - - - UUID of the transaction source - - - Is the transaction source a group - - - UUID of the transaction destination - - - Is transaction destination a group - - - Transaction amount - - - Transaction description - - - - Manager class for our own avatar - - - - - Called once attachment resource usage information has been collected - - Indicates if operation was successfull - Attachment resource usage information - - - The event subscribers. null if no subcribers - - - Raises the ChatFromSimulator event - A ChatEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when a scripted object or agent within range sends a public message - - - The event subscribers. null if no subcribers - - - Raises the ScriptDialog event - A SctriptDialogEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when a scripted object sends a dialog box containing possible - options an agent can respond to - - - The event subscribers. null if no subcribers - - - Raises the ScriptQuestion event - A ScriptQuestionEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when an object requests a change in the permissions an agent has permitted - - - The event subscribers. null if no subcribers - - - Raises the LoadURL event - A LoadUrlEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when a script requests an agent open the specified URL - - - The event subscribers. null if no subcribers - - - Raises the MoneyBalance event - A BalanceEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when an agents currency balance is updated - - - The event subscribers. null if no subcribers - - - Raises the MoneyBalanceReply event - A MoneyBalanceReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when a transaction occurs involving currency such as a land purchase - - - The event subscribers. null if no subcribers - - - Raises the IM event - A InstantMessageEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when an ImprovedInstantMessage packet is recieved from the simulator, this is used for everything from - private messaging to friendship offers. The Dialog field defines what type of message has arrived - - - The event subscribers. null if no subcribers - - - Raises the TeleportProgress event - A TeleportEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when an agent has requested a teleport to another location, or when responding to a lure. Raised multiple times - for each teleport indicating the progress of the request - - - The event subscribers. null if no subcribers - - - Raises the AgentDataReply event - A AgentDataReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when a simulator sends agent specific information for our avatar. - - - The event subscribers. null if no subcribers - - - Raises the AnimationsChanged event - A AnimationsChangedEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when our agents animation playlist changes - - - The event subscribers. null if no subcribers - - - Raises the MeanCollision event - A MeanCollisionEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when an object or avatar forcefully collides with our agent - - - The event subscribers. null if no subcribers - - - Raises the RegionCrossed event - A RegionCrossedEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when our agent crosses a region border into another region - - - The event subscribers. null if no subcribers - - - Raises the GroupChatJoined event - A GroupChatJoinedEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when our agent succeeds or fails to join a group chat session - - - The event subscribers. null if no subcribers - - - Raises the AlertMessage event - A AlertMessageEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when a simulator sends an urgent message usually indication the recent failure of - another action we have attempted to take such as an attempt to enter a parcel where we are denied access - - - The event subscribers. null if no subcribers - - - Raises the ScriptControlChange event - A ScriptControlEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when a script attempts to take or release specified controls for our agent - - - The event subscribers. null if no subcribers - - - Raises the CameraConstraint event - A CameraConstraintEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the simulator detects our agent is trying to view something - beyond its limits - - - The event subscribers. null if no subcribers - - - Raises the ScriptSensorReply event - A ScriptSensorReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when a script sensor reply is received from a simulator - - - The event subscribers. null if no subcribers - - - Raises the AvatarSitResponse event - A AvatarSitResponseEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised in response to a request - - - The event subscribers. null if no subcribers - - - Raises the ChatSessionMemberAdded event - A ChatSessionMemberAddedEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when an avatar enters a group chat session we are participating in - - - The event subscribers. null if no subcribers - - - Raises the ChatSessionMemberLeft event - A ChatSessionMemberLeftEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when an agent exits a group chat session we are participating in - - - The event subscribers, null of no subscribers - - - Raises the SetDisplayNameReply Event - A SetDisplayNameReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - the details of display name change - - - The event subscribers. null if no subcribers - - - Raises the MuteListUpdated event - A EventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when a scripted object or agent within range sends a public message - - - Reference to the GridClient instance - - - Used for movement and camera tracking - - - Currently playing animations for the agent. Can be used to - check the current movement status such as walking, hovering, aiming, - etc. by checking against system animations found in the Animations class - - - Dictionary containing current Group Chat sessions and members - - - Dictionary containing mute list keyead on mute name and key - - - Your (client) avatars - "client", "agent", and "avatar" all represent the same thing - - - Temporary assigned to this session, used for - verifying our identity in packets - - - Shared secret that is never sent over the wire - - - Your (client) avatar ID, local to the current region/sim - - - Where the avatar started at login. Can be "last", "home" - or a login - - - The access level of this agent, usually M, PG or A - - - The CollisionPlane of Agent - - - An representing the velocity of our agent - - - An representing the acceleration of our agent - - - A which specifies the angular speed, and axis about which an Avatar is rotating. - - - Position avatar client will goto when login to 'home' or during - teleport request to 'home' region. - - - LookAt point saved/restored with HomePosition - - - Avatar First Name (i.e. Philip) - - - Avatar Last Name (i.e. Linden) - - - LookAt point received with the login response message - - - Avatar Full Name (i.e. Philip Linden) - - - Gets the health of the agent - - - Gets the current balance of the agent - - - Gets the local ID of the prim the agent is sitting on, - zero if the avatar is not currently sitting - - - Gets the of the agents active group. - - - Gets the Agents powers in the currently active group - - - Current status message for teleporting - - - Current position of the agent as a relative offset from - the simulator, or the parent object if we are sitting on something - - - Current rotation of the agent as a relative rotation from - the simulator, or the parent object if we are sitting on something - - - Current position of the agent in the simulator - - - - A representing the agents current rotation - - - - Returns the global grid position of the avatar - - - Various abilities and preferences sent by the grid - - - - Constructor, setup callbacks for packets related to our avatar - - A reference to the Class - - - - Send a text message from the Agent to the Simulator - - A containing the message - The channel to send the message on, 0 is the public channel. Channels above 0 - can be used however only scripts listening on the specified channel will see the message - Denotes the type of message being sent, shout, whisper, etc. - - - - Request any instant messages sent while the client was offline to be resent. - - - - - Send an Instant Message to another Avatar - - The recipients - A containing the message to send - - - - Send an Instant Message to an existing group chat or conference chat - - The recipients - A containing the message to send - IM session ID (to differentiate between IM windows) - - - - Send an Instant Message - - The name this IM will show up as being from - Key of Avatar - Text message being sent - IM session ID (to differentiate between IM windows) - IDs of sessions for a conference - - - - Send an Instant Message - - The name this IM will show up as being from - Key of Avatar - Text message being sent - IM session ID (to differentiate between IM windows) - Type of instant message to send - Whether to IM offline avatars as well - Senders Position - RegionID Sender is In - Packed binary data that is specific to - the dialog type - - - - Send an Instant Message to a group - - of the group to send message to - Text Message being sent. - - - - Send an Instant Message to a group the agent is a member of - - The name this IM will show up as being from - of the group to send message to - Text message being sent - - - - Send a request to join a group chat session - - of Group to leave - - - - Exit a group chat session. This will stop further Group chat messages - from being sent until session is rejoined. - - of Group chat session to leave - - - - Reply to script dialog questions. - - Channel initial request came on - Index of button you're "clicking" - Label of button you're "clicking" - of Object that sent the dialog request - - - - - Accept invite for to a chatterbox session - - of session to accept invite to - - - - Start a friends conference - - List of UUIDs to start a conference with - the temportary session ID returned in the callback> - - - - Start a particle stream between an agent and an object - - Key of the source agent - Key of the target object - - The type from the enum - A unique for this effect - - - - Start a particle stream between an agent and an object - - Key of the source agent - Key of the target object - A representing the beams offset from the source - A which sets the avatars lookat animation - of the Effect - - - - Create a particle beam between an avatar and an primitive - - The ID of source avatar - The ID of the target primitive - global offset - A object containing the combined red, green, blue and alpha - color values of particle beam - a float representing the duration the parcicle beam will last - A Unique ID for the beam - - - - - Create a particle swirl around a target position using a packet - - global offset - A object containing the combined red, green, blue and alpha - color values of particle beam - a float representing the duration the parcicle beam will last - A Unique ID for the beam - - - - Sends a request to sit on the specified object - - of the object to sit on - Sit at offset - - - - Follows a call to to actually sit on the object - - - - Stands up from sitting on a prim or the ground - true of AgentUpdate was sent - - - - Does a "ground sit" at the avatar's current position - - - - - Starts or stops flying - - True to start flying, false to stop flying - - - - Starts or stops crouching - - True to start crouching, false to stop crouching - - - - Starts a jump (begin holding the jump key) - - - - - Use the autopilot sim function to move the avatar to a new - position. Uses double precision to get precise movements - - The z value is currently not handled properly by the simulator - Global X coordinate to move to - Global Y coordinate to move to - Z coordinate to move to - - - - Use the autopilot sim function to move the avatar to a new position - - The z value is currently not handled properly by the simulator - Integer value for the global X coordinate to move to - Integer value for the global Y coordinate to move to - Floating-point value for the Z coordinate to move to - - - - Use the autopilot sim function to move the avatar to a new position - - The z value is currently not handled properly by the simulator - Integer value for the local X coordinate to move to - Integer value for the local Y coordinate to move to - Floating-point value for the Z coordinate to move to - - - Macro to cancel autopilot sim function - Not certain if this is how it is really done - true if control flags were set and AgentUpdate was sent to the simulator - - - - Grabs an object - - an unsigned integer of the objects ID within the simulator - - - - - Overload: Grab a simulated object - - an unsigned integer of the objects ID within the simulator - - The texture coordinates to grab - The surface coordinates to grab - The face of the position to grab - The region coordinates of the position to grab - The surface normal of the position to grab (A normal is a vector perpindicular to the surface) - The surface binormal of the position to grab (A binormal is a vector tangen to the surface - pointing along the U direction of the tangent space - - - - Drag an object - - of the object to drag - Drag target in region coordinates - - - - Overload: Drag an object - - of the object to drag - Drag target in region coordinates - - The texture coordinates to grab - The surface coordinates to grab - The face of the position to grab - The region coordinates of the position to grab - The surface normal of the position to grab (A normal is a vector perpindicular to the surface) - The surface binormal of the position to grab (A binormal is a vector tangen to the surface - pointing along the U direction of the tangent space - - - - Release a grabbed object - - The Objects Simulator Local ID - - - - - - - Release a grabbed object - - The Objects Simulator Local ID - The texture coordinates to grab - The surface coordinates to grab - The face of the position to grab - The region coordinates of the position to grab - The surface normal of the position to grab (A normal is a vector perpindicular to the surface) - The surface binormal of the position to grab (A binormal is a vector tangen to the surface - pointing along the U direction of the tangent space - - - - Touches an object - - an unsigned integer of the objects ID within the simulator - - - - - Request the current L$ balance - - - - - Give Money to destination Avatar - - UUID of the Target Avatar - Amount in L$ - - - - Give Money to destination Avatar - - UUID of the Target Avatar - Amount in L$ - Description that will show up in the - recipients transaction history - - - - Give L$ to an object - - object to give money to - amount of L$ to give - name of object - - - - Give L$ to a group - - group to give money to - amount of L$ to give - - - - Give L$ to a group - - group to give money to - amount of L$ to give - description of transaction - - - - Pay texture/animation upload fee - - - - - Pay texture/animation upload fee - - description of the transaction - - - - Give Money to destination Object or Avatar - - UUID of the Target Object/Avatar - Amount in L$ - Reason (Optional normally) - The type of transaction - Transaction flags, mostly for identifying group - transactions - - - - Plays a gesture - - Asset of the gesture - - - - Mark gesture active - - Inventory of the gesture - Asset of the gesture - - - - Mark gesture inactive - - Inventory of the gesture - - - - Send an AgentAnimation packet that toggles a single animation on - - The of the animation to start playing - Whether to ensure delivery of this packet or not - - - - Send an AgentAnimation packet that toggles a single animation off - - The of a - currently playing animation to stop playing - Whether to ensure delivery of this packet or not - - - - Send an AgentAnimation packet that will toggle animations on or off - - A list of animation s, and whether to - turn that animation on or off - Whether to ensure delivery of this packet or not - - - - Teleports agent to their stored home location - - true on successful teleport to home location - - - - Teleport agent to a landmark - - of the landmark to teleport agent to - true on success, false on failure - - - - Attempt to look up a simulator name and teleport to the discovered - destination - - Region name to look up - Position to teleport to - True if the lookup and teleport were successful, otherwise - false - - - - Attempt to look up a simulator name and teleport to the discovered - destination - - Region name to look up - Position to teleport to - Target to look at - True if the lookup and teleport were successful, otherwise - false - - - - Teleport agent to another region - - handle of region to teleport agent to - position in destination sim to teleport to - true on success, false on failure - This call is blocking - - - - Teleport agent to another region - - handle of region to teleport agent to - position in destination sim to teleport to - direction in destination sim agent will look at - true on success, false on failure - This call is blocking - - - - Request teleport to a another simulator - - handle of region to teleport agent to - position in destination sim to teleport to - - - - Request teleport to a another simulator - - handle of region to teleport agent to - position in destination sim to teleport to - direction in destination sim agent will look at - - - - Teleport agent to a landmark - - of the landmark to teleport agent to - - - - Send a teleport lure to another avatar with default "Join me in ..." invitation message - - target avatars to lure - - - - Send a teleport lure to another avatar with custom invitation message - - target avatars to lure - custom message to send with invitation - - - - Respond to a teleport lure by either accepting it and initiating - the teleport, or denying it - - of the avatar sending the lure - IM session of the incoming lure request - true to accept the lure, false to decline it - - - - Update agent profile - - struct containing updated - profile information - - - - Update agents profile interests - - selection of interests from struct - - - - Set the height and the width of the client window. This is used - by the server to build a virtual camera frustum for our avatar - - New height of the viewer window - New width of the viewer window - - - - Request the list of muted objects and avatars for this agent - - - - - Mute an object, resident, etc. - - Mute type - Mute UUID - Mute name - - - - Mute an object, resident, etc. - - Mute type - Mute UUID - Mute name - Mute flags - - - - Unmute an object, resident, etc. - - Mute UUID - Mute name - - - - Sets home location to agents current position - - will fire an AlertMessage () with - success or failure message - - - - Move an agent in to a simulator. This packet is the last packet - needed to complete the transition in to a new simulator - - Object - - - - Reply to script permissions request - - Object - of the itemID requesting permissions - of the taskID requesting permissions - list of permissions to allow - - - - Respond to a group invitation by either accepting or denying it - - UUID of the group (sent in the AgentID field of the invite message) - IM Session ID from the group invitation message - Accept the group invitation or deny it - - - - Requests script detection of objects and avatars - - name of the object/avatar to search for - UUID of the object or avatar to search for - Type of search from ScriptSensorTypeFlags - range of scan (96 max?) - the arc in radians to search within - an user generated ID to correlate replies with - Simulator to perform search in - - - - Create or update profile pick - - UUID of the pick to update, or random UUID to create a new pick - Is this a top pick? (typically false) - UUID of the parcel (UUID.Zero for the current parcel) - Name of the pick - Global position of the pick landmark - UUID of the image displayed with the pick - Long description of the pick - - - - Delete profile pick - - UUID of the pick to delete - - - - Create or update profile Classified - - UUID of the classified to update, or random UUID to create a new classified - Defines what catagory the classified is in - UUID of the image displayed with the classified - Price that the classified will cost to place for a week - Global position of the classified landmark - Name of the classified - Long description of the classified - if true, auto renew classified after expiration - - - - Create or update profile Classified - - UUID of the classified to update, or random UUID to create a new classified - Defines what catagory the classified is in - UUID of the image displayed with the classified - Price that the classified will cost to place for a week - Name of the classified - Long description of the classified - if true, auto renew classified after expiration - - - - Delete a classified ad - - The classified ads ID - - - - Fetches resource usage by agents attachmetns - - Called when the requested information is collected - - - - Initates request to set a new display name - - Previous display name - Desired new display name - - - - Tells the sim what UI language is used, and if it's ok to share that with scripts - - Two letter language code - Share language info with scripts - - - - Sets agents maturity access level - - PG, M or A - - - - Sets agents maturity access level - - PG, M or A - Callback function - - - - Take an incoming ImprovedInstantMessage packet, auto-parse, and if - OnInstantMessage is defined call that with the appropriate arguments - - The sender - The EventArgs object containing the packet data - - - - Take an incoming Chat packet, auto-parse, and if OnChat is defined call - that with the appropriate arguments. - - The sender - The EventArgs object containing the packet data - - - - Used for parsing llDialogs - - The sender - The EventArgs object containing the packet data - - - - Used for parsing llRequestPermissions dialogs - - The sender - The EventArgs object containing the packet data - - - - Handles Script Control changes when Script with permissions releases or takes a control - - The sender - The EventArgs object containing the packet data - - - - Used for parsing llLoadURL Dialogs - - The sender - The EventArgs object containing the packet data - - - - Update client's Position, LookAt and region handle from incoming packet - - The sender - The EventArgs object containing the packet data - This occurs when after an avatar moves into a new sim - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - - EQ Message fired with the result of SetDisplayName request - - The message key - the IMessage object containing the deserialized data sent from the simulator - The which originated the packet - - - - Process TeleportFailed message sent via EventQueue, informs agent its last teleport has failed and why. - - The Message Key - An IMessage object Deserialized from the recieved message event - The simulator originating the event message - - - - Process TeleportFinish from Event Queue and pass it onto our TeleportHandler - - The message system key for this event - IMessage object containing decoded data from OSD - The simulator originating the event message - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - - Crossed region handler for message that comes across the EventQueue. Sent to an agent - when the agent crosses a sim border into a new region. - - The message key - the IMessage object containing the deserialized data sent from the simulator - The which originated the packet - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - This packet is now being sent via the EventQueue - - - - Group Chat event handler - - The capability Key - IMessage object containing decoded data from OSD - - - - - Response from request to join a group chat - - - IMessage object containing decoded data from OSD - - - - - Someone joined or left group chat - - - IMessage object containing decoded data from OSD - - - - - Handle a group chat Invitation - - Caps Key - IMessage object containing decoded data from OSD - Originating Simulator - - - - Moderate a chat session - - the of the session to moderate, for group chats this will be the groups UUID - the of the avatar to moderate - Either "voice" to moderate users voice, or "text" to moderate users text session - true to moderate (silence user), false to allow avatar to speak - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - - Agent movement and camera control - - Agent movement is controlled by setting specific - After the control flags are set, An AgentUpdate is required to update the simulator of the specified flags - This is most easily accomplished by setting one or more of the AgentMovement properties - - Movement of an avatar is always based on a compass direction, for example AtPos will move the - agent from West to East or forward on the X Axis, AtNeg will of course move agent from - East to West or backward on the X Axis, LeftPos will be South to North or forward on the Y Axis - The Z axis is Up, finer grained control of movements can be done using the Nudge properties - - - - - Camera controls for the agent, mostly a thin wrapper around - CoordinateFrame. This class is only responsible for state - tracking and math, it does not send any packets - - - - - - - The camera is a local frame of reference inside of - the larger grid space. This is where the math happens - - - - - - - - - - - - - - - - Default constructor - - - - Move agent positive along the X axis - - - Move agent negative along the X axis - - - Move agent positive along the Y axis - - - Move agent negative along the Y axis - - - Move agent positive along the Z axis - - - Move agent negative along the Z axis - - - - - - - - - - - - - - - - - - - - - - - - Causes simulator to make agent fly - - - Stop movement - - - Finish animation - - - Stand up from a sit - - - Tells simulator to sit agent on ground - - - Place agent into mouselook mode - - - Nudge agent positive along the X axis - - - Nudge agent negative along the X axis - - - Nudge agent positive along the Y axis - - - Nudge agent negative along the Y axis - - - Nudge agent positive along the Z axis - - - Nudge agent negative along the Z axis - - - - - - - - - Tell simulator to mark agent as away - - - - - - - - - - - - - - - - Returns "always run" value, or changes it by sending a SetAlwaysRunPacket - - - - The current value of the agent control flags - - - Gets or sets the interval in milliseconds at which - AgentUpdate packets are sent to the current simulator. Setting - this to a non-zero value will also enable the packet sending if - it was previously off, and setting it to zero will disable - - - Gets or sets whether AgentUpdate packets are sent to - the current simulator - - - Reset movement controls every time we send an update - - - Agent camera controls - - - Currently only used for hiding your group title - - - Action state of the avatar, which can currently be - typing and editing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Timer for sending AgentUpdate packets - - - Default constructor - - - - Send an AgentUpdate with the camera set at the current agent - position and pointing towards the heading specified - - Camera rotation in radians - Whether to send the AgentUpdate reliable - or not - - - - Rotates the avatar body and camera toward a target position. - This will also anchor the camera position on the avatar - - Region coordinates to turn toward - - - - Rotates the avatar body and camera toward a target position. - This will also anchor the camera position on the avatar - - Region coordinates to turn toward - whether to send update or not - - - - Send new AgentUpdate packet to update our current camera - position and rotation - - - - - Send new AgentUpdate packet to update our current camera - position and rotation - - Whether to require server acknowledgement - of this packet - - - - Send new AgentUpdate packet to update our current camera - position and rotation - - Whether to require server acknowledgement - of this packet - Simulator to send the update to - - - - Builds an AgentUpdate packet entirely from parameters. This - will not touch the state of Self.Movement or - Self.Movement.Camera in any way - - - - - - - - - - - - - - - - Sends update of Field of Vision vertical angle to the simulator - - Angle in radians - - - - Used to specify movement actions for your agent - - - - Empty flag - - - Move Forward (SL Keybinding: W/Up Arrow) - - - Move Backward (SL Keybinding: S/Down Arrow) - - - Move Left (SL Keybinding: Shift-(A/Left Arrow)) - - - Move Right (SL Keybinding: Shift-(D/Right Arrow)) - - - Not Flying: Jump/Flying: Move Up (SL Keybinding: E) - - - Not Flying: Croutch/Flying: Move Down (SL Keybinding: C) - - - Unused - - - Unused - - - Unused - - - Unused - - - ORed with AGENT_CONTROL_AT_* if the keyboard is being used - - - ORed with AGENT_CONTROL_LEFT_* if the keyboard is being used - - - ORed with AGENT_CONTROL_UP_* if the keyboard is being used - - - Fly - - - - - - Finish our current animation - - - Stand up from the ground or a prim seat - - - Sit on the ground at our current location - - - Whether mouselook is currently enabled - - - Legacy, used if a key was pressed for less than a certain amount of time - - - Legacy, used if a key was pressed for less than a certain amount of time - - - Legacy, used if a key was pressed for less than a certain amount of time - - - Legacy, used if a key was pressed for less than a certain amount of time - - - Legacy, used if a key was pressed for less than a certain amount of time - - - Legacy, used if a key was pressed for less than a certain amount of time - - - - - - - - - Set when the avatar is idled or set to away. Note that the away animation is - activated separately from setting this flag - - - - - - - - - - - - - - - - Class for sending info on the success of the opration - of setting the maturity access level - - - - - New maturity accesss level returned from the sim - - - - - True if setting the new maturity access level has succedded - - - - - Creates new instance of the EventArgs class - - Has setting new maturty access level succeeded - New maturity access level as returned by the simulator - - - - - - - - Get the simulator sending the message - - - Get the message sent - - - Get the audible level of the message - - - Get the type of message sent: whisper, shout, etc - - - Get the source type of the message sender - - - Get the name of the agent or object sending the message - - - Get the ID of the agent or object sending the message - - - Get the ID of the object owner, or the agent ID sending the message - - - Get the position of the agent or object sending the message - - - - Construct a new instance of the ChatEventArgs object - - Sim from which the message originates - The message sent - The audible level of the message - The type of message sent: whisper, shout, etc - The source type of the message sender - The name of the agent or object sending the message - The ID of the agent or object sending the message - The ID of the object owner, or the agent ID sending the message - The position of the agent or object sending the message - - - Contains the data sent when a primitive opens a dialog with this agent - - - Get the dialog message - - - Get the name of the object that sent the dialog request - - - Get the ID of the image to be displayed - - - Get the ID of the primitive sending the dialog - - - Get the first name of the senders owner - - - Get the last name of the senders owner - - - Get the communication channel the dialog was sent on, responses - should also send responses on this same channel - - - Get the string labels containing the options presented in this dialog - - - UUID of the scritped object owner - - - - Construct a new instance of the ScriptDialogEventArgs - - The dialog message - The name of the object that sent the dialog request - The ID of the image to be displayed - The ID of the primitive sending the dialog - The first name of the senders owner - The last name of the senders owner - The communication channel the dialog was sent on - The string labels containing the options presented in this dialog - UUID of the scritped object owner - - - Contains the data sent when a primitive requests debit or other permissions - requesting a YES or NO answer - - - Get the simulator containing the object sending the request - - - Get the ID of the script making the request - - - Get the ID of the primitive containing the script making the request - - - Get the name of the primitive making the request - - - Get the name of the owner of the object making the request - - - Get the permissions being requested - - - - Construct a new instance of the ScriptQuestionEventArgs - - The simulator containing the object sending the request - The ID of the script making the request - The ID of the primitive containing the script making the request - The name of the primitive making the request - The name of the owner of the object making the request - The permissions being requested - - - Contains the data sent when a primitive sends a request - to an agent to open the specified URL - - - Get the name of the object sending the request - - - Get the ID of the object sending the request - - - Get the ID of the owner of the object sending the request - - - True if the object is owned by a group - - - Get the message sent with the request - - - Get the URL the object sent - - - - Construct a new instance of the LoadUrlEventArgs - - The name of the object sending the request - The ID of the object sending the request - The ID of the owner of the object sending the request - True if the object is owned by a group - The message sent with the request - The URL the object sent - - - The date received from an ImprovedInstantMessage - - - Get the InstantMessage object - - - Get the simulator where the InstantMessage origniated - - - - Construct a new instance of the InstantMessageEventArgs object - - the InstantMessage object - the simulator where the InstantMessage origniated - - - Contains the currency balance - - - - Get the currenct balance - - - - - Construct a new BalanceEventArgs object - - The currenct balance - - - Contains the transaction summary when an item is purchased, - money is given, or land is purchased - - - Get the ID of the transaction - - - True of the transaction was successful - - - Get the remaining currency balance - - - Get the meters credited - - - Get the meters comitted - - - Get the description of the transaction - - - Detailed transaction information - - - - Construct a new instance of the MoneyBalanceReplyEventArgs object - - The ID of the transaction - True of the transaction was successful - The current currency balance - The meters credited - The meters comitted - A brief description of the transaction - Transaction info - - - Data sent from the simulator containing information about your agent and active group information - - - Get the agents first name - - - Get the agents last name - - - Get the active group ID of your agent - - - Get the active groups title of your agent - - - Get the combined group powers of your agent - - - Get the active group name of your agent - - - - Construct a new instance of the AgentDataReplyEventArgs object - - The agents first name - The agents last name - The agents active group ID - The group title of the agents active group - The combined group powers the agent has in the active group - The name of the group the agent has currently active - - - Data sent by the simulator to indicate the active/changed animations - applied to your agent - - - Get the dictionary that contains the changed animations - - - - Construct a new instance of the AnimationsChangedEventArgs class - - The dictionary that contains the changed animations - - - - Data sent from a simulator indicating a collision with your agent - - - - Get the Type of collision - - - Get the ID of the agent or object that collided with your agent - - - Get the ID of the agent that was attacked - - - A value indicating the strength of the collision - - - Get the time the collision occurred - - - - Construct a new instance of the MeanCollisionEventArgs class - - The type of collision that occurred - The ID of the agent or object that perpetrated the agression - The ID of the Victim - The strength of the collision - The Time the collision occurred - - - Data sent to your agent when it crosses region boundaries - - - Get the simulator your agent just left - - - Get the simulator your agent is now in - - - - Construct a new instance of the RegionCrossedEventArgs class - - The simulator your agent just left - The simulator your agent is now in - - - Data sent from the simulator when your agent joins a group chat session - - - Get the ID of the group chat session - - - Get the name of the session - - - Get the temporary session ID used for establishing new sessions - - - True if your agent successfully joined the session - - - - Construct a new instance of the GroupChatJoinedEventArgs class - - The ID of the session - The name of the session - A temporary session id used for establishing new sessions - True of your agent successfully joined the session - - - Data sent by the simulator containing urgent messages - - - Get the alert message - - - - Construct a new instance of the AlertMessageEventArgs class - - The alert message - - - Data sent by a script requesting to take or release specified controls to your agent - - - Get the controls the script is attempting to take or release to the agent - - - True if the script is passing controls back to the agent - - - True if the script is requesting controls be released to the script - - - - Construct a new instance of the ScriptControlEventArgs class - - The controls the script is attempting to take or release to the agent - True if the script is passing controls back to the agent - True if the script is requesting controls be released to the script - - - - Data sent from the simulator to an agent to indicate its view limits - - - - Get the collision plane - - - - Construct a new instance of the CameraConstraintEventArgs class - - The collision plane - - - - Data containing script sensor requests which allow an agent to know the specific details - of a primitive sending script sensor requests - - - - Get the ID of the primitive sending the sensor - - - Get the ID of the group associated with the primitive - - - Get the name of the primitive sending the sensor - - - Get the ID of the primitive sending the sensor - - - Get the ID of the owner of the primitive sending the sensor - - - Get the position of the primitive sending the sensor - - - Get the range the primitive specified to scan - - - Get the rotation of the primitive sending the sensor - - - Get the type of sensor the primitive sent - - - Get the velocity of the primitive sending the sensor - - - - Construct a new instance of the ScriptSensorReplyEventArgs - - The ID of the primitive sending the sensor - The ID of the group associated with the primitive - The name of the primitive sending the sensor - The ID of the primitive sending the sensor - The ID of the owner of the primitive sending the sensor - The position of the primitive sending the sensor - The range the primitive specified to scan - The rotation of the primitive sending the sensor - The type of sensor the primitive sent - The velocity of the primitive sending the sensor - - - Contains the response data returned from the simulator in response to a - - - Get the ID of the primitive the agent will be sitting on - - - True if the simulator Autopilot functions were involved - - - Get the camera offset of the agent when seated - - - Get the camera eye offset of the agent when seated - - - True of the agent will be in mouselook mode when seated - - - Get the position of the agent when seated - - - Get the rotation of the agent when seated - - - Construct a new instance of the AvatarSitResponseEventArgs object - - - Data sent when an agent joins a chat session your agent is currently participating in - - - Get the ID of the chat session - - - Get the ID of the agent that joined - - - - Construct a new instance of the ChatSessionMemberAddedEventArgs object - - The ID of the chat session - The ID of the agent joining - - - Data sent when an agent exits a chat session your agent is currently participating in - - - Get the ID of the chat session - - - Get the ID of the agent that left - - - - Construct a new instance of the ChatSessionMemberLeftEventArgs object - - The ID of the chat session - The ID of the Agent that left - - - Event arguments with the result of setting display name operation - - - Status code, 200 indicates settign display name was successful - - - Textual description of the status - - - Details of the newly set display name - - - Default constructor - - - - Throttles the network traffic for various different traffic types. - Access this class through GridClient.Throttle - - - - Maximum bits per second for resending unacknowledged packets - - - Maximum bits per second for LayerData terrain - - - Maximum bits per second for LayerData wind data - - - Maximum bits per second for LayerData clouds - - - Unknown, includes object data - - - Maximum bits per second for textures - - - Maximum bits per second for downloaded assets - - - Maximum bits per second the entire connection, divided up - between invidiual streams using default multipliers - - - - Default constructor, uses a default high total of 1500 KBps (1536000) - - - - - Constructor that decodes an existing AgentThrottle packet in to - individual values - - Reference to the throttle data in an AgentThrottle - packet - Offset position to start reading at in the - throttle data - This is generally not needed in clients as the server will - never send a throttle packet to the client - - - - Send an AgentThrottle packet to the current server using the - current values - - - - - Send an AgentThrottle packet to the specified server using the - current values - - - - - Convert the current throttle values to a byte array that can be put - in an AgentThrottle packet - - Byte array containing all the throttle values - - - - Static pre-defined animations available to all agents - - - - Agent with afraid expression on face - - - Agent aiming a bazooka (right handed) - - - Agent aiming a bow (left handed) - - - Agent aiming a hand gun (right handed) - - - Agent aiming a rifle (right handed) - - - Agent with angry expression on face - - - Agent hunched over (away) - - - Agent doing a backflip - - - Agent laughing while holding belly - - - Agent blowing a kiss - - - Agent with bored expression on face - - - Agent bowing to audience - - - Agent brushing himself/herself off - - - Agent in busy mode - - - Agent clapping hands - - - Agent doing a curtsey bow - - - Agent crouching - - - Agent crouching while walking - - - Agent crying - - - Agent unanimated with arms out (e.g. setting appearance) - - - Agent re-animated after set appearance finished - - - Agent dancing - - - Agent dancing - - - Agent dancing - - - Agent dancing - - - Agent dancing - - - Agent dancing - - - Agent dancing - - - Agent dancing - - - Agent on ground unanimated - - - Agent boozing it up - - - Agent with embarassed expression on face - - - Agent with afraid expression on face - - - Agent with angry expression on face - - - Agent with bored expression on face - - - Agent crying - - - Agent showing disdain (dislike) for something - - - Agent with embarassed expression on face - - - Agent with frowning expression on face - - - Agent with kissy face - - - Agent expressing laughgter - - - Agent with open mouth - - - Agent with repulsed expression on face - - - Agent expressing sadness - - - Agent shrugging shoulders - - - Agent with a smile - - - Agent expressing surprise - - - Agent sticking tongue out - - - Agent with big toothy smile - - - Agent winking - - - Agent expressing worry - - - Agent falling down - - - Agent walking (feminine version) - - - Agent wagging finger (disapproval) - - - I'm not sure I want to know - - - Agent in superman position - - - Agent in superman position - - - Agent greeting another - - - Agent holding bazooka (right handed) - - - Agent holding a bow (left handed) - - - Agent holding a handgun (right handed) - - - Agent holding a rifle (right handed) - - - Agent throwing an object (right handed) - - - Agent in static hover - - - Agent hovering downward - - - Agent hovering upward - - - Agent being impatient - - - Agent jumping - - - Agent jumping with fervor - - - Agent point to lips then rear end - - - Agent landing from jump, finished flight, etc - - - Agent laughing - - - Agent landing from jump, finished flight, etc - - - Agent sitting on a motorcycle - - - - - - Agent moving head side to side - - - Agent moving head side to side with unhappy expression - - - Agent taunting another - - - - - - Agent giving peace sign - - - Agent pointing at self - - - Agent pointing at another - - - Agent preparing for jump (bending knees) - - - Agent punching with left hand - - - Agent punching with right hand - - - Agent acting repulsed - - - Agent trying to be Chuck Norris - - - Rocks, Paper, Scissors 1, 2, 3 - - - Agent with hand flat over other hand - - - Agent with fist over other hand - - - Agent with two fingers spread over other hand - - - Agent running - - - Agent appearing sad - - - Agent saluting - - - Agent shooting bow (left handed) - - - Agent cupping mouth as if shouting - - - Agent shrugging shoulders - - - Agent in sit position - - - Agent in sit position (feminine) - - - Agent in sit position (generic) - - - Agent sitting on ground - - - Agent sitting on ground - - - - - - Agent sleeping on side - - - Agent smoking - - - Agent inhaling smoke - - - - - - Agent taking a picture - - - Agent standing - - - Agent standing up - - - Agent standing - - - Agent standing - - - Agent standing - - - Agent standing - - - Agent stretching - - - Agent in stride (fast walk) - - - Agent surfing - - - Agent acting surprised - - - Agent striking with a sword - - - Agent talking (lips moving) - - - Agent throwing a tantrum - - - Agent throwing an object (right handed) - - - Agent trying on a shirt - - - Agent turning to the left - - - Agent turning to the right - - - Agent typing - - - Agent walking - - - Agent whispering - - - Agent whispering with fingers in mouth - - - Agent winking - - - Agent winking - - - Agent worried - - - Agent nodding yes - - - Agent nodding yes with happy face - - - Agent floating with legs and arms crossed - - - - A dictionary containing all pre-defined animations - - A dictionary containing the pre-defined animations, - where the key is the animations ID, and the value is a string - containing a name to identify the purpose of the animation - - - - Index of TextureEntry slots for avatar appearances - - - - - Bake layers for avatar appearance - - - - - Appearance Flags, introdued with server side baking, currently unused - - - - Mask for multiple attachments - - - Mapping between BakeType and AvatarTextureIndex - - - Maximum number of concurrent downloads for wearable assets and textures - - - Maximum number of concurrent uploads for baked textures - - - Timeout for fetching inventory listings - - - Timeout for fetching a single wearable, or receiving a single packet response - - - Timeout for fetching a single texture - - - Timeout for uploading a single baked texture - - - Number of times to retry bake upload - - - When changing outfit, kick off rebake after - 20 seconds has passed since the last change - - - Total number of wearables for each avatar - - - Total number of baked textures on each avatar - - - Total number of wearables per bake layer - - - Map of what wearables are included in each bake - - - Magic values to finalize the cache check hashes for each - bake - - - Default avatar texture, used to detect when a custom - texture is not set for a face - - - - Contains information about a wearable inventory item - - - - Inventory ItemID of the wearable - - - AssetID of the wearable asset - - - WearableType of the wearable - - - AssetType of the wearable - - - Asset data for the wearable - - - - Data collected from visual params for each wearable - needed for the calculation of the color - - - - - Holds a texture assetID and the data needed to bake this layer into - an outfit texture. Used to keep track of currently worn textures - and baking data - - - - A texture AssetID - - - Asset data for the texture - - - Collection of alpha masks that needs applying - - - Tint that should be applied to the texture - - - Where on avatar does this texture belong - - - The event subscribers. null if no subcribers - - - Raises the AgentWearablesReply event - An AgentWearablesReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Triggered when an AgentWearablesUpdate packet is received, - telling us what our avatar is currently wearing - request. - - - The event subscribers. null if no subcribers - - - Raises the CachedBakesReply event - An AgentCachedBakesReplyEventArgs object containing the - data returned from the data server AgentCachedTextureResponse - - - Thread sync lock object - - - Raised when an AgentCachedTextureResponse packet is - received, giving a list of cached bakes that were found on the - simulator - request. - - - The event subscribers. null if no subcribers - - - Raises the AppearanceSet event - An AppearanceSetEventArgs object indicating if the operatin was successfull - - - Thread sync lock object - - - - Raised when appearance data is sent to the simulator, also indicates - the main appearance thread is finished. - - request. - - - The event subscribers. null if no subcribers - - - Raises the RebakeAvatarRequested event - An RebakeAvatarTexturesEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - - Triggered when the simulator requests the agent rebake its appearance. - - - - - - Returns true if AppearanceManager is busy and trying to set or change appearance will fail - - - - Visual parameters last sent to the sim - - - Textures about this client sent to the sim - - - A cache of wearables currently being worn - - - A cache of textures currently being worn - - - Incrementing serial number for AgentCachedTexture packets - - - Incrementing serial number for AgentSetAppearance packets - - - Indicates if WearablesRequest succeeded - - - Indicates whether or not the appearance thread is currently - running, to prevent multiple appearance threads from running - simultaneously - - - Reference to our agent - - - - Timer used for delaying rebake on changing outfit - - - - - Main appearance thread - - - - - Is server baking complete. It needs doing only once - - - - - Default constructor - - A reference to our agent - - - - Obsolete method for setting appearance. This function no longer does anything. - Use RequestSetAppearance() to manually start the appearance thread - - - - - Obsolete method for setting appearance. This function no longer does anything. - Use RequestSetAppearance() to manually start the appearance thread - - Unused parameter - - - - Starts the appearance setting thread - - - - - Starts the appearance setting thread - - True to force rebaking, otherwise false - - - - Check if current region supports server side baking - - True if server side baking support is detected - - - - Ask the server what textures our agent is currently wearing - - - - - Build hashes out of the texture assetIDs for each baking layer to - ask the simulator whether it has cached copies of each baked texture - - - - - Returns the AssetID of the asset that is currently being worn in a - given WearableType slot - - WearableType slot to get the AssetID for - The UUID of the asset being worn in the given slot, or - UUID.Zero if no wearable is attached to the given slot or wearables - have not been downloaded yet - - - - Add a wearable to the current outfit and set appearance - - Wearable to be added to the outfit - - - - Add a wearable to the current outfit and set appearance - - Wearable to be added to the outfit - Should existing item on the same point or of the same type be replaced - - - - Add a list of wearables to the current outfit and set appearance - - List of wearable inventory items to - be added to the outfit - Should existing item on the same point or of the same type be replaced - - - - Add a list of wearables to the current outfit and set appearance - - List of wearable inventory items to - be added to the outfit - Should existing item on the same point or of the same type be replaced - - - - Remove a wearable from the current outfit and set appearance - - Wearable to be removed from the outfit - - - - Removes a list of wearables from the current outfit and set appearance - - List of wearable inventory items to - be removed from the outfit - - - - Replace the current outfit with a list of wearables and set appearance - - List of wearable inventory items that - define a new outfit - - - - Replace the current outfit with a list of wearables and set appearance - - List of wearable inventory items that - define a new outfit - Check if we have all body parts, set this to false only - if you know what you're doing - - - - Checks if an inventory item is currently being worn - - The inventory item to check against the agent - wearables - The WearableType slot that the item is being worn in, - or WearbleType.Invalid if it is not currently being worn - - - - Returns a copy of the agents currently worn wearables - - A copy of the agents currently worn wearables - Avoid calling this function multiple times as it will make - a copy of all of the wearable data each time - - - - Calls either or - depending on the value of - replaceItems - - List of wearable inventory items to add - to the outfit or become a new outfit - True to replace existing items with the - new list of items, false to add these items to the existing outfit - - - - Adds a list of attachments to our agent - - A List containing the attachments to add - If true, tells simulator to remove existing attachment - first - - - - Adds a list of attachments to our agent - - A List containing the attachments to add - If true, tells simulator to remove existing attachment - If true replace existing attachment on this attachment point, otherwise add to it (multi-attachments) - first - - - - Attach an item to our agent at a specific attach point - - A to attach - the on the avatar - to attach the item to - - - - Attach an item to our agent at a specific attach point - - A to attach - the on the avatar - If true replace existing attachment on this attachment point, otherwise add to it (multi-attachments) - to attach the item to - - - - Attach an item to our agent specifying attachment details - - The of the item to attach - The attachments owner - The name of the attachment - The description of the attahment - The to apply when attached - The of the attachment - The on the agent - to attach the item to - - - - Attach an item to our agent specifying attachment details - - The of the item to attach - The attachments owner - The name of the attachment - The description of the attahment - The to apply when attached - The of the attachment - The on the agent - If true replace existing attachment on this attachment point, otherwise add to it (multi-attachments) - to attach the item to - - - - Detach an item from our agent using an object - - An object - - - - Detach an item from our agent - - The inventory itemID of the item to detach - - - - Inform the sim which wearables are part of our current outfit - - - - - Replaces the Wearables collection with a list of new wearable items - - Wearable items to replace the Wearables collection with - - - - Calculates base color/tint for a specific wearable - based on its params - - All the color info gathered from wearable's VisualParams - passed as list of ColorParamInfo tuples - Base color/tint for the wearable - - - - Blocking method to populate the Wearables dictionary - - True on success, otherwise false - - - - Blocking method to populate the Textures array with cached bakes - - True on success, otherwise false - - - - Populates textures and visual params from a decoded asset - - Wearable to decode - - Populates textures and visual params from a decoded asset - - Wearable to decode - - - - Blocking method to download and parse currently worn wearable assets - - True on success, otherwise false - - - - Get a list of all of the textures that need to be downloaded for a - single bake layer - - Bake layer to get texture AssetIDs for - A list of texture AssetIDs to download - - - - Helper method to lookup the TextureID for a single layer and add it - to a list if it is not already present - - - - - - - Blocking method to download all of the textures needed for baking - the given bake layers - - A list of layers that need baking - No return value is given because the baking will happen - whether or not all textures are successfully downloaded - - - - Blocking method to create and upload baked textures for all of the - missing bakes - - True on success, otherwise false - - - - Blocking method to create and upload a baked texture for a single - bake layer - - Layer to bake - True on success, otherwise false - - - - Blocking method to upload a baked texture - - Five channel JPEG2000 texture data to upload - UUID of the newly created asset on success, otherwise UUID.Zero - - - - Creates a dictionary of visual param values from the downloaded wearables - - A dictionary of visual param indices mapping to visual param - values for our agent that can be fed to the Baker class - - - - Initate server baking process - - True if the server baking was successful - - - - Get the latest version of COF - - Current Outfit Folder (or null if getting the data failed) - - - - Create an AgentSetAppearance packet from Wearables data and the - Textures array and send it - - - - - Converts a WearableType to a bodypart or clothing WearableType - - A WearableType - AssetType.Bodypart or AssetType.Clothing or AssetType.Unknown - - - - Converts a BakeType to the corresponding baked texture slot in AvatarTextureIndex - - A BakeType - The AvatarTextureIndex slot that holds the given BakeType - - - - Gives the layer number that is used for morph mask - - >A BakeType - Which layer number as defined in BakeTypeToTextures is used for morph mask - - - - Converts a BakeType to a list of the texture slots that make up that bake - - A BakeType - A list of texture slots that are inputs for the given bake - - - Contains the Event data returned from the data server from an AgentWearablesRequest - - - Construct a new instance of the AgentWearablesReplyEventArgs class - - - Contains the Event data returned from the data server from an AgentCachedTextureResponse - - - Construct a new instance of the AgentCachedBakesReplyEventArgs class - - - Contains the Event data returned from an AppearanceSetRequest - - - Indicates whether appearance setting was successful - - - - Triggered when appearance data is sent to the sim and - the main appearance thread is done. - Indicates whether appearance setting was successful - - - Contains the Event data returned from the data server from an RebakeAvatarTextures - - - The ID of the Texture Layer to bake - - - - Triggered when the simulator sends a request for this agent to rebake - its appearance - - The ID of the Texture Layer to bake - - - - Class that handles the local asset cache - - - - - Allows setting weather to periodicale prune the cache if it grows too big - Default is enabled, when caching is enabled - - - - - How long (in ms) between cache checks (default is 5 min.) - - - - - Default constructor - - A reference to the GridClient object - - - - Disposes cleanup timer - - - - - Only create timer when needed - - - - - Return bytes read from the local asset cache, null if it does not exist - - UUID of the asset we want to get - Raw bytes of the asset, or null on failure - - - - Returns ImageDownload object of the - image from the local image cache, null if it does not exist - - UUID of the image we want to get - ImageDownload object containing the image, or null on failure - - - - Constructs a file name of the cached asset - - UUID of the asset - String with the file name of the cahced asset - - - - Constructs a file name of the static cached asset - - UUID of the asset - String with the file name of the static cached asset - - - - Saves an asset to the local cache - - UUID of the asset - Raw bytes the asset consists of - Weather the operation was successfull - - - - Get the file name of the asset stored with gived UUID - - UUID of the asset - Null if we don't have that UUID cached on disk, file name if found in the cache folder - - - - Checks if the asset exists in the local cache - - UUID of the asset - True is the asset is stored in the cache, otherwise false - - - - Wipes out entire cache - - - - - Brings cache size to the 90% of the max size - - - - - Asynchronously brings cache size to the 90% of the max size - - - - - Adds up file sizes passes in a FileInfo array - - - - - Checks whether caching is enabled - - - - - Periodically prune the cache - - - - - Nicely formats file sizes - - Byte size we want to output - String with humanly readable file size - - - - Helper class for sorting files by their last accessed time - - - - - - - - - OK - - - Transfer completed - - - - - - - - - Unknown error occurred - - - Equivalent to a 404 error - - - Client does not have permission for that resource - - - Unknown status - - - - - - - - - - - Unknown - - - Virtually all asset transfers use this channel - - - - - - - - - - - Asset from the asset server - - - Inventory item - - - Estate asset, such as an estate covenant - - - - - - - - - - - - - - - - - - When requesting image download, type of the image requested - - - - Normal in-world object texture - - - Avatar texture - - - Server baked avatar texture - - - - Image file format - - - - - - - - - Number of milliseconds passed since the last transfer - packet was received - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Number of milliseconds to wait for a transfer header packet if out of order data was received - - - - Callback used for various asset download requests - - Transfer information - Downloaded asset, null on fail - - - - Callback used upon competition of baked texture upload - - Asset UUID of the newly uploaded baked texture - - - - A callback that fires upon the completition of the RequestMesh call - - Was the download successfull - Resulting mesh or null on problems - - - The event subscribers. null if no subcribers - - - Raises the XferReceived event - A XferReceivedEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds sends - - - The event subscribers. null if no subcribers - - - Raises the AssetUploaded event - A AssetUploadedEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised during upload completes - - - The event subscribers. null if no subcribers - - - Raises the UploadProgress event - A UploadProgressEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised during upload with progres update - - - The event subscribers. null if no subcribers - - - Raises the InitiateDownload event - A InitiateDownloadEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Fired when the simulator sends an InitiateDownloadPacket, used to download terrain .raw files - - - The event subscribers. null if no subcribers - - - Raises the ImageReceiveProgress event - A ImageReceiveProgressEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Fired when a texture is in the process of being downloaded by the TexturePipeline class - - - Texture download cache - - - - Default constructor - - A reference to the GridClient object - - - - Request an asset download - - Asset UUID - Asset type, must be correct for the transfer to succeed - Whether to give this transfer an elevated priority - The callback to fire when the simulator responds with the asset data - - - - Request an asset download - - Asset UUID - Asset type, must be correct for the transfer to succeed - Whether to give this transfer an elevated priority - Source location of the requested asset - The callback to fire when the simulator responds with the asset data - - - - Request an asset download - - Asset UUID - Asset type, must be correct for the transfer to succeed - Whether to give this transfer an elevated priority - Source location of the requested asset - UUID of the transaction - The callback to fire when the simulator responds with the asset data - - - - Request an asset download - - Asset UUID - Asset type, must be correct for the transfer to succeed - Whether to give this transfer an elevated priority - Source location of the requested asset - UUID of the transaction - The callback to fire when the simulator responds with the asset data - - - - Request an asset download through the almost deprecated Xfer system - - Filename of the asset to request - Whether or not to delete the asset - off the server after it is retrieved - Use large transfer packets or not - UUID of the file to request, if filename is - left empty - Asset type of vFileID, or - AssetType.Unknown if filename is not empty - Sets the FilePath in the request to Cache - (4) if true, otherwise Unknown (0) is used - - - - - - - Use UUID.Zero if you do not have the - asset ID but have all the necessary permissions - The item ID of this asset in the inventory - Use UUID.Zero if you are not requesting an - asset from an object inventory - The owner of this asset - Asset type - Whether to prioritize this asset download or not - - - - - Used to force asset data into the PendingUpload property, ie: for raw terrain uploads - - An AssetUpload object containing the data to upload to the simulator - - - - Request an asset be uploaded to the simulator - - The Object containing the asset data - If True, the asset once uploaded will be stored on the simulator - in which the client was connected in addition to being stored on the asset server - The of the transfer, can be used to correlate the upload with - events being fired - - - - Request an asset be uploaded to the simulator - - The of the asset being uploaded - A byte array containing the encoded asset data - If True, the asset once uploaded will be stored on the simulator - in which the client was connected in addition to being stored on the asset server - The of the transfer, can be used to correlate the upload with - events being fired - - - - Request an asset be uploaded to the simulator - - - Asset type to upload this data as - A byte array containing the encoded asset data - If True, the asset once uploaded will be stored on the simulator - in which the client was connected in addition to being stored on the asset server - The of the transfer, can be used to correlate the upload with - events being fired - - - - Initiate an asset upload - - The ID this asset will have if the - upload succeeds - Asset type to upload this data as - Raw asset data to upload - Whether to store this asset on the local - simulator or the grid-wide asset server - The tranaction id for the upload - The transaction ID of this transfer - - - - Request a texture asset from the simulator using the system to - manage the requests and re-assemble the image from the packets received from the simulator - - The of the texture asset to download - The of the texture asset. - Use for most textures, or for baked layer texture assets - A float indicating the requested priority for the transfer. Higher priority values tell the simulator - to prioritize the request before lower valued requests. An image already being transferred using the can have - its priority changed by resending the request with the new priority value - Number of quality layers to discard. - This controls the end marker of the data sent. Sending with value -1 combined with priority of 0 cancels an in-progress - transfer. - A bug exists in the Linden Simulator where a -1 will occasionally be sent with a non-zero priority - indicating an off-by-one error. - The packet number to begin the request at. A value of 0 begins the request - from the start of the asset texture - The callback to fire when the image is retrieved. The callback - will contain the result of the request and the texture asset data - If true, the callback will be fired for each chunk of the downloaded image. - The callback asset parameter will contain all previously received chunks of the texture asset starting - from the beginning of the request - - Request an image and fire a callback when the request is complete - - Client.Assets.RequestImage(UUID.Parse("c307629f-e3a1-4487-5e88-0d96ac9d4965"), ImageType.Normal, TextureDownloader_OnDownloadFinished); - - private void TextureDownloader_OnDownloadFinished(TextureRequestState state, AssetTexture asset) - { - if(state == TextureRequestState.Finished) - { - Console.WriteLine("Texture {0} ({1} bytes) has been successfully downloaded", - asset.AssetID, - asset.AssetData.Length); - } - } - - Request an image and use an inline anonymous method to handle the downloaded texture data - - Client.Assets.RequestImage(UUID.Parse("c307629f-e3a1-4487-5e88-0d96ac9d4965"), ImageType.Normal, delegate(TextureRequestState state, AssetTexture asset) - { - if(state == TextureRequestState.Finished) - { - Console.WriteLine("Texture {0} ({1} bytes) has been successfully downloaded", - asset.AssetID, - asset.AssetData.Length); - } - } - ); - - Request a texture, decode the texture to a bitmap image and apply it to a imagebox - - Client.Assets.RequestImage(UUID.Parse("c307629f-e3a1-4487-5e88-0d96ac9d4965"), ImageType.Normal, TextureDownloader_OnDownloadFinished); - - private void TextureDownloader_OnDownloadFinished(TextureRequestState state, AssetTexture asset) - { - if(state == TextureRequestState.Finished) - { - ManagedImage imgData; - Image bitmap; - - if (state == TextureRequestState.Finished) - { - OpenJPEG.DecodeToImage(assetTexture.AssetData, out imgData, out bitmap); - picInsignia.Image = bitmap; - } - } - } - - - - - - Overload: Request a texture asset from the simulator using the system to - manage the requests and re-assemble the image from the packets received from the simulator - - The of the texture asset to download - The callback to fire when the image is retrieved. The callback - will contain the result of the request and the texture asset data - - - - Overload: Request a texture asset from the simulator using the system to - manage the requests and re-assemble the image from the packets received from the simulator - - The of the texture asset to download - The of the texture asset. - Use for most textures, or for baked layer texture assets - The callback to fire when the image is retrieved. The callback - will contain the result of the request and the texture asset data - - - - Overload: Request a texture asset from the simulator using the system to - manage the requests and re-assemble the image from the packets received from the simulator - - The of the texture asset to download - The of the texture asset. - Use for most textures, or for baked layer texture assets - The callback to fire when the image is retrieved. The callback - will contain the result of the request and the texture asset data - If true, the callback will be fired for each chunk of the downloaded image. - The callback asset parameter will contain all previously received chunks of the texture asset starting - from the beginning of the request - - - - Cancel a texture request - - The texture assets - - - - Requests download of a mesh asset - - UUID of the mesh asset - Callback when the request completes - - - - Fetach avatar texture on a grid capable of server side baking - - ID of the avatar - ID of the texture - Name of the part of the avatar texture applies to - Callback invoked on operation completion - - - - Lets TexturePipeline class fire the progress event - - The texture ID currently being downloaded - the number of bytes transferred - the total number of bytes expected - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Xfer data - - - Upload data - - - Filename used on the simulator - - - Filename used by the client - - - UUID of the image that is in progress - - - Number of bytes received so far - - - Image size in bytes - - - - Avatar profile flags - - - - - Represents an avatar (other than your own) - - - - - Positive and negative ratings - - - - Positive ratings for Behavior - - - Negative ratings for Behavior - - - Positive ratings for Appearance - - - Negative ratings for Appearance - - - Positive ratings for Building - - - Negative ratings for Building - - - Positive ratings given by this avatar - - - Negative ratings given by this avatar - - - - Avatar properties including about text, profile URL, image IDs and - publishing settings - - - - First Life about text - - - First Life image ID - - - - - - - - - - - - - - - Profile image ID - - - Flags of the profile - - - Web URL for this profile - - - Should this profile be published on the web - - - Avatar Online Status - - - Is this a mature profile - - - - - - - - - - Avatar interests including spoken languages, skills, and "want to" - choices - - - - Languages profile field - - - - - - - - - - - - - - - Groups that this avatar is a member of - - - Positive and negative ratings - - - Avatar properties including about text, profile URL, image IDs and - publishing settings - - - Avatar interests including spoken languages, skills, and "want to" - choices - - - Movement control flags for avatars. Typically not set or used by - clients. To move your avatar, use Client.Self.Movement instead - - - - Contains the visual parameters describing the deformation of the avatar - - - - - Appearance version. Value greater than 0 indicates using server side baking - - - - - Version of the Current Outfit Folder that the appearance is based on - - - - - Appearance flags. Introduced with server side baking, currently unused. - - - - - List of current avatar animations - - - - First name - - - Last name - - - Full name - - - Active group - - - - Default constructor - - - - Information about agents display name - - - Agent UUID - - - Username - - - Display name - - - First name (legacy) - - - Last name (legacy) - - - Full name (legacy) - - - Is display name default display name - - - Cache display name until - - - Last updated timestamp - - - - Creates AgentDisplayName object from OSD - - Incoming OSD data - AgentDisplayName object - - - - Return object as OSD map - - OSD containing agent's display name data - - - - Holds group information for Avatars such as those you might find in a profile - - - - true of Avatar accepts group notices - - - Groups Key - - - Texture Key for groups insignia - - - Name of the group - - - Powers avatar has in the group - - - Avatars Currently selected title - - - true of Avatar has chosen to list this in their profile - - - - Contains an animation currently being played by an agent - - - - The ID of the animation asset - - - A number to indicate start order of currently playing animations - On Linden Grids this number is unique per region, with OpenSim it is per client - - - - - - - Holds group information on an individual profile pick - - - - - Retrieve friend status notifications, and retrieve avatar names and - profiles - - - - The event subscribers, null of no subscribers - - - Raises the AvatarAnimation Event - An AvatarAnimationEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - an agents animation playlist - - - The event subscribers, null of no subscribers - - - Raises the AvatarAppearance Event - A AvatarAppearanceEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - the appearance information for an agent - - - The event subscribers, null of no subscribers - - - Raises the UUIDNameReply Event - A UUIDNameReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - agent names/id values - - - The event subscribers, null of no subscribers - - - Raises the AvatarInterestsReply Event - A AvatarInterestsReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - the interests listed in an agents profile - - - The event subscribers, null of no subscribers - - - Raises the AvatarPropertiesReply Event - A AvatarPropertiesReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - profile property information for an agent - - - The event subscribers, null of no subscribers - - - Raises the AvatarGroupsReply Event - A AvatarGroupsReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - the group membership an agent is a member of - - - The event subscribers, null of no subscribers - - - Raises the AvatarPickerReply Event - A AvatarPickerReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - name/id pair - - - The event subscribers, null of no subscribers - - - Raises the ViewerEffectPointAt Event - A ViewerEffectPointAtEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - the objects and effect when an agent is pointing at - - - The event subscribers, null of no subscribers - - - Raises the ViewerEffectLookAt Event - A ViewerEffectLookAtEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - the objects and effect when an agent is looking at - - - The event subscribers, null of no subscribers - - - Raises the ViewerEffect Event - A ViewerEffectEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - an agents viewer effect information - - - The event subscribers, null of no subscribers - - - Raises the AvatarPicksReply Event - A AvatarPicksReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - the top picks from an agents profile - - - The event subscribers, null of no subscribers - - - Raises the PickInfoReply Event - A PickInfoReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - the Pick details - - - The event subscribers, null of no subscribers - - - Raises the AvatarClassifiedReply Event - A AvatarClassifiedReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - the classified ads an agent has placed - - - The event subscribers, null of no subscribers - - - Raises the ClassifiedInfoReply Event - A ClassifiedInfoReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - the details of a classified ad - - - The event subscribers, null of no subscribers - - - Raises the DisplayNameUpdate Event - A DisplayNameUpdateEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - the details of display name change - - - - Callback giving results when fetching display names - - If the request was successful - Array of display names - Array of UUIDs that could not be fetched - - - - Represents other avatars - - - - - Tracks the specified avatar on your map - Avatar ID to track - - - - Request a single avatar name - - The avatar key to retrieve a name for - - - - Request a list of avatar names - - The avatar keys to retrieve names for - - - - Check if Display Names functionality is available - - True if Display name functionality is available - - - - Request retrieval of display names (max 90 names per request) - - List of UUIDs to lookup - Callback to report result of the operation - - - - Start a request for Avatar Properties - - - - - - Search for an avatar (first name, last name) - - The name to search for - An ID to associate with this query - - - - Start a request for Avatar Picks - - UUID of the avatar - - - - Start a request for Avatar Classifieds - - UUID of the avatar - - - - Start a request for details of a specific profile pick - - UUID of the avatar - UUID of the profile pick - - - - Start a request for details of a specific profile classified - - UUID of the avatar - UUID of the profile classified - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - - EQ Message fired when someone nearby changes their display name - - The message key - the IMessage object containing the deserialized data sent from the simulator - The which originated the packet - - - - Crossed region handler for message that comes across the EventQueue. Sent to an agent - when the agent crosses a sim border into a new region. - - The message key - the IMessage object containing the deserialized data sent from the simulator - The which originated the packet - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Provides data for the event - The event occurs when the simulator sends - the animation playlist for an agent - - The following code example uses the and - properties to display the animation playlist of an avatar on the window. - - // subscribe to the event - Client.Avatars.AvatarAnimation += Avatars_AvatarAnimation; - - private void Avatars_AvatarAnimation(object sender, AvatarAnimationEventArgs e) - { - // create a dictionary of "known" animations from the Animations class using System.Reflection - Dictionary<UUID, string> systemAnimations = new Dictionary<UUID, string>(); - Type type = typeof(Animations); - System.Reflection.FieldInfo[] fields = type.GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static); - foreach (System.Reflection.FieldInfo field in fields) - { - systemAnimations.Add((UUID)field.GetValue(type), field.Name); - } - - // find out which animations being played are known animations and which are assets - foreach (Animation animation in e.Animations) - { - if (systemAnimations.ContainsKey(animation.AnimationID)) - { - Console.WriteLine("{0} is playing {1} ({2}) sequence {3}", e.AvatarID, - systemAnimations[animation.AnimationID], animation.AnimationSequence); - } - else - { - Console.WriteLine("{0} is playing {1} (Asset) sequence {2}", e.AvatarID, - animation.AnimationID, animation.AnimationSequence); - } - } - } - - - - - Get the ID of the agent - - - Get the list of animations to start - - - - Construct a new instance of the AvatarAnimationEventArgs class - - The ID of the agent - The list of animations to start - - - Provides data for the event - The event occurs when the simulator sends - the appearance data for an avatar - - The following code example uses the and - properties to display the selected shape of an avatar on the window. - - // subscribe to the event - Client.Avatars.AvatarAppearance += Avatars_AvatarAppearance; - - // handle the data when the event is raised - void Avatars_AvatarAppearance(object sender, AvatarAppearanceEventArgs e) - { - Console.WriteLine("The Agent {0} is using a {1} shape.", e.AvatarID, (e.VisualParams[31] > 0) : "male" ? "female") - } - - - - - Get the Simulator this request is from of the agent - - - Get the ID of the agent - - - true if the agent is a trial account - - - Get the default agent texture - - - Get the agents appearance layer textures - - - Get the for the agent - - - Version of the appearance system used. - Value greater than 0 indicates that server side baking is used - - - Version of the Current Outfit Folder the appearance is based on - - - Appearance flags, introduced with server side baking, currently unused - - - - Construct a new instance of the AvatarAppearanceEventArgs class - - The simulator request was from - The ID of the agent - true of the agent is a trial account - The default agent texture - The agents appearance layer textures - The for the agent - - - Represents the interests from the profile of an agent - - - Get the ID of the agent - - - The properties of an agent - - - Get the ID of the agent - - - Get the ID of the agent - - - Get the ID of the agent - - - Get the ID of the avatar - - - - Event args class for display name notification messages - - - - - Wrapper around a byte array that allows bit to be packed and unpacked - one at a time or by a variable amount. Useful for very tightly packed - data like LayerData packets - - - - - - - - - - - - - - Default constructor, initialize the bit packer / bit unpacker - with a byte array and starting position - - Byte array to pack bits in to or unpack from - Starting position in the byte array - - - - Pack a floating point value in to the data - - Floating point value to pack - - - - Pack part or all of an integer in to the data - - Integer containing the data to pack - Number of bits of the integer to pack - - - - Pack part or all of an unsigned integer in to the data - - Unsigned integer containing the data to pack - Number of bits of the integer to pack - - - - Pack a single bit in to the data - - Bit to pack - - - - - - - - - - - - - - - - - - - - - - - - - Unpacking a floating point value from the data - - Unpacked floating point value - - - - Unpack a variable number of bits from the data in to integer format - - Number of bits to unpack - An integer containing the unpacked bits - This function is only useful up to 32 bits - - - - Unpack a variable number of bits from the data in to unsigned - integer format - - Number of bits to unpack - An unsigned integer containing the unpacked bits - This function is only useful up to 32 bits - - - - Unpack a 16-bit signed integer - - 16-bit signed integer - - - - Unpack a 16-bit unsigned integer - - 16-bit unsigned integer - - - - Unpack a 32-bit signed integer - - 32-bit signed integer - - - - Unpack a 32-bit unsigned integer - - 32-bit unsigned integer - - - - Reads in a byte array of an Animation Asset created by the SecondLife(tm) client. - - - - - Rotation Keyframe count (used internally) - - - - - Position Keyframe count (used internally) - - - - - Animation Priority - - - - - The animation length in seconds. - - - - - Expression set in the client. Null if [None] is selected - - - - - The time in seconds to start the animation - - - - - The time in seconds to end the animation - - - - - Loop the animation - - - - - Meta data. Ease in Seconds. - - - - - Meta data. Ease out seconds. - - - - - Meta Data for the Hand Pose - - - - - Number of joints defined in the animation - - - - - Contains an array of joints - - - - - Searialize an animation asset into it's joints/keyframes/meta data - - - - - - Variable length strings seem to be null terminated in the animation asset.. but.. - use with caution, home grown. - advances the index. - - The animation asset byte array - The offset to start reading - a string - - - - Read in a Joint from an animation asset byte array - Variable length Joint fields, yay! - Advances the index - - animation asset byte array - Byte Offset of the start of the joint - The Joint data serialized into the binBVHJoint structure - - - - Read Keyframes of a certain type - advance i - - Animation Byte array - Offset in the Byte Array. Will be advanced - Number of Keyframes - Scaling Min to pass to the Uint16ToFloat method - Scaling Max to pass to the Uint16ToFloat method - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . - The parameter is null. - 2 - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - 2 - - - - A Joint and it's associated meta data and keyframes - - - - - Indicates whether this instance and a specified object are equal. - - - true if and this instance are the same type and represent the same value; otherwise, false. - - Another object to compare to. - 2 - - - - Returns the hash code for this instance. - - - A 32-bit signed integer that is the hash code for this instance. - - 2 - - - - Name of the Joint. Matches the avatar_skeleton.xml in client distros - - - - - Joint Animation Override? Was the same as the Priority in testing.. - - - - - Array of Rotation Keyframes in order from earliest to latest - - - - - Array of Position Keyframes in order from earliest to latest - This seems to only be for the Pelvis? - - - - - Custom application data that can be attached to a joint - - - - - A Joint Keyframe. This is either a position or a rotation. - - - - - Either a Vector3 position or a Vector3 Euler rotation - - - - - Poses set in the animation metadata for the hands. - - - - - Capabilities is the name of the bi-directional HTTP REST protocol - used to communicate non real-time transactions such as teleporting or - group messaging - - - - - Triggered when an event is received via the EventQueueGet - capability - - Event name - Decoded event data - The simulator that generated the event - - - Reference to the simulator this system is connected to - - - Capabilities URI this system was initialized with - - - Whether the capabilities event queue is connected and - listening for incoming events - - - - Default constructor - - - - - - - Request the URI of a named capability - - Name of the capability to request - The URI of the requested capability, or String.Empty if - the capability does not exist - - - - Process any incoming events, check to see if we have a message created for the event, - - - - - - - Attempts to convert an LLSD structure to a known Packet type - - Event name, this must match an actual - packet name for a Packet to be successfully built - LLSD to convert to a Packet - A Packet on success, otherwise null - - - - A custom decoder callback - - The key of the object - the data to decode - A string represending the fieldData - - - - Add a custom decoder callback - - The key of the field to decode - The custom decode handler - - - - Remove a custom decoder callback - - The key of the field to decode - The custom decode handler - - - - Creates a formatted string containing the values of a Packet - - The Packet - A formatted string of values of the nested items in the Packet object - - - - Decode an IMessage object into a beautifully formatted string - - The IMessage object - Recursion level (used for indenting) - A formatted string containing the names and values of the source object - - - - Thrown when a packet could not be successfully deserialized - - - - - Default constructor - - - - - Constructor that takes an additional error message - - An error message to attach to this exception - - - - The header of a message template packet. Holds packet flags, sequence - number, packet ID, and any ACKs that will be appended at the end of - the packet - - - - - Convert the AckList to a byte array, used for packet serializing - - Reference to the target byte array - Beginning position to start writing to in the byte - array, will be updated with the ending position of the ACK list - - - - - - - - - - - - - - - - - - - - - A block of data in a packet. Packets are composed of one or more blocks, - each block containing one or more fields - - - - Current length of the data in this packet - - - - Create a block from a byte array - - Byte array containing the serialized block - Starting position of the block in the byte array. - This will point to the data after the end of the block when the - call returns - - - - Serialize this block into a byte array - - Byte array to serialize this block into - Starting position in the byte array to serialize to. - This will point to the position directly after the end of the - serialized block when the call returns - - - A generic value, not an actual packet type - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Origin position of this coordinate frame - - - X axis of this coordinate frame, or Forward/At in grid terms - - - Y axis of this coordinate frame, or Left in grid terms - - - Z axis of this coordinate frame, or Up in grid terms - - - - - - Looking direction, must be a normalized vector - Up direction, must be a normalized vector - - - - Align the coordinate frame X and Y axis with a given rotation - around the Z axis in radians - - Absolute rotation around the Z axis in - radians - - - - Access to the data server which allows searching for land, events, people, etc - - - - Classified Ad categories - - - Classified is listed in the Any category - - - Classified is shopping related - - - Classified is - - - - - - - - - - - - - - - - - - - - - - - - Event Categories - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Query Flags used in many of the DirectoryManager methods to specify which query to execute and how to return the results. - - Flags can be combined using the | (pipe) character, not all flags are available in all queries - - - - Query the People database - - - - - - - - - Query the Groups database - - - Query the Events database - - - Query the land holdings database for land owned by the currently connected agent - - - - - - Query the land holdings database for land which is owned by a Group - - - Specifies the query should pre sort the results based upon traffic - when searching the Places database - - - - - - - - - - - - - - - Specifies the query should pre sort the results in an ascending order when searching the land sales database. - This flag is only used when searching the land sales database - - - Specifies the query should pre sort the results using the SalePrice field when searching the land sales database. - This flag is only used when searching the land sales database - - - Specifies the query should pre sort the results by calculating the average price/sq.m (SalePrice / Area) when searching the land sales database. - This flag is only used when searching the land sales database - - - Specifies the query should pre sort the results using the ParcelSize field when searching the land sales database. - This flag is only used when searching the land sales database - - - Specifies the query should pre sort the results using the Name field when searching the land sales database. - This flag is only used when searching the land sales database - - - When set, only parcels less than the specified Price will be included when searching the land sales database. - This flag is only used when searching the land sales database - - - When set, only parcels greater than the specified Size will be included when searching the land sales database. - This flag is only used when searching the land sales database - - - - - - - - - Include PG land in results. This flag is used when searching both the Groups, Events and Land sales databases - - - Include Mature land in results. This flag is used when searching both the Groups, Events and Land sales databases - - - Include Adult land in results. This flag is used when searching both the Groups, Events and Land sales databases - - - - - - - Land types to search dataserver for - - - - Search Auction, Mainland and Estate - - - Land which is currently up for auction - - - Parcels which are on the mainland (Linden owned) continents - - - Parcels which are on privately owned simulators - - - - The content rating of the event - - - - Event is PG - - - Event is Mature - - - Event is Adult - - - - Classified Ad Options - - There appear to be two formats the flags are packed in. - This set of flags is for the newer style - - - - - - - - - - - - - - - - - - - Classified ad query options - - - - Include all ads in results - - - Include PG ads in results - - - Include Mature ads in results - - - Include Adult ads in results - - - - The For Sale flag in PlacesReplyData - - - - Parcel is not listed for sale - - - Parcel is For Sale - - - - A classified ad on the grid - - - - UUID for this ad, useful for looking up detailed - information about it - - - The title of this classified ad - - - Flags that show certain options applied to the classified - - - Creation date of the ad - - - Expiration date of the ad - - - Price that was paid for this ad - - - Print the struct data as a string - A string containing the field name, and field value - - - - A parcel retrieved from the dataserver such as results from the - "For-Sale" listings or "Places" Search - - - - The unique dataserver parcel ID - This id is used to obtain additional information from the entry - by using the method - - - A string containing the name of the parcel - - - The size of the parcel - This field is not returned for Places searches - - - The price of the parcel - This field is not returned for Places searches - - - If True, this parcel is flagged to be auctioned - - - If true, this parcel is currently set for sale - - - Parcel traffic - - - Print the struct data as a string - A string containing the field name, and field value - - - - An Avatar returned from the dataserver - - - - Online status of agent - This field appears to be obsolete and always returns false - - - The agents first name - - - The agents last name - - - The agents - - - Print the struct data as a string - A string containing the field name, and field value - - - - Response to a "Groups" Search - - - - The Group ID - - - The name of the group - - - The current number of members - - - Print the struct data as a string - A string containing the field name, and field value - - - - Parcel information returned from a request - - Represents one of the following: - A parcel of land on the grid that has its Show In Search flag set - A parcel of land owned by the agent making the request - A parcel of land owned by a group the agent making the request is a member of - - - In a request for Group Land, the First record will contain an empty record - - Note: This is not the same as searching the land for sale data source - - - - The ID of the Agent of Group that owns the parcel - - - The name - - - The description - - - The Size of the parcel - - - The billable Size of the parcel, for mainland - parcels this will match the ActualArea field. For Group owned land this will be 10 percent smaller - than the ActualArea. For Estate land this will always be 0 - - - Indicates the ForSale status of the parcel - - - The Gridwide X position - - - The Gridwide Y position - - - The Z position of the parcel, or 0 if no landing point set - - - The name of the Region the parcel is located in - - - The Asset ID of the parcels Snapshot texture - - - The calculated visitor traffic - - - The billing product SKU - Known values are: - - 023Mainland / Full Region - 024Estate / Full Region - 027Estate / Openspace - 029Estate / Homestead - 129Mainland / Homestead (Linden Owned) - - - - - No longer used, will always be 0 - - - Get a SL URL for the parcel - A string, containing a standard SLURL - - - Print the struct data as a string - A string containing the field name, and field value - - - - An "Event" Listing summary - - - - The ID of the event creator - - - The name of the event - - - The events ID - - - A string containing the short date/time the event will begin - - - The event start time in Unixtime (seconds since epoch) - - - The events maturity rating - - - Print the struct data as a string - A string containing the field name, and field value - - - - The details of an "Event" - - - - The events ID - - - The ID of the event creator - - - The name of the event - - - The category - - - The events description - - - The short date/time the event will begin - - - The event start time in Unixtime (seconds since epoch) UTC adjusted - - - The length of the event in minutes - - - 0 if no cover charge applies - - - The cover charge amount in L$ if applicable - - - The name of the region where the event is being held - - - The gridwide location of the event - - - The maturity rating - - - Get a SL URL for the parcel where the event is hosted - A string, containing a standard SLURL - - - Print the struct data as a string - A string containing the field name, and field value - - - The event subscribers. null if no subcribers - - - Raises the EventInfoReply event - An EventInfoReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the DirEventsReply event - An DirEventsReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the PlacesReply event - A PlacesReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the DirPlacesReply event - A DirPlacesReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the DirClassifiedsReply event - A DirClassifiedsReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the DirGroupsReply event - A DirGroupsReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the DirPeopleReply event - A DirPeopleReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the DirLandReply event - A DirLandReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - - Constructs a new instance of the DirectoryManager class - - An instance of GridClient - - - - Query the data server for a list of classified ads containing the specified string. - Defaults to searching for classified placed in any category, and includes PG, Adult and Mature - results. - - Responses are sent 16 per response packet, there is no way to know how many results a query reply will contain however assuming - the reply packets arrived ordered, a response with less than 16 entries would indicate all results have been received - - The event is raised when a response is received from the simulator - - A string containing a list of keywords to search for - A UUID to correlate the results when the event is raised - - - - Query the data server for a list of classified ads which contain specified keywords (Overload) - - The event is raised when a response is received from the simulator - - A string containing a list of keywords to search for - The category to search - A set of flags which can be ORed to modify query options - such as classified maturity rating. - A UUID to correlate the results when the event is raised - - Search classified ads containing the key words "foo" and "bar" in the "Any" category that are either PG or Mature - - UUID searchID = StartClassifiedSearch("foo bar", ClassifiedCategories.Any, ClassifiedQueryFlags.PG | ClassifiedQueryFlags.Mature); - - - - Responses are sent 16 at a time, there is no way to know how many results a query reply will contain however assuming - the reply packets arrived ordered, a response with less than 16 entries would indicate all results have been received - - - - - Starts search for places (Overloaded) - - The event is raised when a response is received from the simulator - - Search text - Each request is limited to 100 places - being returned. To get the first 100 result entries of a request use 0, - from 100-199 use 1, 200-299 use 2, etc. - A UUID to correlate the results when the event is raised - - - - Queries the dataserver for parcels of land which are flagged to be shown in search - - The event is raised when a response is received from the simulator - - A string containing a list of keywords to search for separated by a space character - A set of flags which can be ORed to modify query options - such as classified maturity rating. - The category to search - Each request is limited to 100 places - being returned. To get the first 100 result entries of a request use 0, - from 100-199 use 1, 200-299 use 2, etc. - A UUID to correlate the results when the event is raised - - Search places containing the key words "foo" and "bar" in the "Any" category that are either PG or Adult - - UUID searchID = StartDirPlacesSearch("foo bar", DirFindFlags.DwellSort | DirFindFlags.IncludePG | DirFindFlags.IncludeAdult, ParcelCategory.Any, 0); - - - - Additional information on the results can be obtained by using the ParcelManager.InfoRequest method - - - - - Starts a search for land sales using the directory - - The event is raised when a response is received from the simulator - - What type of land to search for. Auction, - estate, mainland, "first land", etc - The OnDirLandReply event handler must be registered before - calling this function. There is no way to determine how many - results will be returned, or how many times the callback will be - fired other than you won't get more than 100 total parcels from - each query. - - - - Starts a search for land sales using the directory - - The event is raised when a response is received from the simulator - - What type of land to search for. Auction, - estate, mainland, "first land", etc - Maximum price to search for - Maximum area to search for - Each request is limited to 100 parcels - being returned. To get the first 100 parcels of a request use 0, - from 100-199 use 1, 200-299 use 2, etc. - The OnDirLandReply event handler must be registered before - calling this function. There is no way to determine how many - results will be returned, or how many times the callback will be - fired other than you won't get more than 100 total parcels from - each query. - - - - Send a request to the data server for land sales listings - - - Flags sent to specify query options - - Available flags: - Specify the parcel rating with one or more of the following: - IncludePG IncludeMature IncludeAdult - - Specify the field to pre sort the results with ONLY ONE of the following: - PerMeterSort NameSort AreaSort PricesSort - - Specify the order the results are returned in, if not specified the results are pre sorted in a Descending Order - SortAsc - - Specify additional filters to limit the results with one or both of the following: - LimitByPrice LimitByArea - - Flags can be combined by separating them with the | (pipe) character - - Additional details can be found in - - What type of land to search for. Auction, - Estate or Mainland - Maximum price to search for when the - DirFindFlags.LimitByPrice flag is specified in findFlags - Maximum area to search for when the - DirFindFlags.LimitByArea flag is specified in findFlags - Each request is limited to 100 parcels - being returned. To get the first 100 parcels of a request use 0, - from 100-199 use 100, 200-299 use 200, etc. - The event will be raised with the response from the simulator - - There is no way to determine how many results will be returned, or how many times the callback will be - fired other than you won't get more than 100 total parcels from - each reply. - - Any land set for sale to either anybody or specific to the connected agent will be included in the - results if the land is included in the query - - - // request all mainland, any maturity rating that is larger than 512 sq.m - StartLandSearch(DirFindFlags.SortAsc | DirFindFlags.PerMeterSort | DirFindFlags.LimitByArea | DirFindFlags.IncludePG | DirFindFlags.IncludeMature | DirFindFlags.IncludeAdult, SearchTypeFlags.Mainland, 0, 512, 0); - - - - - Search for Groups - - The name or portion of the name of the group you wish to search for - Start from the match number - - - - - Search for Groups - - The name or portion of the name of the group you wish to search for - Start from the match number - Search flags - - - - - Search the People directory for other avatars - - The name or portion of the name of the avatar you wish to search for - - - - - - Search Places for parcels of land you personally own - - - - - Searches Places for land owned by the specified group - - ID of the group you want to recieve land list for (You must be a member of the group) - Transaction (Query) ID which can be associated with results from your request. - - - - Search the Places directory for parcels that are listed in search and contain the specified keywords - - A string containing the keywords to search for - Transaction (Query) ID which can be associated with results from your request. - - - - Search Places - All Options - - One of the Values from the DirFindFlags struct, ie: AgentOwned, GroupOwned, etc. - One of the values from the SearchCategory Struct, ie: Any, Linden, Newcomer - A string containing a list of keywords to search for separated by a space character - String Simulator Name to search in - LLUID of group you want to recieve results for - Transaction (Query) ID which can be associated with results from your request. - Transaction (Query) ID which can be associated with results from your request. - - - - Search All Events with specifid searchText in all categories, includes PG, Mature and Adult - - A string containing a list of keywords to search for separated by a space character - Each request is limited to 100 entries - being returned. To get the first group of entries of a request use 0, - from 100-199 use 100, 200-299 use 200, etc. - UUID of query to correlate results in callback. - - - - Search Events - - A string containing a list of keywords to search for separated by a space character - One or more of the following flags: DateEvents, IncludePG, IncludeMature, IncludeAdult - from the Enum - - Multiple flags can be combined by separating the flags with the | (pipe) character - "u" for in-progress and upcoming events, -or- number of days since/until event is scheduled - For example "0" = Today, "1" = tomorrow, "2" = following day, "-1" = yesterday, etc. - Each request is limited to 100 entries - being returned. To get the first group of entries of a request use 0, - from 100-199 use 100, 200-299 use 200, etc. - EventCategory event is listed under. - UUID of query to correlate results in callback. - - - Requests Event Details - ID of Event returned from the method - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming event message - The Unique Capabilities Key - The event message containing the data - The simulator the message originated from - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming event message - The Unique Capabilities Key - The event message containing the data - The simulator the message originated from - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Contains the Event data returned from the data server from an EventInfoRequest - - - - A single EventInfo object containing the details of an event - - - - Construct a new instance of the EventInfoReplyEventArgs class - A single EventInfo object containing the details of an event - - - Contains the "Event" detail data returned from the data server - - - The ID returned by - - - A list of "Events" returned by the data server - - - Construct a new instance of the DirEventsReplyEventArgs class - The ID of the query returned by the data server. - This will correlate to the ID returned by the method - A list containing the "Events" returned by the search query - - - Contains the "Event" list data returned from the data server - - - The ID returned by - - - A list of "Places" returned by the data server - - - Construct a new instance of PlacesReplyEventArgs class - The ID of the query returned by the data server. - This will correlate to the ID returned by the method - A list containing the "Places" returned by the data server query - - - Contains the places data returned from the data server - - - The ID returned by - - - A list containing Places data returned by the data server - - - Construct a new instance of the DirPlacesReplyEventArgs class - The ID of the query returned by the data server. - This will correlate to the ID returned by the method - A list containing land data returned by the data server - - - Contains the classified data returned from the data server - - - A list containing Classified Ads returned by the data server - - - Construct a new instance of the DirClassifiedsReplyEventArgs class - A list of classified ad data returned from the data server - - - Contains the group data returned from the data server - - - The ID returned by - - - A list containing Groups data returned by the data server - - - Construct a new instance of the DirGroupsReplyEventArgs class - The ID of the query returned by the data server. - This will correlate to the ID returned by the method - A list of groups data returned by the data server - - - Contains the people data returned from the data server - - - The ID returned by - - - A list containing People data returned by the data server - - - Construct a new instance of the DirPeopleReplyEventArgs class - The ID of the query returned by the data server. - This will correlate to the ID returned by the method - A list of people data returned by the data server - - - Contains the land sales data returned from the data server - - - A list containing land forsale data returned by the data server - - - Construct a new instance of the DirLandReplyEventArgs class - A list of parcels for sale returned by the data server - - - - Represends individual HTTP Download request - - - - URI of the item to fetch - - - Timout specified in milliseconds - - - Download progress callback - - - Download completed callback - - - Accept the following content type - - - How many times will this request be retried - - - Current fetch attempt - - - Default constructor - - - Constructor - - - - Manages async HTTP downloads with a limit on maximum - concurrent downloads - - - - Maximum number of parallel downloads from a single endpoint - - - Client certificate - - - Default constructor - - - Cleanup method - - - Setup http download request - - - Check the queue for pending work - - - Enqueue a new HTTP download - - - Describes tasks returned in LandStatReply - - - - Estate level administration and utilities - - - - Textures for each of the four terrain height levels - - - Upper/lower texture boundaries for each corner of the sim - - - - Constructor for EstateTools class - - - - - Used in the ReportType field of a LandStatRequest - - - Used by EstateOwnerMessage packets - - - Used by EstateOwnerMessage packets - - - - - - - - No flags set - - - Only return targets scripted objects - - - Only return targets objects if on others land - - - Returns target's scripted objects and objects on other parcels - - - Ground texture settings for each corner of the region - - - Used by GroundTextureHeightSettings - - - The high and low texture thresholds for each corner of the sim - - - The event subscribers. null if no subcribers - - - Raises the TopCollidersReply event - A TopCollidersReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the TopScriptsReply event - A TopScriptsReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the EstateUsersReply event - A EstateUsersReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the EstateGroupsReply event - A EstateGroupsReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the EstateManagersReply event - A EstateManagersReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the EstateBansReply event - A EstateBansReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the EstateCovenantReply event - A EstateCovenantReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - The event subscribers. null if no subcribers - - - Raises the EstateUpdateInfoReply event - A EstateUpdateInfoReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the data server responds to a request. - - - - Requests estate information such as top scripts and colliders - - - - - - - - Requests estate settings, including estate manager and access/ban lists - - - Requests the "Top Scripts" list for the current region - - - Requests the "Top Colliders" list for the current region - - - - Set several estate specific configuration variables - - The Height of the waterlevel over the entire estate. Defaults to 20 - The maximum height change allowed above the baked terrain. Defaults to 4 - The minimum height change allowed below the baked terrain. Defaults to -4 - true to use - if True forces the sun position to the position in SunPosition - The current position of the sun on the estate, or when FixedSun is true the static position - the sun will remain. 6.0 = Sunrise, 30.0 = Sunset - - - - Request return of objects owned by specified avatar - - The Agents owning the primitives to return - specify the coverage and type of objects to be included in the return - true to perform return on entire estate - - - - - - - - - Used for setting and retrieving various estate panel settings - - EstateOwnerMessage Method field - List of parameters to include - - - - Kick an avatar from an estate - - Key of Agent to remove - - - - Ban an avatar from an estate - Key of Agent to remove - Ban user from this estate and all others owned by the estate owner - - - Unban an avatar from an estate - Key of Agent to remove - /// Unban user from this estate and all others owned by the estate owner - - - - Send a message dialog to everyone in an entire estate - - Message to send all users in the estate - - - - Send a message dialog to everyone in a simulator - - Message to send all users in the simulator - - - - Send an avatar back to their home location - - Key of avatar to send home - - - - Begin the region restart process - - - - - Cancels a region restart - - - - Estate panel "Region" tab settings - - - Estate panel "Debug" tab settings - - - Used for setting the region's terrain textures for its four height levels - - - - - - - Used for setting sim terrain texture heights - - - Requests the estate covenant - - - - Upload a terrain RAW file - - A byte array containing the encoded terrain data - The name of the file being uploaded - The Id of the transfer request - - - - Teleports all users home in current Estate - - - - - Remove estate manager - Key of Agent to Remove - removes manager to this estate and all others owned by the estate owner - - - - Add estate manager - Key of Agent to Add - Add agent as manager to this estate and all others owned by the estate owner - - - - Add's an agent to the estate Allowed list - Key of Agent to Add - Add agent as an allowed reisdent to All estates if true - - - - Removes an agent from the estate Allowed list - Key of Agent to Remove - Removes agent as an allowed reisdent from All estates if true - - - - - Add's a group to the estate Allowed list - Key of Group to Add - Add Group as an allowed group to All estates if true - - - - - Removes a group from the estate Allowed list - Key of Group to Remove - Removes Group as an allowed Group from All estates if true - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Raised on LandStatReply when the report type is for "top colliders" - - - - The number of returned items in LandStatReply - - - - - A Dictionary of Object UUIDs to tasks returned in LandStatReply - - - - Construct a new instance of the TopCollidersReplyEventArgs class - The number of returned items in LandStatReply - Dictionary of Object UUIDs to tasks returned in LandStatReply - - - Raised on LandStatReply when the report type is for "top Scripts" - - - - The number of scripts returned in LandStatReply - - - - - A Dictionary of Object UUIDs to tasks returned in LandStatReply - - - - Construct a new instance of the TopScriptsReplyEventArgs class - The number of returned items in LandStatReply - Dictionary of Object UUIDs to tasks returned in LandStatReply - - - Returned, along with other info, upon a successful .RequestInfo() - - - - The identifier of the estate - - - - - The number of returned itmes - - - - - List of UUIDs of Banned Users - - - - Construct a new instance of the EstateBansReplyEventArgs class - The estate's identifier on the grid - The number of returned items in LandStatReply - User UUIDs banned - - - Returned, along with other info, upon a successful .RequestInfo() - - - - The identifier of the estate - - - - - The number of returned items - - - - - List of UUIDs of Allowed Users - - - - Construct a new instance of the EstateUsersReplyEventArgs class - The estate's identifier on the grid - The number of users - Allowed users UUIDs - - - Returned, along with other info, upon a successful .RequestInfo() - - - - The identifier of the estate - - - - - The number of returned items - - - - - List of UUIDs of Allowed Groups - - - - Construct a new instance of the EstateGroupsReplyEventArgs class - The estate's identifier on the grid - The number of Groups - Allowed Groups UUIDs - - - Returned, along with other info, upon a successful .RequestInfo() - - - - The identifier of the estate - - - - - The number of returned items - - - - - List of UUIDs of the Estate's Managers - - - - Construct a new instance of the EstateManagersReplyEventArgs class - The estate's identifier on the grid - The number of Managers - Managers UUIDs - - - Returned, along with other info, upon a successful .RequestInfo() - - - - The Covenant - - - - - The timestamp - - - - - The Estate name - - - - - The Estate Owner's ID (can be a GroupID) - - - - Construct a new instance of the EstateCovenantReplyEventArgs class - The Covenant ID - The timestamp - The estate's name - The Estate Owner's ID (can be a GroupID) - - - Returned, along with other info, upon a successful .RequestInfo() - - - - The estate's name - - - - - The Estate Owner's ID (can be a GroupID) - - - - - The identifier of the estate on the grid - - - - - - - Construct a new instance of the EstateUpdateInfoReplyEventArgs class - The estate's name - The Estate Owners ID (can be a GroupID) - The estate's identifier on the grid - - - - - Registers, unregisters, and fires events generated by incoming packets - - - - - Object that is passed to worker threads in the ThreadPool for - firing packet callbacks - - - - Callback to fire for this packet - - - Reference to the simulator that this packet came from - - - The packet that needs to be processed - - - Reference to the GridClient object - - - - Default constructor - - - - - - Register an event handler - - Use PacketType.Default to fire this event on every - incoming packet - Packet type to register the handler for - Callback to be fired - True if this callback should be ran - asynchronously, false to run it synchronous - - - - Unregister an event handler - - Packet type to unregister the handler for - Callback to be unregistered - - - - Fire the events registered for this packet type - - Incoming packet type - Incoming packet - Simulator this packet was received from - - - - Registers, unregisters, and fires events generated by the Capabilities - event queue - - - - - Object that is passed to worker threads in the ThreadPool for - firing CAPS callbacks - - - - Callback to fire for this packet - - - Name of the CAPS event - - - Strongly typed decoded data - - - Reference to the simulator that generated this event - - - Reference to the GridClient object - - - - Default constructor - - Reference to the GridClient object - - - - Register an new event handler for a capabilities event sent via the EventQueue - - Use String.Empty to fire this event on every CAPS event - Capability event name to register the - handler for - Callback to fire - - - - Unregister a previously registered capabilities handler - - Capability event name unregister the - handler for - Callback to unregister - - - - Fire the events registered for this event type synchronously - - Capability name - Decoded event body - Reference to the simulator that - generated this event - - - - Fire the events registered for this event type asynchronously - - Capability name - Decoded event body - Reference to the simulator that - generated this event - - - - - - - - The avatar has no rights - - - The avatar can see the online status of the target avatar - - - The avatar can see the location of the target avatar on the map - - - The avatar can modify the ojects of the target avatar - - - - This class holds information about an avatar in the friends list. There are two ways - to interface to this class. The first is through the set of boolean properties. This is the typical - way clients of this class will use it. The second interface is through two bitflag properties, - TheirFriendsRights and MyFriendsRights - - - - - System ID of the avatar - - - - - full name of the avatar - - - - - True if the avatar is online - - - - - True if the friend can see if I am online - - - - - True if the friend can see me on the map - - - - - True if the freind can modify my objects - - - - - True if I can see if my friend is online - - - - - True if I can see if my friend is on the map - - - - - True if I can modify my friend's objects - - - - - My friend's rights represented as bitmapped flags - - - - - My rights represented as bitmapped flags - - - - - Used internally when building the initial list of friends at login time - - System ID of the avatar being prepesented - Rights the friend has to see you online and to modify your objects - Rights you have to see your friend online and to modify their objects - - - - FriendInfo represented as a string - - A string reprentation of both my rights and my friends rights - - - - This class is used to add and remove avatars from your friends list and to manage their permission. - - - - The event subscribers. null if no subcribers - - - Raises the FriendOnline event - A FriendInfoEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the simulator sends notification one of the members in our friends list comes online - - - The event subscribers. null if no subcribers - - - Raises the FriendOffline event - A FriendInfoEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the simulator sends notification one of the members in our friends list goes offline - - - The event subscribers. null if no subcribers - - - Raises the FriendRightsUpdate event - A FriendInfoEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the simulator sends notification one of the members in our friends list grants or revokes permissions - - - The event subscribers. null if no subcribers - - - Raises the FriendNames event - A FriendNamesEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the simulator sends us the names on our friends list - - - The event subscribers. null if no subcribers - - - Raises the FriendshipOffered event - A FriendshipOfferedEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the simulator sends notification another agent is offering us friendship - - - The event subscribers. null if no subcribers - - - Raises the FriendshipResponse event - A FriendshipResponseEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when a request we sent to friend another agent is accepted or declined - - - The event subscribers. null if no subcribers - - - Raises the FriendshipTerminated event - A FriendshipTerminatedEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the simulator sends notification one of the members in our friends list has terminated - our friendship - - - The event subscribers. null if no subcribers - - - Raises the FriendFoundReply event - A FriendFoundReplyEventArgs object containing the - data returned from the data server - - - Thread sync lock object - - - Raised when the simulator sends the location of a friend we have - requested map location info for - - - - A dictionary of key/value pairs containing known friends of this avatar. - - The Key is the of the friend, the value is a - object that contains detailed information including permissions you have and have given to the friend - - - - - A Dictionary of key/value pairs containing current pending frienship offers. - - The key is the of the avatar making the request, - the value is the of the request which is used to accept - or decline the friendship offer - - - - - Internal constructor - - A reference to the GridClient Object - - - - Accept a friendship request - - agentID of avatatar to form friendship with - imSessionID of the friendship request message - - - - Decline a friendship request - - of friend - imSessionID of the friendship request message - - - - Overload: Offer friendship to an avatar. - - System ID of the avatar you are offering friendship to - - - - Offer friendship to an avatar. - - System ID of the avatar you are offering friendship to - A message to send with the request - - - - Terminate a friendship with an avatar - - System ID of the avatar you are terminating the friendship with - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - - Change the rights of a friend avatar. - - the of the friend - the new rights to give the friend - This method will implicitly set the rights to those passed in the rights parameter. - - - - Use to map a friends location on the grid. - - Friends UUID to find - - - - - Use to track a friends movement on the grid - - Friends Key - - - - Ask for a notification of friend's online status - - Friend's UUID - - - - This handles the asynchronous response of a RequestAvatarNames call. - - - names cooresponding to the the list of IDs sent the the RequestAvatarNames call. - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - - Populate FriendList with data from the login reply - - true if login was successful - true if login request is requiring a redirect - A string containing the response to the login request - A string containing the reason for the request - A object containing the decoded - reply from the login server - - - Contains information on a member of our friends list - - - Get the FriendInfo - - - - Construct a new instance of the FriendInfoEventArgs class - - The FriendInfo - - - Contains Friend Names - - - A dictionary where the Key is the ID of the Agent, - and the Value is a string containing their name - - - - Construct a new instance of the FriendNamesEventArgs class - - A dictionary where the Key is the ID of the Agent, - and the Value is a string containing their name - - - Sent when another agent requests a friendship with our agent - - - Get the ID of the agent requesting friendship - - - Get the name of the agent requesting friendship - - - Get the ID of the session, used in accepting or declining the - friendship offer - - - - Construct a new instance of the FriendshipOfferedEventArgs class - - The ID of the agent requesting friendship - The name of the agent requesting friendship - The ID of the session, used in accepting or declining the - friendship offer - - - A response containing the results of our request to form a friendship with another agent - - - Get the ID of the agent we requested a friendship with - - - Get the name of the agent we requested a friendship with - - - true if the agent accepted our friendship offer - - - - Construct a new instance of the FriendShipResponseEventArgs class - - The ID of the agent we requested a friendship with - The name of the agent we requested a friendship with - true if the agent accepted our friendship offer - - - Contains data sent when a friend terminates a friendship with us - - - Get the ID of the agent that terminated the friendship with us - - - Get the name of the agent that terminated the friendship with us - - - - Construct a new instance of the FrindshipTerminatedEventArgs class - - The ID of the friend who terminated the friendship with us - The name of the friend who terminated the friendship with us - - - - Data sent in response to a request which contains the information to allow us to map the friends location - - - - Get the ID of the agent we have received location information for - - - Get the region handle where our mapped friend is located - - - Get the simulator local position where our friend is located - - - - Construct a new instance of the FriendFoundReplyEventArgs class - - The ID of the agent we have requested location information for - The region handle where our friend is located - The simulator local position our friend is located - - - - Main class to expose grid functionality to clients. All of the - classes needed for sending and receiving data are accessible through - this class. - - - - // Example minimum code required to instantiate class and - // connect to a simulator. - using System; - using System.Collections.Generic; - using System.Text; - using OpenMetaverse; - - namespace FirstBot - { - class Bot - { - public static GridClient Client; - static void Main(string[] args) - { - Client = new GridClient(); // instantiates the GridClient class - // to the global Client object - // Login to Simulator - Client.Network.Login("FirstName", "LastName", "Password", "FirstBot", "1.0"); - // Wait for a Keypress - Console.ReadLine(); - // Logout of simulator - Client.Network.Logout(); - } - } - } - - - - - Networking subsystem - - - Settings class including constant values and changeable - parameters for everything - - - Parcel (subdivided simulator lots) subsystem - - - Our own avatars subsystem - - - Other avatars subsystem - - - Estate subsystem - - - Friends list subsystem - - - Grid (aka simulator group) subsystem - - - Object subsystem - - - Group subsystem - - - Asset subsystem - - - Appearance subsystem - - - Inventory subsystem - - - Directory searches including classifieds, people, land - sales, etc - - - Handles land, wind, and cloud heightmaps - - - Handles sound-related networking - - - Throttling total bandwidth usage, or allocating bandwidth - for specific data stream types - - - - Default constructor - - - - - Return the full name of this instance - - Client avatars full name - - - - Map layer request type - - - - Objects and terrain are shown - - - Only the terrain is shown, no objects - - - Overlay showing land for sale and for auction - - - - Type of grid item, such as telehub, event, populator location, etc. - - - - Telehub - - - PG rated event - - - Mature rated event - - - Popular location - - - Locations of avatar groups in a region - - - Land for sale - - - Classified ad - - - Adult rated event - - - Adult land for sale - - - - Information about a region on the grid map - - - - Sim X position on World Map - - - Sim Y position on World Map - - - Sim Name (NOTE: In lowercase!) - - - - - - Appears to always be zero (None) - - - Sim's defined Water Height - - - - - - UUID of the World Map image - - - Unique identifier for this region, a combination of the X - and Y position - - - - - - - - - - - - - - - - - - - - - - - Visual chunk of the grid map - - - - - Base class for Map Items - - - - The Global X position of the item - - - The Global Y position of the item - - - Get the Local X position of the item - - - Get the Local Y position of the item - - - Get the Handle of the region - - - - Represents an agent or group of agents location - - - - - Represents a Telehub location - - - - - Represents a non-adult parcel of land for sale - - - - - Represents an Adult parcel of land for sale - - - - - Represents a PG Event - - - - - Represents a Mature event - - - - - Represents an Adult event - - - - - Manages grid-wide tasks such as the world map - - - - The event subscribers. null if no subcribers - - - Raises the CoarseLocationUpdate event - A CoarseLocationUpdateEventArgs object containing the - data sent by simulator - - - Thread sync lock object - - - Raised when the simulator sends a - containing the location of agents in the simulator - - - The event subscribers. null if no subcribers - - - Raises the GridRegion event - A GridRegionEventArgs object containing the - data sent by simulator - - - Thread sync lock object - - - Raised when the simulator sends a Region Data in response to - a Map request - - - The event subscribers. null if no subcribers - - - Raises the GridLayer event - A GridLayerEventArgs object containing the - data sent by simulator - - - Thread sync lock object - - - Raised when the simulator sends GridLayer object containing - a map tile coordinates and texture information - - - The event subscribers. null if no subcribers - - - Raises the GridItems event - A GridItemEventArgs object containing the - data sent by simulator - - - Thread sync lock object - - - Raised when the simulator sends GridItems object containing - details on events, land sales at a specific location - - - The event subscribers. null if no subcribers - - - Raises the RegionHandleReply event - A RegionHandleReplyEventArgs object containing the - data sent by simulator - - - Thread sync lock object - - - Raised in response to a Region lookup - - - Unknown - - - Current direction of the sun - - - Current angular velocity of the sun - - - Microseconds since the start of SL 4-hour day - - - A dictionary of all the regions, indexed by region name - - - A dictionary of all the regions, indexed by region handle - - - - Constructor - - Instance of GridClient object to associate with this GridManager instance - - - - - - - - - - Request a map layer - - The name of the region - The type of layer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Request data for all mainland (Linden managed) simulators - - - - - Request the region handle for the specified region UUID - - UUID of the region to look up - - - - Get grid region information using the region name, this function - will block until it can find the region or gives up - - Name of sim you're looking for - Layer that you are requesting - Will contain a GridRegion for the sim you're - looking for if successful, otherwise an empty structure - True if the GridRegion was successfully fetched, otherwise - false - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - - Avatar group management - - - - Key of Group Member - - - Total land contribution - - - Online status information - - - Abilities that the Group Member has - - - Current group title - - - Is a group owner - - - - Role manager for a group - - - - Key of the group - - - Key of Role - - - Name of Role - - - Group Title associated with Role - - - Description of Role - - - Abilities Associated with Role - - - Returns the role's title - The role's title - - - - Class to represent Group Title - - - - Key of the group - - - ID of the role title belongs to - - - Group Title - - - Whether title is Active - - - Returns group title - - - - Represents a group on the grid - - - - Key of Group - - - Key of Group Insignia - - - Key of Group Founder - - - Key of Group Role for Owners - - - Name of Group - - - Text of Group Charter - - - Title of "everyone" role - - - Is the group open for enrolement to everyone - - - Will group show up in search - - - - - - - - - - - - Is the group Mature - - - Cost of group membership - - - - - - - - - The total number of current members this group has - - - The number of roles this group has configured - - - Show this group in agent's profile - - - Returns the name of the group - A string containing the name of the group - - - - A group Vote - - - - Key of Avatar who created Vote - - - Text of the Vote proposal - - - Total number of votes - - - - A group proposal - - - - The Text of the proposal - - - The minimum number of members that must vote before proposal passes or failes - - - The required ration of yes/no votes required for vote to pass - The three options are Simple Majority, 2/3 Majority, and Unanimous - TODO: this should be an enum - - - The duration in days votes are accepted - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Struct representing a group notice - - - - - - - - - - - - - - - - - - - - - - - Struct representing a group notice list entry - - - - Notice ID - - - Creation timestamp of notice - - - Agent name who created notice - - - Notice subject - - - Is there an attachment? - - - Attachment Type - - - - Struct representing a member of a group chat session and their settings - - - - The of the Avatar - - - True if user has voice chat enabled - - - True of Avatar has moderator abilities - - - True if a moderator has muted this avatars chat - - - True if a moderator has muted this avatars voice - - - - Role update flags - - - - - - - - - - - - - - - - - - - - - - - - - Can send invitations to groups default role - - - Can eject members from group - - - Can toggle 'Open Enrollment' and change 'Signup fee' - - - Member is visible in the public member list - - - Can create new roles - - - Can delete existing roles - - - Can change Role names, titles and descriptions - - - Can assign other members to assigners role - - - Can assign other members to any role - - - Can remove members from roles - - - Can assign and remove abilities in roles - - - Can change group Charter, Insignia, 'Publish on the web' and which - members are publicly visible in group member listings - - - Can buy land or deed land to group - - - Can abandon group owned land to Governor Linden on mainland, or Estate owner for - private estates - - - Can set land for-sale information on group owned parcels - - - Can subdivide and join parcels - - - Can change music and media settings - - - Can toggle 'Edit Terrain' option in Land settings - - - Can toggle various About Land > Options settings - - - Can toggle "Show in Find Places" and set search category - - - Can change parcel name, description, and 'Publish on web' settings - - - Can set the landing point and teleport routing on group land - - - Can always terraform land, even if parcel settings have it turned off - - - Can always fly while over group owned land - - - Can always rez objects on group owned land - - - Can always create landmarks for group owned parcels - - - Can set home location on any group owned parcel - - - Allowed to hold events on group-owned land - - - Can modify public access settings for group owned parcels - - - Can manager parcel ban lists on group owned land - - - Can manage pass list sales information - - - Can eject and freeze other avatars on group owned land - - - Can return objects set to group - - - Can return non-group owned/set objects - - - Can return group owned objects - - - Can landscape using Linden plants - - - Can deed objects to group - - - Can move group owned objects - - - Can set group owned objects for-sale - - - Pay group liabilities and receive group dividends - - - Can send group notices - - - Can receive group notices - - - Can create group proposals - - - Can vote on group proposals - - - Can join group chat sessions - - - Can use voice chat in Group Chat sessions - - - Can moderate group chat sessions - - - Has admin rights to any experiences owned by this group - - - Can sign scripts for experiences owned by this group - - - Allows access to ban / un-ban agents from a group - - - - Ban actions available for group members - - - - Ban agent from joining a group - - - Remove restriction on agent jointing a group - - - - Handles all network traffic related to reading and writing group - information - - - - The event subscribers. null if no subcribers - - - Raises the CurrentGroups event - A CurrentGroupsEventArgs object containing the - data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - our current group membership - - - The event subscribers. null if no subcribers - - - Raises the GroupNamesReply event - A GroupNamesEventArgs object containing the - data response from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a RequestGroupName - or RequestGroupNames request - - - The event subscribers. null if no subcribers - - - Raises the GroupProfile event - An GroupProfileEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a request - - - The event subscribers. null if no subcribers - - - Raises the GroupMembers event - A GroupMembersEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a request - - - The event subscribers. null if no subcribers - - - Raises the GroupRolesDataReply event - A GroupRolesDataReplyEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a request - - - The event subscribers. null if no subcribers - - - Raises the GroupRoleMembersReply event - A GroupRolesRoleMembersReplyEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a request - - - The event subscribers. null if no subcribers - - - Raises the GroupTitlesReply event - A GroupTitlesReplyEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a request - - - The event subscribers. null if no subcribers - - - Raises the GroupAccountSummary event - A GroupAccountSummaryReplyEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when a response to a RequestGroupAccountSummary is returned - by the simulator - - - The event subscribers. null if no subcribers - - - Raises the GroupCreated event - An GroupCreatedEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when a request to create a group is successful - - - The event subscribers. null if no subcribers - - - Raises the GroupJoined event - A GroupOperationEventArgs object containing the - result of the operation returned from the simulator - - - Thread sync lock object - - - Raised when a request to join a group either - fails or succeeds - - - The event subscribers. null if no subcribers - - - Raises the GroupLeft event - A GroupOperationEventArgs object containing the - result of the operation returned from the simulator - - - Thread sync lock object - - - Raised when a request to leave a group either - fails or succeeds - - - The event subscribers. null if no subcribers - - - Raises the GroupDropped event - An GroupDroppedEventArgs object containing the - the group your agent left - - - Thread sync lock object - - - Raised when A group is removed from the group server - - - The event subscribers. null if no subcribers - - - Raises the GroupMemberEjected event - An GroupMemberEjectedEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when a request to eject a member from a group either - fails or succeeds - - - The event subscribers. null if no subcribers - - - Raises the GroupNoticesListReply event - An GroupNoticesListReplyEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us group notices - - - - The event subscribers. null if no subcribers - - - Raises the GroupInvitation event - An GroupInvitationEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when another agent invites our avatar to join a group - - - The event subscribers. null if no subcribers - - - Raises the BannedAgents event - An BannedAgentsEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when another agent invites our avatar to join a group - - - A reference to the current instance - - - Currently-active group members requests - - - Currently-active group roles requests - - - Currently-active group role-member requests - - - Dictionary keeping group members while request is in progress - - - Dictionary keeping mebmer/role mapping while request is in progress - - - Dictionary keeping GroupRole information while request is in progress - - - Caches group name lookups - - - - Construct a new instance of the GroupManager class - - A reference to the current instance - - - - Request a current list of groups the avatar is a member of. - - CAPS Event Queue must be running for this to work since the results - come across CAPS. - - - - Lookup name of group based on groupID - - groupID of group to lookup name for. - - - - Request lookup of multiple group names - - List of group IDs to request. - - - Lookup group profile data such as name, enrollment, founder, logo, etc - Subscribe to OnGroupProfile event to receive the results. - group ID (UUID) - - - Request a list of group members. - Subscribe to OnGroupMembers event to receive the results. - group ID (UUID) - UUID of the request, use to index into cache - - - Request group roles - Subscribe to OnGroupRoles event to receive the results. - group ID (UUID) - UUID of the request, use to index into cache - - - Request members (members,role) role mapping for a group. - Subscribe to OnGroupRolesMembers event to receive the results. - group ID (UUID) - UUID of the request, use to index into cache - - - Request a groups Titles - Subscribe to OnGroupTitles event to receive the results. - group ID (UUID) - UUID of the request, use to index into cache - - - Begin to get the group account summary - Subscribe to the OnGroupAccountSummary event to receive the results. - group ID (UUID) - How long of an interval - Which interval (0 for current, 1 for last) - - - Invites a user to a group - The group to invite to - A list of roles to invite a person to - Key of person to invite - - - Set a group as the current active group - group ID (UUID) - - - Change the role that determines your active title - Group ID to use - Role ID to change to - - - Set this avatar's tier contribution - Group ID to change tier in - amount of tier to donate - - - - Save wheather agent wants to accept group notices and list this group in their profile - - Group - Accept notices from this group - List this group in the profile - - - Request to join a group - Subscribe to OnGroupJoined event for confirmation. - group ID (UUID) to join. - - - - Request to create a new group. If the group is successfully - created, L$100 will automatically be deducted - - Subscribe to OnGroupCreated event to receive confirmation. - Group struct containing the new group info - - - Update a group's profile and other information - Groups ID (UUID) to update. - Group struct to update. - - - Eject a user from a group - Group ID to eject the user from - Avatar's key to eject - - - Update role information - Modified role to be updated - - - Create a new group role - Group ID to update - Role to create - - - Delete a group role - Group ID to update - Role to delete - - - Remove an avatar from a role - Group ID to update - Role ID to be removed from - Avatar's Key to remove - - - Assign an avatar to a role - Group ID to update - Role ID to assign to - Avatar's ID to assign to role - - - Request the group notices list - Group ID to fetch notices for - - - Request a group notice by key - ID of group notice - - - Send out a group notice - Group ID to update - GroupNotice structure containing notice data - - - Start a group proposal (vote) - The Group ID to send proposal to - GroupProposal structure containing the proposal - - - Request to leave a group - Subscribe to OnGroupLeft event to receive confirmation - The group to leave - - - - Gets the URI of the cpability for handling group bans - - Group ID - null, if the feature is not supported, or URI of the capability - - - - Request a list of residents banned from joining a group - - UUID of the group - - - - Request a list of residents banned from joining a group - - UUID of the group - Callback on request completition - - - - Request that group of agents be banned or unbanned from the group - - Group ID - Ban/Unban action - Array of agents UUIDs to ban - - - - Request that group of agents be banned or unbanned from the group - - Group ID - Ban/Unban action - Array of agents UUIDs to ban - Callback - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Contains the current groups your agent is a member of - - - Get the current groups your agent is a member of - - - Construct a new instance of the CurrentGroupsEventArgs class - The current groups your agent is a member of - - - A Dictionary of group names, where the Key is the groups ID and the value is the groups name - - - Get the Group Names dictionary - - - Construct a new instance of the GroupNamesEventArgs class - The Group names dictionary - - - Represents the members of a group - - - Get the ID as returned by the request to correlate - this result set and the request - - - Get the ID of the group - - - Get the dictionary of members - - - - Construct a new instance of the GroupMembersReplyEventArgs class - - The ID of the request - The ID of the group - The membership list of the group - - - Represents the roles associated with a group - - - Get the ID as returned by the request to correlate - this result set and the request - - - Get the ID of the group - - - Get the dictionary containing the roles - - - Construct a new instance of the GroupRolesDataReplyEventArgs class - The ID as returned by the request to correlate - this result set and the request - The ID of the group - The dictionary containing the roles - - - Represents the Role to Member mappings for a group - - - Get the ID as returned by the request to correlate - this result set and the request - - - Get the ID of the group - - - Get the member to roles map - - - Construct a new instance of the GroupRolesMembersReplyEventArgs class - The ID as returned by the request to correlate - this result set and the request - The ID of the group - The member to roles map - - - Represents the titles for a group - - - Get the ID as returned by the request to correlate - this result set and the request - - - Get the ID of the group - - - Get the titles - - - Construct a new instance of the GroupTitlesReplyEventArgs class - The ID as returned by the request to correlate - this result set and the request - The ID of the group - The titles - - - Represents the summary data for a group - - - Get the ID of the group - - - Get the summary data - - - Construct a new instance of the GroupAccountSummaryReplyEventArgs class - The ID of the group - The summary data - - - A response to a group create request - - - Get the ID of the group - - - true of the group was created successfully - - - A string containing the message - - - Construct a new instance of the GroupCreatedReplyEventArgs class - The ID of the group - the success or faulure of the request - A string containing additional information - - - Represents a response to a request - - - Get the ID of the group - - - true of the request was successful - - - Construct a new instance of the GroupOperationEventArgs class - The ID of the group - true of the request was successful - - - Represents your agent leaving a group - - - Get the ID of the group - - - Construct a new instance of the GroupDroppedEventArgs class - The ID of the group - - - Represents a list of active group notices - - - Get the ID of the group - - - Get the notices list - - - Construct a new instance of the GroupNoticesListReplyEventArgs class - The ID of the group - The list containing active notices - - - Represents the profile of a group - - - Get the group profile - - - Construct a new instance of the GroupProfileEventArgs class - The group profile - - - - Provides notification of a group invitation request sent by another Avatar - - The invitation is raised when another avatar makes an offer for our avatar - to join a group. - - - The ID of the Avatar sending the group invitation - - - The name of the Avatar sending the group invitation - - - A message containing the request information which includes - the name of the group, the groups charter and the fee to join details - - - The Simulator - - - Set to true to accept invitation, false to decline - - - - Result of the request for list of agents banned from a group - - - - Indicates if list of banned agents for a group was successfully retrieved - - - Indicates if list of banned agents for a group was successfully retrieved - - - Array containing a list of UUIDs of the agents banned from a group - - - - Static helper functions and global variables - - - - This header flag signals that ACKs are appended to the packet - - - This header flag signals that this packet has been sent before - - - This header flags signals that an ACK is expected for this packet - - - This header flag signals that the message is compressed using zerocoding - - - - Passed to Logger.Log() to identify the severity of a log entry - - - - No logging information will be output - - - Non-noisy useful information, may be helpful in - debugging a problem - - - A non-critical error occurred. A warning will not - prevent the rest of the library from operating as usual, - although it may be indicative of an underlying issue - - - A critical error has occurred. Generally this will - be followed by the network layer shutting down, although the - stability of the library after an error is uncertain - - - Used for internal testing, this logging level can - generate very noisy (long and/or repetitive) messages. Don't - pass this to the Log() function, use DebugLog() instead. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Given an X/Y location in absolute (grid-relative) terms, a region - handle is returned along with the local X/Y location in that region - - The absolute X location, a number such as - 255360.35 - The absolute Y location, a number such as - 255360.35 - The sim-local X position of the global X - position, a value from 0.0 to 256.0 - The sim-local Y position of the global Y - position, a value from 0.0 to 256.0 - A 64-bit region handle that can be used to teleport to - - - - Converts a floating point number to a terse string format used for - transmitting numbers in wearable asset files - - Floating point number to convert to a string - A terse string representation of the input number - - - - Convert a variable length field (byte array) to a string, with a - field name prepended to each line of the output - - If the byte array has unprintable characters in it, a - hex dump will be written instead - The StringBuilder object to write to - The byte array to convert to a string - A field name to prepend to each line of output - - - - Decode a zerocoded byte array, used to decompress packets marked - with the zerocoded flag - - Any time a zero is encountered, the next byte is a count - of how many zeroes to expand. One zero is encoded with 0x00 0x01, - two zeroes is 0x00 0x02, three zeroes is 0x00 0x03, etc. The - first four bytes are copied directly to the output buffer. - - The byte array to decode - The length of the byte array to decode. This - would be the length of the packet up to (but not including) any - appended ACKs - The output byte array to decode to - The length of the output buffer - - - - Encode a byte array with zerocoding. Used to compress packets marked - with the zerocoded flag. Any zeroes in the array are compressed down - to a single zero byte followed by a count of how many zeroes to expand - out. A single zero becomes 0x00 0x01, two zeroes becomes 0x00 0x02, - three zeroes becomes 0x00 0x03, etc. The first four bytes are copied - directly to the output buffer. - - The byte array to encode - The length of the byte array to encode - The output byte array to encode to - The length of the output buffer - - - - Calculates the CRC (cyclic redundancy check) needed to upload inventory. - - Creation date - Sale type - Inventory type - Type - Asset ID - Group ID - Sale price - Owner ID - Creator ID - Item ID - Folder ID - Everyone mask (permissions) - Flags - Next owner mask (permissions) - Group mask (permissions) - Owner mask (permissions) - The calculated CRC - - - - Attempts to load a file embedded in the assembly - - The filename of the resource to load - A Stream for the requested file, or null if the resource - was not successfully loaded - - - - Attempts to load a file either embedded in the assembly or found in - a given search path - - The filename of the resource to load - An optional path that will be searched if - the asset is not found embedded in the assembly - A Stream for the requested file, or null if the resource - was not successfully loaded - - - - Converts a list of primitives to an object that can be serialized - with the LLSD system - - Primitives to convert to a serializable object - An object that can be serialized with LLSD - - - - Deserializes OSD in to a list of primitives - - Structure holding the serialized primitive list, - must be of the SDMap type - A list of deserialized primitives - - - - Converts a struct or class object containing fields only into a key value separated string - - The struct object - A string containing the struct fields as the keys, and the field value as the value separated - - - // Add the following code to any struct or class containing only fields to override the ToString() - // method to display the values of the passed object - - /// Print the struct data as a string - ///A string containing the field name, and field value - public override string ToString() - { - return Helpers.StructToString(this); - } - - - - - - The InternalDictionary class is used through the library for storing key/value pairs. - It is intended to be a replacement for the generic Dictionary class and should - be used in its place. It contains several methods for allowing access to the data from - outside the library that are read only and thread safe. - - - Key - Value - - - Internal dictionary that this class wraps around. Do not - modify or enumerate the contents of this dictionary without locking - on this member - - - - Gets the number of Key/Value pairs contained in the - - - - - Initializes a new instance of the Class - with the specified key/value, has the default initial capacity. - - - - // initialize a new InternalDictionary named testDict with a string as the key and an int as the value. - public InternalDictionary<string, int> testDict = new InternalDictionary<string, int>(); - - - - - - Initializes a new instance of the Class - with the specified key/value, has its initial valies copied from the specified - - - - to copy initial values from - - - // initialize a new InternalDictionary named testAvName with a UUID as the key and an string as the value. - // populates with copied values from example KeyNameCache Dictionary. - - // create source dictionary - Dictionary<UUID, string> KeyNameCache = new Dictionary<UUID, string>(); - KeyNameCache.Add("8300f94a-7970-7810-cf2c-fc9aa6cdda24", "Jack Avatar"); - KeyNameCache.Add("27ba1e40-13f7-0708-3e98-5819d780bd62", "Jill Avatar"); - - // Initialize new dictionary. - public InternalDictionary<UUID, string> testAvName = new InternalDictionary<UUID, string>(KeyNameCache); - - - - - - Initializes a new instance of the Class - with the specified key/value, With its initial capacity specified. - - Initial size of dictionary - - - // initialize a new InternalDictionary named testDict with a string as the key and an int as the value, - // initially allocated room for 10 entries. - public InternalDictionary<string, int> testDict = new InternalDictionary<string, int>(10); - - - - - - Try to get entry from with specified key - - Key to use for lookup - Value returned - if specified key exists, if not found - - - // find your avatar using the Simulator.ObjectsAvatars InternalDictionary: - Avatar av; - if (Client.Network.CurrentSim.ObjectsAvatars.TryGetValue(Client.Self.AgentID, out av)) - Console.WriteLine("Found Avatar {0}", av.Name); - - - - - - - Finds the specified match. - - The match. - Matched value - - - // use a delegate to find a prim in the ObjectsPrimitives InternalDictionary - // with the ID 95683496 - uint findID = 95683496; - Primitive findPrim = sim.ObjectsPrimitives.Find( - delegate(Primitive prim) { return prim.ID == findID; }); - - - - - Find All items in an - return matching items. - a containing found items. - - Find All prims within 20 meters and store them in a List - - int radius = 20; - List<Primitive> prims = Client.Network.CurrentSim.ObjectsPrimitives.FindAll( - delegate(Primitive prim) { - Vector3 pos = prim.Position; - return ((prim.ParentID == 0) && (pos != Vector3.Zero) && (Vector3.Distance(pos, location) < radius)); - } - ); - - - - - Find All items in an - return matching keys. - a containing found keys. - - Find All keys which also exist in another dictionary - - List<UUID> matches = myDict.FindAll( - delegate(UUID id) { - return myOtherDict.ContainsKey(id); - } - ); - - - - - Perform an on each entry in an - to perform - - - // Iterates over the ObjectsPrimitives InternalDictionary and prints out some information. - Client.Network.CurrentSim.ObjectsPrimitives.ForEach( - delegate(Primitive prim) - { - if (prim.Text != null) - { - Console.WriteLine("NAME={0} ID = {1} TEXT = '{2}'", - prim.PropertiesFamily.Name, prim.ID, prim.Text); - } - }); - - - - - Perform an on each key of an - to perform - - - - Perform an on each KeyValuePair of an - - to perform - - - Check if Key exists in Dictionary - Key to check for - if found, otherwise - - - Check if Value exists in Dictionary - Value to check for - if found, otherwise - - - - Adds the specified key to the dictionary, dictionary locking is not performed, - - - The key - The value - - - - Removes the specified key, dictionary locking is not performed - - The key. - if successful, otherwise - - - - Indexer for the dictionary - - The key - The value - - - - Exception class to identify inventory exceptions - - - - - Responsible for maintaining inventory structure. Inventory constructs nodes - and manages node children as is necessary to maintain a coherant hirarchy. - Other classes should not manipulate or create InventoryNodes explicitly. When - A node's parent changes (when a folder is moved, for example) simply pass - Inventory the updated InventoryFolder and it will make the appropriate changes - to its internal representation. - - - - The event subscribers, null of no subscribers - - - Raises the InventoryObjectUpdated Event - A InventoryObjectUpdatedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the InventoryObjectRemoved Event - A InventoryObjectRemovedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the InventoryObjectAdded Event - A InventoryObjectAddedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - - The root folder of this avatars inventory - - - - - The default shared library folder - - - - - The root node of the avatars inventory - - - - - The root node of the default shared library - - - - - Returns the contents of the specified folder - - A folder's UUID - The contents of the folder corresponding to folder - When folder does not exist in the inventory - - - - Updates the state of the InventoryNode and inventory data structure that - is responsible for the InventoryObject. If the item was previously not added to inventory, - it adds the item, and updates structure accordingly. If it was, it updates the - InventoryNode, changing the parent node if item.parentUUID does - not match node.Parent.Data.UUID. - - You can not set the inventory root folder using this method - - The InventoryObject to store - - - - Removes the InventoryObject and all related node data from Inventory. - - The InventoryObject to remove. - - - - Used to find out if Inventory contains the InventoryObject - specified by uuid. - - The UUID to check. - true if inventory contains uuid, false otherwise - - - - Saves the current inventory structure to a cache file - - Name of the cache file to save to - - - - Loads in inventory cache file into the inventory structure. Note only valid to call after login has been successful. - - Name of the cache file to load - The number of inventory items sucessfully reconstructed into the inventory node tree - - - - By using the bracket operator on this class, the program can get the - InventoryObject designated by the specified uuid. If the value for the corresponding - UUID is null, the call is equivelant to a call to RemoveNodeFor(this[uuid]). - If the value is non-null, it is equivelant to a call to UpdateNodeFor(value), - the uuid parameter is ignored. - - The UUID of the InventoryObject to get or set, ignored if set to non-null value. - The InventoryObject corresponding to uuid. - - - Sort by name - - - Sort by date - - - Sort folders by name, regardless of whether items are - sorted by name or date - - - Place system folders at the top - - - - Possible destinations for DeRezObject request - - - - - - - Copy from in-world to agent inventory - - - Derez to TaskInventory - - - - - - Take Object - - - - - - Delete Object - - - Put an avatar attachment into agent inventory - - - - - - Return an object back to the owner's inventory - - - Return a deeded object back to the last owner's inventory - - - - Upper half of the Flags field for inventory items - - - - Indicates that the NextOwner permission will be set to the - most restrictive set of permissions found in the object set - (including linkset items and object inventory items) on next rez - - - Indicates that the object sale information has been - changed - - - If set, and a slam bit is set, indicates BaseMask will be overwritten on Rez - - - If set, and a slam bit is set, indicates OwnerMask will be overwritten on Rez - - - If set, and a slam bit is set, indicates GroupMask will be overwritten on Rez - - - If set, and a slam bit is set, indicates EveryoneMask will be overwritten on Rez - - - If set, and a slam bit is set, indicates NextOwnerMask will be overwritten on Rez - - - Indicates whether this object is composed of multiple - items or not - - - Indicates that the asset is only referenced by this - inventory item. If this item is deleted or updated to reference a - new assetID, the asset can be deleted - - - - Base Class for Inventory Items - - - - of item/folder - - - of parent folder - - - Name of item/folder - - - Item/Folder Owners - - - - Constructor, takes an itemID as a parameter - - The of the item - - - - - - - - - - - - - - - - Generates a number corresponding to the value of the object to support the use of a hash table, - suitable for use in hashing algorithms and data structures such as a hash table - - A Hashcode of all the combined InventoryBase fields - - - - Determine whether the specified object is equal to the current object - - InventoryBase object to compare against - true if objects are the same - - - - Determine whether the specified object is equal to the current object - - InventoryBase object to compare against - true if objects are the same - - - - Convert inventory to OSD - - OSD representation - - - - An Item in Inventory - - - - The of this item - - - The combined of this item - - - The type of item from - - - The type of item from the enum - - - The of the creator of this item - - - A Description of this item - - - The s this item is set to or owned by - - - If true, item is owned by a group - - - The price this item can be purchased for - - - The type of sale from the enum - - - Combined flags from - - - Time and date this inventory item was created, stored as - UTC (Coordinated Universal Time) - - - Used to update the AssetID in requests sent to the server - - - The of the previous owner of the item - - - - Construct a new InventoryItem object - - The of the item - - - - Construct a new InventoryItem object of a specific Type - - The type of item from - of the item - - - - Indicates inventory item is a link - - True if inventory item is a link to another inventory item - - - - - - - - - - - - - - - - Generates a number corresponding to the value of the object to support the use of a hash table. - Suitable for use in hashing algorithms and data structures such as a hash table - - A Hashcode of all the combined InventoryItem fields - - - - Compares an object - - The object to compare - true if comparison object matches - - - - Determine whether the specified object is equal to the current object - - The object to compare against - true if objects are the same - - - - Determine whether the specified object is equal to the current object - - The object to compare against - true if objects are the same - - - - Create InventoryItem from OSD - - OSD Data that makes up InventoryItem - Inventory item created - - - - Convert InventoryItem to OSD - - OSD representation of InventoryItem - - - - InventoryTexture Class representing a graphical image - - - - - - Construct an InventoryTexture object - - A which becomes the - objects AssetUUID - - - - Construct an InventoryTexture object from a serialization stream - - - - - InventorySound Class representing a playable sound - - - - - Construct an InventorySound object - - A which becomes the - objects AssetUUID - - - - Construct an InventorySound object from a serialization stream - - - - - InventoryCallingCard Class, contains information on another avatar - - - - - Construct an InventoryCallingCard object - - A which becomes the - objects AssetUUID - - - - Construct an InventoryCallingCard object from a serialization stream - - - - - InventoryLandmark Class, contains details on a specific location - - - - - Construct an InventoryLandmark object - - A which becomes the - objects AssetUUID - - - - Construct an InventoryLandmark object from a serialization stream - - - - - Landmarks use the InventoryItemFlags struct and will have a flag of 1 set if they have been visited - - - - - InventoryObject Class contains details on a primitive or coalesced set of primitives - - - - - Construct an InventoryObject object - - A which becomes the - objects AssetUUID - - - - Construct an InventoryObject object from a serialization stream - - - - - Gets or sets the upper byte of the Flags value - - - - - Gets or sets the object attachment point, the lower byte of the Flags value - - - - - InventoryNotecard Class, contains details on an encoded text document - - - - - Construct an InventoryNotecard object - - A which becomes the - objects AssetUUID - - - - Construct an InventoryNotecard object from a serialization stream - - - - - InventoryCategory Class - - TODO: Is this even used for anything? - - - - Construct an InventoryCategory object - - A which becomes the - objects AssetUUID - - - - Construct an InventoryCategory object from a serialization stream - - - - - InventoryLSL Class, represents a Linden Scripting Language object - - - - - Construct an InventoryLSL object - - A which becomes the - objects AssetUUID - - - - Construct an InventoryLSL object from a serialization stream - - - - - InventorySnapshot Class, an image taken with the viewer - - - - - Construct an InventorySnapshot object - - A which becomes the - objects AssetUUID - - - - Construct an InventorySnapshot object from a serialization stream - - - - - InventoryAttachment Class, contains details on an attachable object - - - - - Construct an InventoryAttachment object - - A which becomes the - objects AssetUUID - - - - Construct an InventoryAttachment object from a serialization stream - - - - - Get the last AttachmentPoint this object was attached to - - - - - InventoryWearable Class, details on a clothing item or body part - - - - - Construct an InventoryWearable object - - A which becomes the - objects AssetUUID - - - - Construct an InventoryWearable object from a serialization stream - - - - - The , Skin, Shape, Skirt, Etc - - - - - InventoryAnimation Class, A bvh encoded object which animates an avatar - - - - - Construct an InventoryAnimation object - - A which becomes the - objects AssetUUID - - - - Construct an InventoryAnimation object from a serialization stream - - - - - InventoryGesture Class, details on a series of animations, sounds, and actions - - - - - Construct an InventoryGesture object - - A which becomes the - objects AssetUUID - - - - Construct an InventoryGesture object from a serialization stream - - - - - A folder contains s and has certain attributes specific - to itself - - - - The Preferred for a folder. - - - The Version of this folder - - - Number of child items this folder contains. - - - - Constructor - - UUID of the folder - - - - - - - - - - Get Serilization data for this InventoryFolder object - - - - - Construct an InventoryFolder object from a serialization stream - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create InventoryFolder from OSD - - OSD Data that makes up InventoryFolder - Inventory folder created - - - - Convert InventoryItem to OSD - - OSD representation of InventoryItem - - - - Tools for dealing with agents inventory - - - - Used for converting shadow_id to asset_id - - - - Callback for inventory item creation finishing - - Whether the request to create an inventory - item succeeded or not - Inventory item being created. If success is - false this will be null - - - - Callback for an inventory item being create from an uploaded asset - - true if inventory item creation was successful - - - - - - - - - - - - The event subscribers, null of no subscribers - - - Raises the ItemReceived Event - A ItemReceivedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the FolderUpdated Event - A FolderUpdatedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the InventoryObjectOffered Event - A InventoryObjectOfferedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - an inventory object sent by another avatar or primitive - - - The event subscribers, null of no subscribers - - - Raises the TaskItemReceived Event - A TaskItemReceivedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the FindObjectByPath Event - A FindObjectByPathEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the TaskInventoryReply Event - A TaskInventoryReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - - Reply received when uploading an inventory asset - - Has upload been successful - Error message if upload failed - Inventory asset UUID - New asset UUID - - - The event subscribers, null of no subscribers - - - Raises the SaveAssetToInventory Event - A SaveAssetToInventoryEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - - Delegate that is invoked when script upload is completed - - Has upload succeded (note, there still might be compile errors) - Upload status message - Is compilation successful - If compilation failed, list of error messages, null on compilation success - Script inventory UUID - Script's new asset UUID - - - The event subscribers, null of no subscribers - - - Raises the ScriptRunningReply Event - A ScriptRunningReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - Partial mapping of FolderTypes to folder names - - - - Get this agents Inventory data - - - - - Default constructor - - Reference to the GridClient object - - - - Fetch an inventory item from the dataserver - - The items - The item Owners - a integer representing the number of milliseconds to wait for results - An object on success, or null if no item was found - Items will also be sent to the event - - - - Request A single inventory item - - The items - The item Owners - - - - - Request inventory items - - Inventory items to request - Owners of the inventory items - - - - - Request inventory items via Capabilities - - Inventory items to request - Owners of the inventory items - - - - - Get contents of a folder - - The of the folder to search - The of the folders owner - true to retrieve folders - true to retrieve items - sort order to return results in - a integer representing the number of milliseconds to wait for results - A list of inventory items matching search criteria within folder - - InventoryFolder.DescendentCount will only be accurate if both folders and items are - requested - - - - Request the contents of an inventory folder - - The folder to search - The folder owners - true to return s contained in folder - true to return s containd in folder - the sort order to return items in - - - - - Request the contents of an inventory folder using HTTP capabilities - - The folder to search - The folder owners - true to return s contained in folder - true to return s containd in folder - the sort order to return items in - - - - - Returns the UUID of the folder (category) that defaults to - containing 'type'. The folder is not necessarily only for that - type - - This will return the root folder if one does not exist - - The UUID of the desired folder if found, the UUID of the RootFolder - if not found, or UUID.Zero on failure - - - - Find an object in inventory using a specific path to search - - The folder to begin the search in - The object owners - A string path to search - milliseconds to wait for a reply - Found items or if - timeout occurs or item is not found - - - - Find inventory items by path - - The folder to begin the search in - The object owners - A string path to search, folders/objects separated by a '/' - Results are sent to the event - - - - Search inventory Store object for an item or folder - - The folder to begin the search in - An array which creates a path to search - Number of levels below baseFolder to conduct searches - if True, will stop searching after first match is found - A list of inventory items found - - - - Move an inventory item or folder to a new location - - The item or folder to move - The to move item or folder to - - - - Move an inventory item or folder to a new location and change its name - - The item or folder to move - The to move item or folder to - The name to change the item or folder to - - - - Move and rename a folder - - The source folders - The destination folders - The name to change the folder to - - - - Update folder properties - - of the folder to update - Sets folder's parent to - Folder name - Folder type - - - - Move a folder - - The source folders - The destination folders - - - - Move multiple folders, the keys in the Dictionary parameter, - to a new parents, the value of that folder's key. - - A Dictionary containing the - of the source as the key, and the - of the destination as the value - - - - Move an inventory item to a new folder - - The of the source item to move - The of the destination folder - - - - Move and rename an inventory item - - The of the source item to move - The of the destination folder - The name to change the folder to - - - - Move multiple inventory items to new locations - - A Dictionary containing the - of the source item as the key, and the - of the destination folder as the value - - - - Remove descendants of a folder - - The of the folder - - - - Remove a single item from inventory - - The of the inventory item to remove - - - - Remove a folder from inventory - - The of the folder to remove - - - - Remove multiple items or folders from inventory - - A List containing the s of items to remove - A List containing the s of the folders to remove - - - - Empty the Lost and Found folder - - - - - Empty the Trash folder - - - - - - - - - - - Proper use is to upload the inventory's asset first, then provide the Asset's TransactionID here. - - - - - - - - - - - - - Proper use is to upload the inventory's asset first, then provide the Asset's TransactionID here. - - - - - - - - Creates a new inventory folder - - ID of the folder to put this folder in - Name of the folder to create - The UUID of the newly created folder - - - - Creates a new inventory folder - - ID of the folder to put this folder in - Name of the folder to create - Sets this folder as the default folder - for new assets of the specified type. Use FolderType.None - to create a normal folder, otherwise it will likely create a - duplicate of an existing folder type - The UUID of the newly created folder - If you specify a preferred type of AsseType.Folder - it will create a new root folder which may likely cause all sorts - of strange problems - - - - Create an inventory item and upload asset data - - Asset data - Inventory item name - Inventory item description - Asset type - Inventory type - Put newly created inventory in this folder - Delegate that will receive feedback on success or failure - - - - Create an inventory item and upload asset data - - Asset data - Inventory item name - Inventory item description - Asset type - Inventory type - Put newly created inventory in this folder - Permission of the newly created item - (EveryoneMask, GroupMask, and NextOwnerMask of Permissions struct are supported) - Delegate that will receive feedback on success or failure - - - - Creates inventory link to another inventory item or folder - - Put newly created link in folder with this UUID - Inventory item or folder - Method to call upon creation of the link - - - - Creates inventory link to another inventory item - - Put newly created link in folder with this UUID - Original inventory item - Method to call upon creation of the link - - - - Creates inventory link to another inventory folder - - Put newly created link in folder with this UUID - Original inventory folder - Method to call upon creation of the link - - - - Creates inventory link to another inventory item or folder - - Put newly created link in folder with this UUID - Original item's UUID - Name - Description - Asset Type - Inventory Type - Transaction UUID - Method to call upon creation of the link - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Request a copy of an asset embedded within a notecard - - Usually UUID.Zero for copying an asset from a notecard - UUID of the notecard to request an asset from - Target folder for asset to go to in your inventory - UUID of the embedded asset - callback to run when item is copied to inventory - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Save changes to notecard embedded in object contents - - Encoded notecard asset data - Notecard UUID - Object's UUID - Called upon finish of the upload with status information - - - - Upload new gesture asset for an inventory gesture item - - Encoded gesture asset - Gesture inventory UUID - Callback whick will be called when upload is complete - - - - Update an existing script in an agents Inventory - - A byte[] array containing the encoded scripts contents - the itemID of the script - if true, sets the script content to run on the mono interpreter - - - - - Update an existing script in an task Inventory - - A byte[] array containing the encoded scripts contents - the itemID of the script - UUID of the prim containting the script - if true, sets the script content to run on the mono interpreter - if true, sets the script to running - - - - - Rez an object from inventory - - Simulator to place object in - Rotation of the object when rezzed - Vector of where to place object - InventoryItem object containing item details - - - - Rez an object from inventory - - Simulator to place object in - Rotation of the object when rezzed - Vector of where to place object - InventoryItem object containing item details - UUID of group to own the object - - - - Rez an object from inventory - - Simulator to place object in - Rotation of the object when rezzed - Vector of where to place object - InventoryItem object containing item details - UUID of group to own the object - User defined queryID to correlate replies - If set to true, the CreateSelected flag - will be set on the rezzed object - - - - Rez an object from inventory - - Simulator to place object in - TaskID object when rezzed - Rotation of the object when rezzed - Vector of where to place object - InventoryItem object containing item details - UUID of group to own the object - User defined queryID to correlate replies - If set to true, the CreateSelected flag - will be set on the rezzed object - - - - DeRez an object from the simulator to the agents Objects folder in the agents Inventory - - The simulator Local ID of the object - If objectLocalID is a child primitive in a linkset, the entire linkset will be derezzed - - - - DeRez an object from the simulator and return to inventory - - The simulator Local ID of the object - The type of destination from the enum - The destination inventory folders -or- - if DeRezzing object to a tasks Inventory, the Tasks - The transaction ID for this request which - can be used to correlate this request with other packets - If objectLocalID is a child primitive in a linkset, the entire linkset will be derezzed - - - - Rez an item from inventory to its previous simulator location - - - - - - - - - Give an inventory item to another avatar - - The of the item to give - The name of the item - The type of the item from the enum - The of the recipient - true to generate a beameffect during transfer - - - - Give an inventory Folder with contents to another avatar - - The of the Folder to give - The name of the folder - The type of the item from the enum - The of the recipient - true to generate a beameffect during transfer - - - - Copy or move an from agent inventory to a task (primitive) inventory - - The target object - The item to copy or move from inventory - - For items with copy permissions a copy of the item is placed in the tasks inventory, - for no-copy items the object is moved to the tasks inventory - - - - Retrieve a listing of the items contained in a task (Primitive) - - The tasks - The tasks simulator local ID - milliseconds to wait for reply from simulator - A list containing the inventory items inside the task or null - if a timeout occurs - This request blocks until the response from the simulator arrives - or timeoutMS is exceeded - - - - Request the contents of a tasks (primitives) inventory from the - current simulator - - The LocalID of the object - - - - - Request the contents of a tasks (primitives) inventory - - The simulator Local ID of the object - A reference to the simulator object that contains the object - - - - - Move an item from a tasks (Primitive) inventory to the specified folder in the avatars inventory - - LocalID of the object in the simulator - UUID of the task item to move - The ID of the destination folder in this agents inventory - Simulator Object - Raises the event - - - - Remove an item from an objects (Prim) Inventory - - LocalID of the object in the simulator - UUID of the task item to remove - Simulator Object - You can confirm the removal by comparing the tasks inventory serial before and after the - request with the request combined with - the event - - - - Copy an InventoryScript item from the Agents Inventory into a primitives task inventory - - An unsigned integer representing a primitive being simulated - An which represents a script object from the agents inventory - true to set the scripts running state to enabled - A Unique Transaction ID - - The following example shows the basic steps necessary to copy a script from the agents inventory into a tasks inventory - and assumes the script exists in the agents inventory. - - uint primID = 95899503; // Fake prim ID - UUID scriptID = UUID.Parse("92a7fe8a-e949-dd39-a8d8-1681d8673232"); // Fake Script UUID in Inventory - - Client.Inventory.FolderContents(Client.Inventory.FindFolderForType(AssetType.LSLText), Client.Self.AgentID, - false, true, InventorySortOrder.ByName, 10000); - - Client.Inventory.RezScript(primID, (InventoryItem)Client.Inventory.Store[scriptID]); - - - - - - Request the running status of a script contained in a task (primitive) inventory - - The ID of the primitive containing the script - The ID of the script - The event can be used to obtain the results of the - request - - - - - Send a request to set the running state of a script contained in a task (primitive) inventory - - The ID of the primitive containing the script - The ID of the script - true to set the script running, false to stop a running script - To verify the change you can use the method combined - with the event - - - - Create a CRC from an InventoryItem - - The source InventoryItem - A uint representing the source InventoryItem as a CRC - - - - Reverses a cheesy XORing with a fixed UUID to convert a shadow_id to an asset_id - - Obfuscated shadow_id value - Deobfuscated asset_id value - - - - Does a cheesy XORing with a fixed UUID to convert an asset_id to a shadow_id - - asset_id value to obfuscate - Obfuscated shadow_id value - - - - Wrapper for creating a new object - - The type of item from the enum - The of the newly created object - An object with the type and id passed - - - - Parse the results of a RequestTaskInventory() response - - A string which contains the data from the task reply - A List containing the items contained within the tasks inventory - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - - UpdateCreateInventoryItem packets are received when a new inventory item - is created. This may occur when an object that's rezzed in world is - taken into inventory, when an item is created using the CreateInventoryItem - packet, or when an object is purchased - - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Set to true to accept offer, false to decline it - - - The folder to accept the inventory into, if null default folder for will be used - - - - Callback when an inventory object is accepted and received from a - task inventory. This is the callback in which you actually get - the ItemID, as in ObjectOfferedCallback it is null when received - from a task. - - - - - - - User data - - - - - - - - - - - - - For inventory folder nodes specifies weather the folder needs to be - refreshed from the server - - - - - - - - - - - - - - - - De-serialization constructor for the InventoryNode Class - - - - - Serialization handler for the InventoryNode Class - - - - - De-serialization handler for the InventoryNode Class - - - - - - - - - - - Singleton logging class for the entire library - - - - - Callback used for client apps to receive log messages from - the library - - Data being logged - The severity of the log entry from - - - Triggered whenever a message is logged. If this is left - null, log messages will go to the console - - - log4net logging engine - - - - Default constructor - - - - - Send a log message to the logging engine - - The log message - The severity of the log entry - - - - Send a log message to the logging engine - - The log message - The severity of the log entry - Instance of the client - - - - Send a log message to the logging engine - - The log message - The severity of the log entry - Exception that was raised - - - - Send a log message to the logging engine - - The log message - The severity of the log entry - Instance of the client - Exception that was raised - - - - If the library is compiled with DEBUG defined, an event will be - fired if an OnLogMessage handler is registered and the - message will be sent to the logging engine - - The message to log at the DEBUG level to the - current logging engine - - - - If the library is compiled with DEBUG defined and - GridClient.Settings.DEBUG is true, an event will be - fired if an OnLogMessage handler is registered and the - message will be sent to the logging engine - - The message to log at the DEBUG level to the - current logging engine - Instance of the client - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Status of the last application run. - Used for error reporting to the grid login service for statistical purposes. - - - - Application exited normally - - - Application froze - - - Application detected error and exited abnormally - - - Other crash - - - Application froze during logout - - - Application crashed during logout - - - - Login Request Parameters - - - - The URL of the Login Server - - - The number of milliseconds to wait before a login is considered - failed due to timeout - - - The request method - login_to_simulator is currently the only supported method - - - The Agents First name - - - The Agents Last name - - - A md5 hashed password - plaintext password will be automatically hashed - - - The agents starting location once logged in - Either "last", "home", or a string encoded URI - containing the simulator name and x/y/z coordinates e.g: uri:hooper&128&152&17 - - - A string containing the client software channel information - Second Life Release - - - The client software version information - The official viewer uses: Second Life Release n.n.n.n - where n is replaced with the current version of the viewer - - - A string containing the platform information the agent is running on - - - A string containing version number for OS the agent is running on - - - A string hash of the network cards Mac Address - - - Unknown or deprecated - - - A string hash of the first disk drives ID used to identify this clients uniqueness - - - A string containing the viewers Software, this is not directly sent to the login server but - instead is used to generate the Version string - - - A string representing the software creator. This is not directly sent to the login server but - is used by the library to generate the Version information - - - If true, this agent agrees to the Terms of Service of the grid its connecting to - - - Unknown - - - Status of the last application run sent to the grid login server for statistical purposes - - - An array of string sent to the login server to enable various options - - - A randomly generated ID to distinguish between login attempts. This value is only used - internally in the library and is never sent over the wire - - - - Default constuctor, initializes sane default values - - - - - Instantiates new LoginParams object and fills in the values - - Instance of GridClient to read settings from - Login first name - Login last name - Password - Login channnel (application name) - Client version, should be application name + version number - - - - Instantiates new LoginParams object and fills in the values - - Instance of GridClient to read settings from - Login first name - Login last name - Password - Login channnel (application name) - Client version, should be application name + version number - URI of the login server - - - - The decoded data returned from the login server after a successful login - - - - true, false, indeterminate - - - Login message of the day - - - M or PG, also agent_region_access and agent_access_max - - - - Parse LLSD Login Reply Data - - An - contaning the login response data - XML-RPC logins do not require this as XML-RPC.NET - automatically populates the struct properly using attributes - - - - Login Routines - - - NetworkManager is responsible for managing the network layer of - OpenMetaverse. It tracks all the server connections, serializes - outgoing traffic and deserializes incoming traffic, and provides - instances of delegates for network-related events. - - - - The event subscribers, null of no subscribers - - - Raises the LoginProgress Event - A LoginProgressEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - - - - - - - - - - - Called when a reply is received from the login server, the - login sequence will block until this event returns - - - Seed CAPS URL returned from the login server - - - Current state of logging in - - - Upon login failure, contains a short string key for the - type of login error that occurred - - - The raw XML-RPC reply from the login server, exactly as it - was received (minus the HTTP header) - - - During login this contains a descriptive version of - LoginStatusCode. After a successful login this will contain the - message of the day, and after a failed login a descriptive error - message will be returned - - - Maximum number of groups an agent can belong to, -1 for unlimited - - - Server side baking service URL - - - Parsed login response data - - - A list of packets obtained during the login process which - networkmanager will log but not process - - - - Generate sane default values for a login request - - Account first name - Account last name - Account password - Client application name (channel) - Client application name + version - A populated struct containing - sane defaults - - - - Simplified login that takes the most common and required fields - - Account first name - Account last name - Account password - Client application name (channel) - Client application name + version - Whether the login was successful or not. On failure the - LoginErrorKey string will contain the error code and LoginMessage - will contain a description of the error - - - - Simplified login that takes the most common fields along with a - starting location URI, and can accept an MD5 string instead of a - plaintext password - - Account first name - Account last name - Account password or MD5 hash of the password - such as $1$1682a1e45e9f957dcdf0bb56eb43319c - Client application name (channel) - Starting location URI that can be built with - StartLocation() - Client application name + version - Whether the login was successful or not. On failure the - LoginErrorKey string will contain the error code and LoginMessage - will contain a description of the error - - - - Login that takes a struct of all the values that will be passed to - the login server - - The values that will be passed to the login - server, all fields must be set even if they are String.Empty - Whether the login was successful or not. On failure the - LoginErrorKey string will contain the error code and LoginMessage - will contain a description of the error - - - - Build a start location URI for passing to the Login function - - Name of the simulator to start in - X coordinate to start at - Y coordinate to start at - Z coordinate to start at - String with a URI that can be used to login to a specified - location - - - - LoginParams and the initial login XmlRpcRequest were made on a remote machine. - This method now initializes libomv with the results. - - - - - Handles response from XML-RPC login replies - - - - - Handles response from XML-RPC login replies with already parsed LoginResponseData - - - - - Handle response from LLSD login replies - - - - - - - - Get current OS - - Either "Win" or "Linux" - - - - Gets the current OS version number - - The platform version. - - - - Get clients default Mac Address - - A string containing the first found Mac Address - - - - Explains why a simulator or the grid disconnected from us - - - - The client requested the logout or simulator disconnect - - - The server notified us that it is disconnecting - - - Either a socket was closed or network traffic timed out - - - The last active simulator shut down - - - - Holds a simulator reference and a decoded packet, these structs are put in - the packet inbox for event handling - - - - Reference to the simulator that this packet came from - - - Packet that needs to be processed - - - - Holds a simulator reference and a serialized packet, these structs are put in - the packet outbox for sending - - - - Reference to the simulator this packet is destined for - - - Packet that needs to be sent - - - Sequence number of the wrapped packet - - - Number of times this packet has been resent - - - Environment.TickCount when this packet was last sent over the wire - - - Type of the packet - - - The event subscribers, null of no subscribers - - - Raises the PacketSent Event - A PacketSentEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the LoggedOut Event - A LoggedOutEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the SimConnecting Event - A SimConnectingEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the SimConnected Event - A SimConnectedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the SimDisconnected Event - A SimDisconnectedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the Disconnected Event - A DisconnectedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the SimChanged Event - A SimChangedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the EventQueueRunning Event - A EventQueueRunningEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - Unique identifier associated with our connections to - simulators - - - The simulator that the logged in avatar is currently - occupying - - - Shows whether the network layer is logged in to the - grid or not - - - Number of packets in the incoming queue - - - Number of packets in the outgoing queue - - - All of the simulators we are currently connected to - - - Handlers for incoming capability events - - - Handlers for incoming packets - - - Incoming packets that are awaiting handling - - - Outgoing packets that are awaiting handling - - - - Default constructor - - Reference to the GridClient object - - - - Register an event handler for a packet. This is a low level event - interface and should only be used if you are doing something not - supported in the library - - Packet type to trigger events for - Callback to fire when a packet of this type - is received - - - - Register an event handler for a packet. This is a low level event - interface and should only be used if you are doing something not - supported in the library - - Packet type to trigger events for - Callback to fire when a packet of this type - is received - True if the callback should be ran - asynchronously. Only set this to false (synchronous for callbacks - that will always complete quickly) - If any callback for a packet type is marked as - asynchronous, all callbacks for that packet type will be fired - asynchronously - - - - Unregister an event handler for a packet. This is a low level event - interface and should only be used if you are doing something not - supported in the library - - Packet type this callback is registered with - Callback to stop firing events for - - - - Register a CAPS event handler. This is a low level event interface - and should only be used if you are doing something not supported in - the library - - Name of the CAPS event to register a handler for - Callback to fire when a CAPS event is received - - - - Unregister a CAPS event handler. This is a low level event interface - and should only be used if you are doing something not supported in - the library - - Name of the CAPS event this callback is - registered with - Callback to stop firing events for - - - - Send a packet to the simulator the avatar is currently occupying - - Packet to send - - - - Send a packet to a specified simulator - - Packet to send - Simulator to send the packet to - - - - Connect to a simulator - - IP address to connect to - Port to connect to - Handle for this simulator, to identify its - location in the grid - Whether to set CurrentSim to this new - connection, use this if the avatar is moving in to this simulator - URL of the capabilities server to use for - this sim connection - A Simulator object on success, otherwise null - - - - Connect to a simulator - - IP address and port to connect to - Handle for this simulator, to identify its - location in the grid - Whether to set CurrentSim to this new - connection, use this if the avatar is moving in to this simulator - URL of the capabilities server to use for - this sim connection - A Simulator object on success, otherwise null - - - - Begins the non-blocking logout. Makes sure that the LoggedOut event is - called even if the server does not send a logout reply, and Shutdown() - is properly called. - - - - - Initiate a blocking logout request. This will return when the logout - handshake has completed or when Settings.LOGOUT_TIMEOUT - has expired and the network layer is manually shut down - - - - - Initiate the logout process. The Shutdown() function - needs to be manually called. - - - - - Close a connection to the given simulator - - - - - - - Shutdown will disconnect all the sims except for the current sim - first, and then kill the connection to CurrentSim. This should only - be called if the logout process times out on RequestLogout - - Type of shutdown - - - - Shutdown will disconnect all the sims except for the current sim - first, and then kill the connection to CurrentSim. This should only - be called if the logout process times out on RequestLogout - - Type of shutdown - Shutdown message - - - - Searches through the list of currently connected simulators to find - one attached to the given IPEndPoint - - IPEndPoint of the Simulator to search for - A Simulator reference on success, otherwise null - - - - Fire an event when an event queue connects for capabilities - - Simulator the event queue is attached to - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - - A Name Value pair with additional settings, used in the protocol - primarily to transmit avatar names and active group in object packets - - - - Type of the value - - - Unknown - - - String value - - - - - - - - - - - - - - - Deprecated - - - String value, but designated as an asset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Constructor that takes all the fields as parameters - - - - - - - - - - Constructor that takes a single line from a NameValue field - - - - - - - - - - No report - - - Unknown report type - - - Bug report - - - Complaint report - - - Customer service report - - - - Bitflag field for ObjectUpdateCompressed data blocks, describing - which options are present for each object - - - - Unknown - - - Whether the object has a TreeSpecies - - - Whether the object has floating text ala llSetText - - - Whether the object has an active particle system - - - Whether the object has sound attached to it - - - Whether the object is attached to a root object or not - - - Whether the object has texture animation settings - - - Whether the object has an angular velocity - - - Whether the object has a name value pairs string - - - Whether the object has a Media URL set - - - - Specific Flags for MultipleObjectUpdate requests - - - - None - - - Change position of prims - - - Change rotation of prims - - - Change size of prims - - - Perform operation on link set - - - Scale prims uniformly, same as selecing ctrl+shift in the - viewer. Used in conjunction with Scale - - - - Special values in PayPriceReply. If the price is not one of these - literal value of the price should be use - - - - - Indicates that this pay option should be hidden - - - - - Indicates that this pay option should have the default value - - - - - Contains the variables sent in an object update packet for objects. - Used to track position and movement of prims and avatars - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Handles all network traffic related to prims and avatar positions and - movement. - - - - The event subscribers, null of no subscribers - - - Thread sync lock object - - - Raised when the simulator sends us data containing - A , Foliage or Attachment - - - - - The event subscribers, null of no subscribers - - - Raises the ObjectProperties Event - A ObjectPropertiesEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - additional information - - - - - The event subscribers, null of no subscribers - - - Raises the ObjectPropertiesUpdated Event - A ObjectPropertiesUpdatedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - Primitive.ObjectProperties for an object we are currently tracking - - - The event subscribers, null of no subscribers - - - Raises the ObjectPropertiesFamily Event - A ObjectPropertiesFamilyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - additional and details - - - - The event subscribers, null of no subscribers - - - Raises the AvatarUpdate Event - A AvatarUpdateEventArgs object containing - the data sent from the simulator - - - - Raises the ParticleUpdate Event - - A ParticleUpdateEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - updated information for an - - - The event subscribers, null of no subscribers - - - Thread sync lock object - - - Raised when the simulator sends us data containing - and movement changes - - - The event subscribers, null of no subscribers - - - Raises the ObjectDataBlockUpdate Event - A ObjectDataBlockUpdateEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - updates to an Objects DataBlock - - - The event subscribers, null of no subscribers - - - Raises the KillObject Event - A KillObjectEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator informs us an - or is no longer within view - - - The event subscribers, null of no subscribers - - - Raises the KillObjects Event - A KillObjectsEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator informs us when a group of - or is no longer within view - - - The event subscribers, null of no subscribers - - - Raises the AvatarSitChanged Event - A AvatarSitChangedEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - updated sit information for our - - - The event subscribers, null of no subscribers - - - Raises the PayPriceReply Event - A PayPriceReplyEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - purchase price information for a - - - - Callback for getting object media data via CAP - - Indicates if the operation was succesfull - Object media version string - Array indexed on prim face of media entry data - - - The event subscribers, null of no subscribers - - - Raises the PhysicsProperties Event - A PhysicsPropertiesEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - additional information - - - - - Reference to the GridClient object - - - Does periodic dead reckoning calculation to convert - velocity and acceleration to new positions for objects - - - - Construct a new instance of the ObjectManager class - - A reference to the instance - - - - Request information for a single object from a - you are currently connected to - - The the object is located - The Local ID of the object - - - - Request information for multiple objects contained in - the same simulator - - The the objects are located - An array containing the Local IDs of the objects - - - - Attempt to purchase an original object, a copy, or the contents of - an object - - The the object is located - The Local ID of the object - Whether the original, a copy, or the object - contents are on sale. This is used for verification, if the this - sale type is not valid for the object the purchase will fail - Price of the object. This is used for - verification, if it does not match the actual price the purchase - will fail - Group ID that will be associated with the new - purchase - Inventory folder UUID where the object or objects - purchased should be placed - - - BuyObject(Client.Network.CurrentSim, 500, SaleType.Copy, - 100, UUID.Zero, Client.Self.InventoryRootFolderUUID); - - - - - - Request prices that should be displayed in pay dialog. This will triggger the simulator - to send us back a PayPriceReply which can be handled by OnPayPriceReply event - - The the object is located - The ID of the object - The result is raised in the event - - - - Select a single object. This will cause the to send us - an which will raise the event - - The the object is located - The Local ID of the object - - - - - Select a single object. This will cause the to send us - an which will raise the event - - The the object is located - The Local ID of the object - if true, a call to is - made immediately following the request - - - - - Select multiple objects. This will cause the to send us - an which will raise the event - - The the objects are located - An array containing the Local IDs of the objects - Should objects be deselected immediately after selection - - - - - Select multiple objects. This will cause the to send us - an which will raise the event - - The the objects are located - An array containing the Local IDs of the objects - - - - - Update the properties of an object - - The the object is located - The Local ID of the object - true to turn the objects physical property on - true to turn the objects temporary property on - true to turn the objects phantom property on - true to turn the objects cast shadows property on - - - - Update the properties of an object - - The the object is located - The Local ID of the object - true to turn the objects physical property on - true to turn the objects temporary property on - true to turn the objects phantom property on - true to turn the objects cast shadows property on - Type of the represetnation prim will have in the physics engine - Density - normal value 1000 - Friction - normal value 0.6 - Restitution - standard value 0.5 - Gravity multiplier - standar value 1.0 - - - - Sets the sale properties of a single object - - The the object is located - The Local ID of the object - One of the options from the enum - The price of the object - - - - Sets the sale properties of multiple objects - - The the objects are located - An array containing the Local IDs of the objects - One of the options from the enum - The price of the object - - - - Deselect a single object - - The the object is located - The Local ID of the object - - - - Deselect multiple objects. - - The the objects are located - An array containing the Local IDs of the objects - - - - Perform a click action on an object - - The the object is located - The Local ID of the object - - - - Perform a click action (Grab) on a single object - - The the object is located - The Local ID of the object - The texture coordinates to touch - The surface coordinates to touch - The face of the position to touch - The region coordinates of the position to touch - The surface normal of the position to touch (A normal is a vector perpindicular to the surface) - The surface binormal of the position to touch (A binormal is a vector tangen to the surface - pointing along the U direction of the tangent space - - - - Create (rez) a new prim object in a simulator - - A reference to the object to place the object in - Data describing the prim object to rez - Group ID that this prim will be set to, or UUID.Zero if you - do not want the object to be associated with a specific group - An approximation of the position at which to rez the prim - Scale vector to size this prim - Rotation quaternion to rotate this prim - Due to the way client prim rezzing is done on the server, - the requested position for an object is only close to where the prim - actually ends up. If you desire exact placement you'll need to - follow up by moving the object after it has been created. This - function will not set textures, light and flexible data, or other - extended primitive properties - - - - Create (rez) a new prim object in a simulator - - A reference to the object to place the object in - Data describing the prim object to rez - Group ID that this prim will be set to, or UUID.Zero if you - do not want the object to be associated with a specific group - An approximation of the position at which to rez the prim - Scale vector to size this prim - Rotation quaternion to rotate this prim - Specify the - Due to the way client prim rezzing is done on the server, - the requested position for an object is only close to where the prim - actually ends up. If you desire exact placement you'll need to - follow up by moving the object after it has been created. This - function will not set textures, light and flexible data, or other - extended primitive properties - - - - Rez a Linden tree - - A reference to the object where the object resides - The size of the tree - The rotation of the tree - The position of the tree - The Type of tree - The of the group to set the tree to, - or UUID.Zero if no group is to be set - true to use the "new" Linden trees, false to use the old - - - - Rez grass and ground cover - - A reference to the object where the object resides - The size of the grass - The rotation of the grass - The position of the grass - The type of grass from the enum - The of the group to set the tree to, - or UUID.Zero if no group is to be set - - - - Set the textures to apply to the faces of an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - The texture data to apply - - - - Set the textures to apply to the faces of an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - The texture data to apply - A media URL (not used) - - - - Set the Light data on an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - A object containing the data to set - - - - Set the flexible data on an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - A object containing the data to set - - - - Set the sculptie texture and data on an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - A object containing the data to set - - - - Unset additional primitive parameters on an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - The extra parameters to set - - - - Link multiple prims into a linkset - - A reference to the object where the objects reside - An array which contains the IDs of the objects to link - The last object in the array will be the root object of the linkset TODO: Is this true? - - - - Delink/Unlink multiple prims from a linkset - - A reference to the object where the objects reside - An array which contains the IDs of the objects to delink - - - - Change the rotation of an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - The new rotation of the object - - - - Set the name of an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - A string containing the new name of the object - - - - Set the name of multiple objects - - A reference to the object where the objects reside - An array which contains the IDs of the objects to change the name of - An array which contains the new names of the objects - - - - Set the description of an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - A string containing the new description of the object - - - - Set the descriptions of multiple objects - - A reference to the object where the objects reside - An array which contains the IDs of the objects to change the description of - An array which contains the new descriptions of the objects - - - - Attach an object to this avatar - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - The point on the avatar the object will be attached - The rotation of the attached object - - - - Drop an attached object from this avatar - - A reference to the - object where the objects reside. This will always be the simulator the avatar is currently in - - The object's ID which is local to the simulator the object is in - - - - Detach an object from yourself - - A reference to the - object where the objects reside - - This will always be the simulator the avatar is currently in - - An array which contains the IDs of the objects to detach - - - - Change the position of an object, Will change position of entire linkset - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - The new position of the object - - - - Change the position of an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - The new position of the object - if true, will change position of (this) child prim only, not entire linkset - - - - Change the Scale (size) of an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - The new scale of the object - If true, will change scale of this prim only, not entire linkset - True to resize prims uniformly - - - - Change the Rotation of an object that is either a child or a whole linkset - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - The new scale of the object - If true, will change rotation of this prim only, not entire linkset - - - - Send a Multiple Object Update packet to change the size, scale or rotation of a primitive - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - The new rotation, size, or position of the target object - The flags from the Enum - - - - Deed an object (prim) to a group, Object must be shared with group which - can be accomplished with SetPermissions() - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - The of the group to deed the object to - - - - Deed multiple objects (prims) to a group, Objects must be shared with group which - can be accomplished with SetPermissions() - - A reference to the object where the object resides - An array which contains the IDs of the objects to deed - The of the group to deed the object to - - - - Set the permissions on multiple objects - - A reference to the object where the objects reside - An array which contains the IDs of the objects to set the permissions on - The new Who mask to set - Which permission to modify - The new state of permission - - - - Request additional properties for an object - - A reference to the object where the object resides - - - - - Request additional properties for an object - - A reference to the object where the object resides - Absolute UUID of the object - Whether to require server acknowledgement of this request - - - - Set the ownership of a list of objects to the specified group - - A reference to the object where the objects reside - An array which contains the IDs of the objects to set the group id on - The Groups ID - - - - Update current URL of the previously set prim media - - UUID of the prim - Set current URL to this - Prim face number - Simulator in which prim is located - - - - Set object media - - UUID of the prim - Array the length of prims number of faces. Null on face indexes where there is - no media, on faces which contain the media - Simulatior in which prim is located - - - - Retrieve information about object media - - UUID of the primitive - Simulator where prim is located - Call this callback when done - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - - A terse object update, used when a transformation matrix or - velocity/acceleration for an object changes but nothing else - (scale/position/rotation/acceleration/velocity) - - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - - - - - - - - - - Setup construction data for a basic primitive shape - - Primitive shape to construct - Construction data that can be plugged into a - - - - - - - - - - - - - - - - - - - - Set the Shape data of an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - Data describing the prim shape - - - - Set the Material data of an object - - A reference to the object where the object resides - The objects ID which is local to the simulator the object is in - The new material of the object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Provides data for the event - The event occurs when the simulator sends - an containing a Primitive, Foliage or Attachment data - Note 1: The event will not be raised when the object is an Avatar - Note 2: It is possible for the to be - raised twice for the same object if for example the primitive moved to a new simulator, then returned to the current simulator or - if an Avatar crosses the border into a new simulator and returns to the current simulator - - - The following code example uses the , , and - properties to display new Primitives and Attachments on the window. - - // Subscribe to the event that gives us prim and foliage information - Client.Objects.ObjectUpdate += Objects_ObjectUpdate; - - - private void Objects_ObjectUpdate(object sender, PrimEventArgs e) - { - Console.WriteLine("Primitive {0} {1} in {2} is an attachment {3}", e.Prim.ID, e.Prim.LocalID, e.Simulator.Name, e.IsAttachment); - } - - - - - - - - Get the simulator the originated from - - - Get the details - - - true if the did not exist in the dictionary before this update (always true if object tracking has been disabled) - - - true if the is attached to an - - - Get the simulator Time Dilation - - - - Construct a new instance of the PrimEventArgs class - - The simulator the object originated from - The Primitive - The simulator time dilation - The prim was not in the dictionary before this update - true if the primitive represents an attachment to an agent - - - Provides data for the event - The event occurs when the simulator sends - an containing Avatar data - Note 1: The event will not be raised when the object is an Avatar - Note 2: It is possible for the to be - raised twice for the same avatar if for example the avatar moved to a new simulator, then returned to the current simulator - - - The following code example uses the property to make a request for the top picks - using the method in the class to display the names - of our own agents picks listings on the window. - - // subscribe to the AvatarUpdate event to get our information - Client.Objects.AvatarUpdate += Objects_AvatarUpdate; - Client.Avatars.AvatarPicksReply += Avatars_AvatarPicksReply; - - private void Objects_AvatarUpdate(object sender, AvatarUpdateEventArgs e) - { - // we only want our own data - if (e.Avatar.LocalID == Client.Self.LocalID) - { - // Unsubscribe from the avatar update event to prevent a loop - // where we continually request the picks every time we get an update for ourselves - Client.Objects.AvatarUpdate -= Objects_AvatarUpdate; - // make the top picks request through AvatarManager - Client.Avatars.RequestAvatarPicks(e.Avatar.ID); - } - } - - private void Avatars_AvatarPicksReply(object sender, AvatarPicksReplyEventArgs e) - { - // we'll unsubscribe from the AvatarPicksReply event since we now have the data - // we were looking for - Client.Avatars.AvatarPicksReply -= Avatars_AvatarPicksReply; - // loop through the dictionary and extract the names of the top picks from our profile - foreach (var pickName in e.Picks.Values) - { - Console.WriteLine(pickName); - } - } - - - - - - - Get the simulator the object originated from - - - Get the data - - - Get the simulator time dilation - - - true if the did not exist in the dictionary before this update (always true if avatar tracking has been disabled) - - - - Construct a new instance of the AvatarUpdateEventArgs class - - The simulator the packet originated from - The data - The simulator time dilation - The avatar was not in the dictionary before this update - - - Get the simulator the object originated from - - - Get the data - - - Get source - - - - Construct a new instance of the ParticleUpdateEventArgs class - - The simulator the packet originated from - The ParticleSystem data - The Primitive source - - - Provides additional primitive data for the event - The event occurs when the simulator sends - an containing additional details for a Primitive, Foliage data or Attachment data - The event is also raised when a request is - made. - - - The following code example uses the , and - - properties to display new attachments and send a request for additional properties containing the name of the - attachment then display it on the window. - - // Subscribe to the event that provides additional primitive details - Client.Objects.ObjectProperties += Objects_ObjectProperties; - - // handle the properties data that arrives - private void Objects_ObjectProperties(object sender, ObjectPropertiesEventArgs e) - { - Console.WriteLine("Primitive Properties: {0} Name is {1}", e.Properties.ObjectID, e.Properties.Name); - } - - - - - Get the simulator the object is located - - - Get the primitive properties - - - - Construct a new instance of the ObjectPropertiesEventArgs class - - The simulator the object is located - The primitive Properties - - - Provides additional primitive data for the event - The event occurs when the simulator sends - an containing additional details for a Primitive or Foliage data that is currently - being tracked in the dictionary - The event is also raised when a request is - made and is enabled - - - - Get the primitive details - - - - Construct a new instance of the ObjectPropertiesUpdatedEvenrArgs class - - The simulator the object is located - The Primitive - The primitive Properties - - - Provides additional primitive data, permissions and sale info for the event - The event occurs when the simulator sends - an containing additional details for a Primitive, Foliage data or Attachment. This includes - Permissions, Sale info, and other basic details on an object - The event is also raised when a request is - made, the viewer equivalent is hovering the mouse cursor over an object - - - - Get the simulator the object is located - - - - - - - - - Provides primitive data containing updated location, velocity, rotation, textures for the event - The event occurs when the simulator sends updated location, velocity, rotation, etc - - - - Get the simulator the object is located - - - Get the primitive details - - - - - - - - - - - - - - Get the simulator the object is located - - - Get the primitive details - - - - - - - - - - - - - - - Provides notification when an Avatar, Object or Attachment is DeRezzed or moves out of the avatars view for the - event - - - Get the simulator the object is located - - - The LocalID of the object - - - Provides notification when an Avatar, Object or Attachment is DeRezzed or moves out of the avatars view for the - event - - - Get the simulator the object is located - - - The LocalID of the object - - - - Provides updates sit position data - - - - Get the simulator the object is located - - - - - - - - - - - - - - - - - Get the simulator the object is located - - - - - - - - - - - - - Indicates if the operation was successful - - - - - Media version string - - - - - Array of media entries indexed by face number - - - - - Set when simulator sends us infomation on primitive's physical properties - - - - Simulator where the message originated - - - Updated physical properties - - - - Constructor - - Simulator where the message originated - Updated physical properties - - - Size of the byte array used to store raw packet data - - - Raw packet data buffer - - - Length of the data to transmit - - - EndPoint of the remote host - - - - Create an allocated UDP packet buffer for receiving a packet - - - - - Create an allocated UDP packet buffer for sending a packet - - EndPoint of the remote host - - - - Create an allocated UDP packet buffer for sending a packet - - EndPoint of the remote host - Size of the buffer to allocate for packet data - - - - Object pool for packet buffers. This is used to allocate memory for all - incoming and outgoing packets, and zerocoding buffers for those packets - - - - - Initialize the object pool in client mode - - Server to connect to - - - - - - Initialize the object pool in server mode - - - - - - - Returns a packet buffer with EndPoint set if the buffer is in - client mode, or with EndPoint set to null in server mode - - Initialized UDPPacketBuffer object - - - - Default constructor - - - - - Check a packet buffer out of the pool - - A packet buffer object - - - - Returns an instance of the class that has been checked out of the Object Pool. - - - - - Checks the instance back into the object pool - - - - - Creates a new instance of the ObjectPoolBase class. Initialize MUST be called - after using this constructor. - - - - - Creates a new instance of the ObjectPool Base class. - - The object pool is composed of segments, which - are allocated whenever the size of the pool is exceeded. The number of items - in a segment should be large enough that allocating a new segmeng is a rare - thing. For example, on a server that will have 10k people logged in at once, - the receive buffer object pool should have segment sizes of at least 1000 - byte arrays per segment. - - The minimun number of segments that may exist. - Perform a full GC.Collect whenever a segment is allocated, and then again after allocation to compact the heap. - The frequency which segments are checked to see if they're eligible for cleanup. - - - - Forces the segment cleanup algorithm to be run. This method is intended - primarly for use from the Unit Test libraries. - - - - - Responsible for allocate 1 instance of an object that will be stored in a segment. - - An instance of whatever objec the pool is pooling. - - - - Checks in an instance of T owned by the object pool. This method is only intended to be called - by the WrappedObject class. - - The segment from which the instance is checked out. - The instance of T to check back into the segment. - - - - Checks an instance of T from the pool. If the pool is not sufficient to - allow the checkout, a new segment is created. - - A WrappedObject around the instance of T. To check - the instance back into the segment, be sureto dispose the WrappedObject - when finished. - - - - The total number of segments created. Intended to be used by the Unit Tests. - - - - - The number of items that are in a segment. Items in a segment - are all allocated at the same time, and are hopefully close to - each other in the managed heap. - - - - - The minimum number of segments. When segments are reclaimed, - this number of segments will always be left alone. These - segments are allocated at startup. - - - - - The age a segment must be before it's eligible for cleanup. - This is used to prevent thrash, and typical values are in - the 5 minute range. - - - - - The frequence which the cleanup thread runs. This is typically - expected to be in the 5 minute range. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The ObservableDictionary class is used for storing key/value pairs. It has methods for firing - events to subscribers when items are added, removed, or changed. - - Key - Value - - - - A dictionary of callbacks to fire when specified action occurs - - - - - Register a callback to be fired when an action occurs - - The action - The callback to fire - - - - Unregister a callback - - The action - The callback to fire - - - - - - - - - - Internal dictionary that this class wraps around. Do not - modify or enumerate the contents of this dictionary without locking - - - - Gets the number of Key/Value pairs contained in the - - - - - Initializes a new instance of the Class - with the specified key/value, has the default initial capacity. - - - - // initialize a new ObservableDictionary named testDict with a string as the key and an int as the value. - public ObservableDictionary<string, int> testDict = new ObservableDictionary<string, int>(); - - - - - - Initializes a new instance of the Class - with the specified key/value, With its initial capacity specified. - - Initial size of dictionary - - - // initialize a new ObservableDictionary named testDict with a string as the key and an int as the value, - // initially allocated room for 10 entries. - public ObservableDictionary<string, int> testDict = new ObservableDictionary<string, int>(10); - - - - - - Try to get entry from the with specified key - - Key to use for lookup - Value returned - if specified key exists, if not found - - - // find your avatar using the Simulator.ObjectsAvatars ObservableDictionary: - Avatar av; - if (Client.Network.CurrentSim.ObjectsAvatars.TryGetValue(Client.Self.AgentID, out av)) - Console.WriteLine("Found Avatar {0}", av.Name); - - - - - - - Finds the specified match. - - The match. - Matched value - - - // use a delegate to find a prim in the ObjectsPrimitives ObservableDictionary - // with the ID 95683496 - uint findID = 95683496; - Primitive findPrim = sim.ObjectsPrimitives.Find( - delegate(Primitive prim) { return prim.ID == findID; }); - - - - - Find All items in an - return matching items. - a containing found items. - - Find All prims within 20 meters and store them in a List - - int radius = 20; - List<Primitive> prims = Client.Network.CurrentSim.ObjectsPrimitives.FindAll( - delegate(Primitive prim) { - Vector3 pos = prim.Position; - return ((prim.ParentID == 0) && (pos != Vector3.Zero) && (Vector3.Distance(pos, location) < radius)); - } - ); - - - - - Find All items in an - return matching keys. - a containing found keys. - - Find All keys which also exist in another dictionary - - List<UUID> matches = myDict.FindAll( - delegate(UUID id) { - return myOtherDict.ContainsKey(id); - } - ); - - - - - Check if Key exists in Dictionary - Key to check for - if found, otherwise - - - Check if Value exists in Dictionary - Value to check for - if found, otherwise - - - - Adds the specified key to the dictionary, dictionary locking is not performed, - - - The key - The value - - - - Removes the specified key, dictionary locking is not performed - - The key. - if successful, otherwise - - - - Indexer for the dictionary - - The key - The value - - - - Clear the contents of the dictionary - - - - - Enumerator for iterating dictionary entries - - - - - - Provides helper methods for parallelizing loops - - - - - Executes a for loop in which iterations may run in parallel - - The loop will be started at this index - The loop will be terminated before this index is reached - Method body to run for each iteration of the loop - - - - Executes a for loop in which iterations may run in parallel - - The number of concurrent execution threads to run - The loop will be started at this index - The loop will be terminated before this index is reached - Method body to run for each iteration of the loop - - - - Executes a foreach loop in which iterations may run in parallel - - Object type that the collection wraps - An enumerable collection to iterate over - Method body to run for each object in the collection - - - - Executes a foreach loop in which iterations may run in parallel - - Object type that the collection wraps - The number of concurrent execution threads to run - An enumerable collection to iterate over - Method body to run for each object in the collection - - - - Executes a series of tasks in parallel - - A series of method bodies to execute - - - - Executes a series of tasks in parallel - - The number of concurrent execution threads to run - A series of method bodies to execute - - - - Type of return to use when returning objects from a parcel - - - - - - - Return objects owned by parcel owner - - - Return objects set to group - - - Return objects not owned by parcel owner or set to group - - - Return a specific list of objects on parcel - - - Return objects that are marked for-sale - - - - Blacklist/Whitelist flags used in parcels Access List - - - - Agent is denied access - - - Agent is granted access - - - - The result of a request for parcel properties - - - - No matches were found for the request - - - Request matched a single parcel - - - Request matched multiple parcels - - - - Flags used in the ParcelAccessListRequest packet to specify whether - we want the access list (whitelist), ban list (blacklist), or both - - - - Request the access list - - - Request the ban list - - - Request both White and Black lists - - - - Sequence ID in ParcelPropertiesReply packets (sent when avatar - tries to cross a parcel border) - - - - Parcel is currently selected - - - Parcel restricted to a group the avatar is not a - member of - - - Avatar is banned from the parcel - - - Parcel is restricted to an access list that the - avatar is not on - - - Response to hovering over a parcel - - - - The tool to use when modifying terrain levels - - - - Level the terrain - - - Raise the terrain - - - Lower the terrain - - - Smooth the terrain - - - Add random noise to the terrain - - - Revert terrain to simulator default - - - - The tool size to use when changing terrain levels - - - - Small - - - Medium - - - Large - - - - Reasons agent is denied access to a parcel on the simulator - - - - Agent is not denied, access is granted - - - Agent is not a member of the group set for the parcel, or which owns the parcel - - - Agent is not on the parcels specific allow list - - - Agent is on the parcels ban list - - - Unknown - - - Agent is not age verified and parcel settings deny access to non age verified avatars - - - - Parcel overlay type. This is used primarily for highlighting and - coloring which is why it is a single integer instead of a set of - flags - - These values seem to be poorly thought out. The first three - bits represent a single value, not flags. For example Auction (0x05) is - not a combination of OwnedByOther (0x01) and ForSale(0x04). However, - the BorderWest and BorderSouth values are bit flags that get attached - to the value stored in the first three bits. Bits four, five, and six - are unused - - - Public land - - - Land is owned by another avatar - - - Land is owned by a group - - - Land is owned by the current avatar - - - Land is for sale - - - Land is being auctioned - - - Land is private - - - To the west of this area is a parcel border - - - To the south of this area is a parcel border - - - - Various parcel properties - - - - No flags set - - - Allow avatars to fly (a client-side only restriction) - - - Allow foreign scripts to run - - - This parcel is for sale - - - Allow avatars to create a landmark on this parcel - - - Allows all avatars to edit the terrain on this parcel - - - Avatars have health and can take damage on this parcel. - If set, avatars can be killed and sent home here - - - Foreign avatars can create objects here - - - All objects on this parcel can be purchased - - - Access is restricted to a group - - - Access is restricted to a whitelist - - - Ban blacklist is enabled - - - Unknown - - - List this parcel in the search directory - - - Allow personally owned parcels to be deeded to group - - - If Deeded, owner contributes required tier to group parcel is deeded to - - - Restrict sounds originating on this parcel to the - parcel boundaries - - - Objects on this parcel are sold when the land is - purchsaed - - - Allow this parcel to be published on the web - - - The information for this parcel is mature content - - - The media URL is an HTML page - - - The media URL is a raw HTML string - - - Restrict foreign object pushes - - - Ban all non identified/transacted avatars - - - Allow group-owned scripts to run - - - Allow object creation by group members or group - objects - - - Allow all objects to enter this parcel - - - Only allow group and owner objects to enter this parcel - - - Voice Enabled on this parcel - - - Use Estate Voice channel for Voice on this parcel - - - Deny Age Unverified Users - - - - Parcel ownership status - - - - Placeholder - - - Parcel is leased (owned) by an avatar or group - - - Parcel is in process of being leased (purchased) by an avatar or group - - - Parcel has been abandoned back to Governor Linden - - - - Category parcel is listed in under search - - - - No assigned category - - - Linden Infohub or public area - - - Adult themed area - - - Arts and Culture - - - Business - - - Educational - - - Gaming - - - Hangout or Club - - - Newcomer friendly - - - Parks and Nature - - - Residential - - - Shopping - - - Not Used? - - - Other - - - Not an actual category, only used for queries - - - - Type of teleport landing for a parcel - - - - Unset, simulator default - - - Specific landing point set for this parcel - - - No landing point set, direct teleports enabled for - this parcel - - - - Parcel Media Command used in ParcelMediaCommandMessage - - - - Stop the media stream and go back to the first frame - - - Pause the media stream (stop playing but stay on current frame) - - - Start the current media stream playing and stop when the end is reached - - - Start the current media stream playing, - loop to the beginning when the end is reached and continue to play - - - Specifies the texture to replace with video - If passing the key of a texture, it must be explicitly typecast as a key, - not just passed within double quotes. - - - Specifies the movie URL (254 characters max) - - - Specifies the time index at which to begin playing - - - Specifies a single agent to apply the media command to - - - Unloads the stream. While the stop command sets the texture to the first frame of the movie, - unload resets it to the real texture that the movie was replacing. - - - Turn on/off the auto align feature, similar to the auto align checkbox in the parcel media properties - (NOT to be confused with the "align" function in the textures view of the editor!) Takes TRUE or FALSE as parameter. - - - Allows a Web page or image to be placed on a prim (1.19.1 RC0 and later only). - Use "text/html" for HTML. - - - Resizes a Web page to fit on x, y pixels (1.19.1 RC0 and later only). - This might still not be working - - - Sets a description for the media being displayed (1.19.1 RC0 and later only). - - - - Some information about a parcel of land returned from a DirectoryManager search - - - - Global Key of record - - - Parcel Owners - - - Name field of parcel, limited to 128 characters - - - Description field of parcel, limited to 256 characters - - - Total Square meters of parcel - - - Total area billable as Tier, for group owned land this will be 10% less than ActualArea - - - True of parcel is in Mature simulator - - - Grid global X position of parcel - - - Grid global Y position of parcel - - - Grid global Z position of parcel (not used) - - - Name of simulator parcel is located in - - - Texture of parcels display picture - - - Float representing calculated traffic based on time spent on parcel by avatars - - - Sale price of parcel (not used) - - - Auction ID of parcel - - - - Parcel Media Information - - - - A byte, if 0x1 viewer should auto scale media to fit object - - - A boolean, if true the viewer should loop the media - - - The Asset UUID of the Texture which when applied to a - primitive will display the media - - - A URL which points to any Quicktime supported media type - - - A description of the media - - - An Integer which represents the height of the media - - - An integer which represents the width of the media - - - A string which contains the mime type of the media - - - - Parcel of land, a portion of virtual real estate in a simulator - - - - The total number of contiguous 4x4 meter blocks your agent owns within this parcel - - - The total number of contiguous 4x4 meter blocks contained in this parcel owned by a group or agent other than your own - - - Deprecated, Value appears to always be 0 - - - Simulator-local ID of this parcel - - - UUID of the owner of this parcel - - - Whether the land is deeded to a group or not - - - - - - Date land was claimed - - - Appears to always be zero - - - This field is no longer used - - - Minimum corner of the axis-aligned bounding box for this - parcel - - - Maximum corner of the axis-aligned bounding box for this - parcel - - - Bitmap describing land layout in 4x4m squares across the - entire region - - - Total parcel land area - - - - - - Maximum primitives across the entire simulator owned by the same agent or group that owns this parcel that can be used - - - Total primitives across the entire simulator calculated by combining the allowed prim counts for each parcel - owned by the agent or group that owns this parcel - - - Maximum number of primitives this parcel supports - - - Total number of primitives on this parcel - - - For group-owned parcels this indicates the total number of prims deeded to the group, - for parcels owned by an individual this inicates the number of prims owned by the individual - - - Total number of primitives owned by the parcel group on - this parcel, or for parcels owned by an individual with a group set the - total number of prims set to that group. - - - Total number of prims owned by other avatars that are not set to group, or not the parcel owner - - - A bonus multiplier which allows parcel prim counts to go over times this amount, this does not affect - the max prims per simulator. e.g: 117 prim parcel limit x 1.5 bonus = 175 allowed - - - Autoreturn value in minutes for others' objects - - - - - - Sale price of the parcel, only useful if ForSale is set - The SalePrice will remain the same after an ownership - transfer (sale), so it can be used to see the purchase price after - a sale if the new owner has not changed it - - - Parcel Name - - - Parcel Description - - - URL For Music Stream - - - - - - Price for a temporary pass - - - How long is pass valid for - - - - - - Key of authorized buyer - - - Key of parcel snapshot - - - The landing point location - - - The landing point LookAt - - - The type of landing enforced from the enum - - - - - - - - - - - - Access list of who is whitelisted on this - parcel - - - Access list of who is blacklisted on this - parcel - - - TRUE of region denies access to age unverified users - - - true to obscure (hide) media url - - - true to obscure (hide) music url - - - A struct containing media details - - - - Displays a parcel object in string format - - string containing key=value pairs of a parcel object - - - - Defalt constructor - - Local ID of this parcel - - - - Update the simulator with any local changes to this Parcel object - - Simulator to send updates to - Whether we want the simulator to confirm - the update with a reply packet or not - - - - Set Autoreturn time - - Simulator to send the update to - - - - Parcel (subdivided simulator lots) subsystem - - - - - Parcel Accesslist - - - - Agents - - - - - - Flags for specific entry in white/black lists - - - - Owners of primitives on parcel - - - - Prim Owners - - - True of owner is group - - - Total count of prims owned by OwnerID - - - true of OwnerID is currently online and is not a group - - - The date of the most recent prim left by OwnerID - - - - Called once parcel resource usage information has been collected - - Indicates if operation was successfull - Parcel resource usage information - - - The event subscribers. null if no subcribers - - - Raises the ParcelDwellReply event - A ParcelDwellReplyEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a request - - - The event subscribers. null if no subcribers - - - Raises the ParcelInfoReply event - A ParcelInfoReplyEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a request - - - The event subscribers. null if no subcribers - - - Raises the ParcelProperties event - A ParcelPropertiesEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a request - - - The event subscribers. null if no subcribers - - - Raises the ParcelAccessListReply event - A ParcelAccessListReplyEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a request - - - The event subscribers. null if no subcribers - - - Raises the ParcelObjectOwnersReply event - A ParcelObjectOwnersReplyEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a request - - - The event subscribers. null if no subcribers - - - Raises the SimParcelsDownloaded event - A SimParcelsDownloadedEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a request - - - The event subscribers. null if no subcribers - - - Raises the ForceSelectObjectsReply event - A ForceSelectObjectsReplyEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a request - - - The event subscribers. null if no subcribers - - - Raises the ParcelMediaUpdateReply event - A ParcelMediaUpdateReplyEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds to a Parcel Update request - - - The event subscribers. null if no subcribers - - - Raises the ParcelMediaCommand event - A ParcelMediaCommandEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the parcel your agent is located sends a ParcelMediaCommand - - - - Default constructor - - A reference to the GridClient object - - - - Request basic information for a single parcel - - Simulator-local ID of the parcel - - - - Request properties of a single parcel - - Simulator containing the parcel - Simulator-local ID of the parcel - An arbitrary integer that will be returned - with the ParcelProperties reply, useful for distinguishing between - multiple simultaneous requests - - - - Request the access list for a single parcel - - Simulator containing the parcel - Simulator-local ID of the parcel - An arbitrary integer that will be returned - with the ParcelAccessList reply, useful for distinguishing between - multiple simultaneous requests - - - - - Request properties of parcels using a bounding box selection - - Simulator containing the parcel - Northern boundary of the parcel selection - Eastern boundary of the parcel selection - Southern boundary of the parcel selection - Western boundary of the parcel selection - An arbitrary integer that will be returned - with the ParcelProperties reply, useful for distinguishing between - different types of parcel property requests - A boolean that is returned with the - ParcelProperties reply, useful for snapping focus to a single - parcel - - - - Request all simulator parcel properties (used for populating the Simulator.Parcels - dictionary) - - Simulator to request parcels from (must be connected) - - - - Request all simulator parcel properties (used for populating the Simulator.Parcels - dictionary) - - Simulator to request parcels from (must be connected) - If TRUE, will force a full refresh - Number of milliseconds to pause in between each request - - - - Request the dwell value for a parcel - - Simulator containing the parcel - Simulator-local ID of the parcel - - - - Send a request to Purchase a parcel of land - - The Simulator the parcel is located in - The parcels region specific local ID - true if this parcel is being purchased by a group - The groups - true to remove tier contribution if purchase is successful - The parcels size - The purchase price of the parcel - - - - - Reclaim a parcel of land - - The simulator the parcel is in - The parcels region specific local ID - - - - Deed a parcel to a group - - The simulator the parcel is in - The parcels region specific local ID - The groups - - - - Request prim owners of a parcel of land. - - Simulator parcel is in - The parcels region specific local ID - - - - Return objects from a parcel - - Simulator parcel is in - The parcels region specific local ID - the type of objects to return, - A list containing object owners s to return - - - - Subdivide (split) a parcel - - - - - - - - - - Join two parcels of land creating a single parcel - - - - - - - - - - Get a parcels LocalID - - Simulator parcel is in - Vector3 position in simulator (Z not used) - 0 on failure, or parcel LocalID on success. - A call to Parcels.RequestAllSimParcels is required to populate map and - dictionary. - - - - Terraform (raise, lower, etc) an area or whole parcel of land - - Simulator land area is in. - LocalID of parcel, or -1 if using bounding box - From Enum, Raise, Lower, Level, Smooth, Etc. - Size of area to modify - true on successful request sent. - Settings.STORE_LAND_PATCHES must be true, - Parcel information must be downloaded using RequestAllSimParcels() - - - - Terraform (raise, lower, etc) an area or whole parcel of land - - Simulator land area is in. - west border of area to modify - south border of area to modify - east border of area to modify - north border of area to modify - From Enum, Raise, Lower, Level, Smooth, Etc. - Size of area to modify - true on successful request sent. - Settings.STORE_LAND_PATCHES must be true, - Parcel information must be downloaded using RequestAllSimParcels() - - - - Terraform (raise, lower, etc) an area or whole parcel of land - - Simulator land area is in. - LocalID of parcel, or -1 if using bounding box - west border of area to modify - south border of area to modify - east border of area to modify - north border of area to modify - From Enum, Raise, Lower, Level, Smooth, Etc. - Size of area to modify - How many meters + or - to lower, 1 = 1 meter - true on successful request sent. - Settings.STORE_LAND_PATCHES must be true, - Parcel information must be downloaded using RequestAllSimParcels() - - - - Terraform (raise, lower, etc) an area or whole parcel of land - - Simulator land area is in. - LocalID of parcel, or -1 if using bounding box - west border of area to modify - south border of area to modify - east border of area to modify - north border of area to modify - From Enum, Raise, Lower, Level, Smooth, Etc. - Size of area to modify - How many meters + or - to lower, 1 = 1 meter - Height at which the terraform operation is acting at - - - - Sends a request to the simulator to return a list of objects owned by specific owners - - Simulator local ID of parcel - Owners, Others, Etc - List containing keys of avatars objects to select; - if List is null will return Objects of type selectType - Response data is returned in the event - - - - Eject and optionally ban a user from a parcel - - target key of avatar to eject - true to also ban target - - - - Freeze or unfreeze an avatar over your land - - target key to freeze - true to freeze, false to unfreeze - - - - Abandon a parcel of land - - Simulator parcel is in - Simulator local ID of parcel - - - - Requests the UUID of the parcel in a remote region at a specified location - - Location of the parcel in the remote region - Remote region handle - Remote region UUID - If successful UUID of the remote parcel, UUID.Zero otherwise - - - - Retrieves information on resources used by the parcel - - UUID of the parcel - Should per object resource usage be requested - Callback invoked when the request is complete - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - Raises the event - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - Raises the event - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - Raises the event - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - Raises the event - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - Raises the event - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - Raises the event - - - Contains a parcels dwell data returned from the simulator in response to an - - - Get the global ID of the parcel - - - Get the simulator specific ID of the parcel - - - Get the calculated dwell - - - - Construct a new instance of the ParcelDwellReplyEventArgs class - - The global ID of the parcel - The simulator specific ID of the parcel - The calculated dwell for the parcel - - - Contains basic parcel information data returned from the - simulator in response to an request - - - Get the object containing basic parcel info - - - - Construct a new instance of the ParcelInfoReplyEventArgs class - - The object containing basic parcel info - - - Contains basic parcel information data returned from the simulator in response to an request - - - Get the simulator the parcel is located in - - - Get the object containing the details - If Result is NoData, this object will not contain valid data - - - Get the result of the request - - - Get the number of primitieves your agent is - currently selecting and or sitting on in this parcel - - - Get the user assigned ID used to correlate a request with - these results - - - TODO: - - - - Construct a new instance of the ParcelPropertiesEventArgs class - - The object containing the details - The object containing the details - The result of the request - The number of primitieves your agent is - currently selecting and or sitting on in this parcel - The user assigned ID used to correlate a request with - these results - TODO: - - - Contains blacklist and whitelist data returned from the simulator in response to an request - - - Get the simulator the parcel is located in - - - Get the user assigned ID used to correlate a request with - these results - - - Get the simulator specific ID of the parcel - - - TODO: - - - Get the list containing the white/blacklisted agents for the parcel - - - - Construct a new instance of the ParcelAccessListReplyEventArgs class - - The simulator the parcel is located in - The user assigned ID used to correlate a request with - these results - The simulator specific ID of the parcel - TODO: - The list containing the white/blacklisted agents for the parcel - - - Contains blacklist and whitelist data returned from the - simulator in response to an request - - - Get the simulator the parcel is located in - - - Get the list containing prim ownership counts - - - - Construct a new instance of the ParcelObjectOwnersReplyEventArgs class - - The simulator the parcel is located in - The list containing prim ownership counts - - - Contains the data returned when all parcel data has been retrieved from a simulator - - - Get the simulator the parcel data was retrieved from - - - A dictionary containing the parcel data where the key correlates to the ParcelMap entry - - - Get the multidimensional array containing a x,y grid mapped - to each 64x64 parcel's LocalID. - - - - Construct a new instance of the SimParcelsDownloadedEventArgs class - - The simulator the parcel data was retrieved from - The dictionary containing the parcel data - The multidimensional array containing a x,y grid mapped - to each 64x64 parcel's LocalID. - - - Contains the data returned when a request - - - Get the simulator the parcel data was retrieved from - - - Get the list of primitive IDs - - - true if the list is clean and contains the information - only for a given request - - - - Construct a new instance of the ForceSelectObjectsReplyEventArgs class - - The simulator the parcel data was retrieved from - The list of primitive IDs - true if the list is clean and contains the information - only for a given request - - - Contains data when the media data for a parcel the avatar is on changes - - - Get the simulator the parcel media data was updated in - - - Get the updated media information - - - - Construct a new instance of the ParcelMediaUpdateReplyEventArgs class - - the simulator the parcel media data was updated in - The updated media information - - - Contains the media command for a parcel the agent is currently on - - - Get the simulator the parcel media command was issued in - - - - - - - - - Get the media command that was sent - - - - - - - Construct a new instance of the ParcelMediaCommandEventArgs class - - The simulator the parcel media command was issued in - - - The media command that was sent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Class for controlling various system settings. - - Some values are readonly because they affect things that - happen when the GridClient object is initialized, so changing them at - runtime won't do any good. Non-readonly values may affect things that - happen at login or dynamically - - - Main grid login server - - - Beta grid login server - - - The relative directory where external resources are kept - - - Login server to connect to - - - IP Address the client will bind to - - - Use XML-RPC Login or LLSD Login, default is XML-RPC Login - - - - Maximum number of HTTP connections to open to a particular endpoint. - - - An endpoint is defined as a commbination of network address and port. This is used for Caps. - This is a static variable which applies to all instances. - - - - - InventoryManager requests inventory information on login, - GridClient initializes an Inventory store for main inventory. - - - - - InventoryManager requests library information on login, - GridClient initializes an Inventory store for the library. - - - - - Use Caps for fetching inventory where available - - - - Number of milliseconds before an asset transfer will time - out - - - Number of milliseconds before a teleport attempt will time - out - - - Number of milliseconds before NetworkManager.Logout() will - time out - - - Number of milliseconds before a CAPS call will time out - Setting this too low will cause web requests time out and - possibly retry repeatedly - - - Number of milliseconds for xml-rpc to timeout - - - Milliseconds before a packet is assumed lost and resent - - - Milliseconds without receiving a packet before the - connection to a simulator is assumed lost - - - Milliseconds to wait for a simulator info request through - the grid interface - - - Number of milliseconds between sending pings to each sim - - - Number of milliseconds between sending camera updates - - - Number of milliseconds between updating the current - positions of moving, non-accelerating and non-colliding objects - - - Millisecond interval between ticks, where all ACKs are - sent out and the age of unACKed packets is checked - - - The initial size of the packet inbox, where packets are - stored before processing - - - Maximum size of packet that we want to send over the wire - - - The maximum value of a packet sequence number before it - rolls over back to one - - - The maximum size of the sequence number archive, used to - check for resent and/or duplicate packets - - - Maximum number of queued ACKs to be sent before SendAcks() - is forced - - - Network stats queue length (seconds) - - - - Primitives will be reused when falling in/out of interest list (and shared between clients) - prims returning to interest list do not need re-requested - Helps also in not re-requesting prim.Properties for code that checks for a Properties == null per client - - - - - Pool parcel data between clients (saves on requesting multiple times when all clients may need it) - - - - - How long to preserve cached data when no client is connected to a simulator - The reason for setting it to something like 2 minutes is in case a client - is running back and forth between region edges or a sim is comming and going - - - - Enable/disable storing terrain heightmaps in the - TerrainManager - - - Enable/disable sending periodic camera updates - - - Enable/disable automatically setting agent appearance at - login and after sim crossing - - - Enable/disable automatically setting the bandwidth throttle - after connecting to each simulator - The default throttle uses the equivalent of the maximum - bandwidth setting in the official client. If you do not set a - throttle your connection will by default be throttled well below - the minimum values and you may experience connection problems - - - Enable/disable the sending of pings to monitor lag and - packet loss - - - Should we connect to multiple sims? This will allow - viewing in to neighboring simulators and sim crossings - (Experimental) - - - If true, all object update packets will be decoded in to - native objects. If false, only updates for our own agent will be - decoded. Registering an event handler will force objects for that - type to always be decoded. If this is disabled the object tracking - will have missing or partial prim and avatar information - - - If true, when a cached object check is received from the - server the full object info will automatically be requested - - - Whether to establish connections to HTTP capabilities - servers for simulators - - - Whether to decode sim stats - - - The capabilities servers are currently designed to - periodically return a 502 error which signals for the client to - re-establish a connection. Set this to true to log those 502 errors - - - If true, any reference received for a folder or item - the library is not aware of will automatically be fetched - - - If true, and SEND_AGENT_UPDATES is true, - AgentUpdate packets will continuously be sent out to give the bot - smoother movement and autopiloting - - - If true, currently visible avatars will be stored - in dictionaries inside Simulator.ObjectAvatars. - If false, a new Avatar or Primitive object will be created - each time an object update packet is received - - - If true, currently visible avatars will be stored - in dictionaries inside Simulator.ObjectPrimitives. - If false, a new Avatar or Primitive object will be created - each time an object update packet is received - - - If true, position and velocity will periodically be - interpolated (extrapolated, technically) for objects and - avatars that are being tracked by the library. This is - necessary to increase the accuracy of speed and position - estimates for simulated objects - - - - If true, utilization statistics will be tracked. There is a minor penalty - in CPU time for enabling this option. - - - - If true, parcel details will be stored in the - Simulator.Parcels dictionary as they are received - - - - If true, an incoming parcel properties reply will automatically send - a request for the parcel access list - - - - - if true, an incoming parcel properties reply will automatically send - a request for the traffic count. - - - - - If true, images, and other assets downloaded from the server - will be cached in a local directory - - - - Path to store cached texture data - - - Maximum size cached files are allowed to take on disk (bytes) - - - Default color used for viewer particle effects - - - Cost of uploading an asset - Read-only since this value is dynamically fetched at login - - - Maximum number of times to resend a failed packet - - - Throttle outgoing packet rate - - - UUID of a texture used by some viewers to indentify type of client used - - - - Download textures using GetTexture capability when available - - - - The maximum number of concurrent texture downloads allowed - Increasing this number will not necessarily increase texture retrieval times due to - simulator throttles - - - - The Refresh timer inteval is used to set the delay between checks for stalled texture downloads - - This is a static variable which applies to all instances - - - - Textures taking longer than this value will be flagged as timed out and removed from the pipeline - - - - - Get or set the minimum log level to output to the console by default - - If the library is not compiled with DEBUG defined and this level is set to DEBUG - You will get no output on the console. This behavior can be overriden by creating - a logger configuration file for log4net - - - - Attach avatar names to log messages - - - Log packet retransmission info - - - Log disk cache misses and other info - - - Constructor - Reference to a GridClient object - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - - Simulator (region) properties - - - - No flags set - - - Agents can take damage and be killed - - - Landmarks can be created here - - - Home position can be set in this sim - - - Home position is reset when an agent teleports away - - - Sun does not move - - - No object, land, etc. taxes - - - Disable heightmap alterations (agents can still plant - foliage) - - - Land cannot be released, sold, or purchased - - - All content is wiped nightly - - - Unknown: Related to the availability of an overview world map tile.(Think mainland images when zoomed out.) - - - Unknown: Related to region debug flags. Possibly to skip processing of agent interaction with world. - - - Region does not update agent prim interest lists. Internal debugging option. - - - No collision detection for non-agent objects - - - No scripts are ran - - - All physics processing is turned off - - - Region can be seen from other regions on world map. (Legacy world map option?) - - - Region can be seen from mainland on world map. (Legacy world map option?) - - - Agents not explicitly on the access list can visit the region. - - - Traffic calculations are not run across entire region, overrides parcel settings. - - - Flight is disabled (not currently enforced by the sim) - - - Allow direct (p2p) teleporting - - - Estate owner has temporarily disabled scripting - - - Restricts the usage of the LSL llPushObject function, applies to whole region. - - - Deny agents with no payment info on file - - - Deny agents with payment info on file - - - Deny agents who have made a monetary transaction - - - Parcels within the region may be joined or divided by anyone, not just estate owners/managers. - - - Abuse reports sent from within this region are sent to the estate owner defined email. - - - Region is Voice Enabled - - - Removes the ability from parcel owners to set their parcels to show in search. - - - Deny agents who have not been age verified from entering the region. - - - - Region protocol flags - - - - Nothing special - - - Region supports Server side Appearance - - - Viewer supports Server side Appearance - - - - Access level for a simulator - - - - Unknown or invalid access level - - - Trial accounts allowed - - - PG rating - - - Mature rating - - - Adult rating - - - Simulator is offline - - - Simulator does not exist - - - - - - - - - Simulator Statistics - - - - Total number of packets sent by this simulator to this agent - - - Total number of packets received by this simulator to this agent - - - Total number of bytes sent by this simulator to this agent - - - Total number of bytes received by this simulator to this agent - - - Time in seconds agent has been connected to simulator - - - Total number of packets that have been resent - - - Total number of resent packets recieved - - - Total number of pings sent to this simulator by this agent - - - Total number of ping replies sent to this agent by this simulator - - - - Incoming bytes per second - - It would be nice to have this claculated on the fly, but - this is far, far easier - - - - Outgoing bytes per second - - It would be nice to have this claculated on the fly, but - this is far, far easier - - - Time last ping was sent - - - ID of last Ping sent - - - - - - - - - Current time dilation of this simulator - - - Current Frames per second of simulator - - - Current Physics frames per second of simulator - - - - - - - - - - - - - - - - - - - - - - - - - - - Total number of objects Simulator is simulating - - - Total number of Active (Scripted) objects running - - - Number of agents currently in this simulator - - - Number of agents in neighbor simulators - - - Number of Active scripts running in this simulator - - - - - - - - - - - - Number of downloads pending - - - Number of uploads pending - - - - - - - - - Number of local uploads pending - - - Unacknowledged bytes in queue - - - A public reference to the client that this Simulator object - is attached to - - - A Unique Cache identifier for this simulator - - - The capabilities for this simulator - - - - - - The current version of software this simulator is running - - - - - - A 64x64 grid of parcel coloring values. The values stored - in this array are of the type - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true if your agent has Estate Manager rights on this region - - - - - - - - - - - - Statistics information for this simulator and the - connection to the simulator, calculated by the simulator itself - and the library - - - The regions Unique ID - - - The physical data center the simulator is located - Known values are: - - Dallas - Chandler - SF - - - - - The CPU Class of the simulator - Most full mainland/estate sims appear to be 5, - Homesteads and Openspace appear to be 501 - - - The number of regions sharing the same CPU as this one - "Full Sims" appear to be 1, Homesteads appear to be 4 - - - The billing product name - Known values are: - - Mainland / Full Region (Sku: 023) - Estate / Full Region (Sku: 024) - Estate / Openspace (Sku: 027) - Estate / Homestead (Sku: 029) - Mainland / Homestead (Sku: 129) (Linden Owned) - Mainland / Linden Homes (Sku: 131) - - - - - The billing product SKU - Known values are: - - 023 Mainland / Full Region - 024 Estate / Full Region - 027 Estate / Openspace - 029 Estate / Homestead - 129 Mainland / Homestead (Linden Owned) - 131 Linden Homes / Full Region - - - - - - Flags indicating which protocols this region supports - - - - The current sequence number for packets sent to this - simulator. Must be Interlocked before modifying. Only - useful for applications manipulating sequence numbers - - - - A thread-safe dictionary containing avatars in a simulator - - - - - A thread-safe dictionary containing primitives in a simulator - - - - - Provides access to an internal thread-safe dictionary containing parcel - information found in this simulator - - - - - Provides access to an internal thread-safe multidimensional array containing a x,y grid mapped - to each 64x64 parcel's LocalID. - - - - - Checks simulator parcel map to make sure it has downloaded all data successfully - - true if map is full (contains no 0's) - - - - Is it safe to send agent updates to this sim - AgentMovementComplete message received - - - - The IP address and port of the server - - - Whether there is a working connection to the simulator or - not - - - Coarse locations of avatars in this simulator - - - AvatarPositions key representing TrackAgent target - - - Indicates if UDP connection to the sim is fully established - - - Used internally to track sim disconnections - - - Event that is triggered when the simulator successfully - establishes a connection - - - Whether this sim is currently connected or not. Hooked up - to the property Connected - - - Coarse locations of avatars in this simulator - - - AvatarPositions key representing TrackAgent target - - - Sequence numbers of packets we've received - (for duplicate checking) - - - Packets we sent out that need ACKs from the simulator - - - Sequence number for pause/resume - - - Indicates if UDP connection to the sim is fully established - - - - - - Reference to the GridClient object - IPEndPoint of the simulator - handle of the simulator - - - - Called when this Simulator object is being destroyed - - - - - Attempt to connect to this simulator - - Whether to move our agent in to this sim or not - True if the connection succeeded or connection status is - unknown, false if there was a failure - - - - Initiates connection to the simulator - - Should we block until ack for this packet is recieved - - - - Disconnect from this simulator - - - - - Instructs the simulator to stop sending update (and possibly other) packets - - - - - Instructs the simulator to resume sending update packets (unpause) - - - - - Retrieve the terrain height at a given coordinate - - Sim X coordinate, valid range is from 0 to 255 - Sim Y coordinate, valid range is from 0 to 255 - The terrain height at the given point if the - lookup was successful, otherwise 0.0f - True if the lookup was successful, otherwise false - - - - Sends a packet - - Packet to be sent - - - - - - - - - Returns Simulator Name as a String - - - - - - - - - - - - - - - - - - - Sends out pending acknowledgements - - Number of ACKs sent - - - - Resend unacknowledged packets - - - - - Simulator handle - - - - - Number of GridClients using this datapool - - - - - Time that the last client disconnected from the simulator - - - - - The cache of prims used and unused in this simulator - - - - - Shared parcel info only when POOL_PARCEL_DATA == true - - - - - - - - - The event subscribers, null of no subscribers - - - Raises the AttachedSound Event - A AttachedSoundEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - sound - - - The event subscribers, null of no subscribers - - - Raises the AttachedSoundGainChange Event - A AttachedSoundGainChangeEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the SoundTrigger Event - A SoundTriggerEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - The event subscribers, null of no subscribers - - - Raises the PreloadSound Event - A PreloadSoundEventArgs object containing - the data sent from the simulator - - - Thread sync lock object - - - Raised when the simulator sends us data containing - ... - - - - Construct a new instance of the SoundManager class, used for playing and receiving - sound assets - - A reference to the current GridClient instance - - - - Plays a sound in the current region at full volume from avatar position - - UUID of the sound to be played - - - - Plays a sound in the current region at full volume - - UUID of the sound to be played. - position for the sound to be played at. Normally the avatar. - - - - Plays a sound in the current region - - UUID of the sound to be played. - position for the sound to be played at. Normally the avatar. - volume of the sound, from 0.0 to 1.0 - - - - Plays a sound in the specified sim - - UUID of the sound to be played. - UUID of the sound to be played. - position for the sound to be played at. Normally the avatar. - volume of the sound, from 0.0 to 1.0 - - - - Play a sound asset - - UUID of the sound to be played. - handle id for the sim to be played in. - position for the sound to be played at. Normally the avatar. - volume of the sound, from 0.0 to 1.0 - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Process an incoming packet and raise the appropriate events - The sender - The EventArgs object containing the packet data - - - Provides data for the event - The event occurs when the simulator sends - the sound data which emits from an agents attachment - - The following code example shows the process to subscribe to the event - and a stub to handle the data passed from the simulator - - // Subscribe to the AttachedSound event - Client.Sound.AttachedSound += Sound_AttachedSound; - - // process the data raised in the event here - private void Sound_AttachedSound(object sender, AttachedSoundEventArgs e) - { - // ... Process AttachedSoundEventArgs here ... - } - - - - - Simulator where the event originated - - - Get the sound asset id - - - Get the ID of the owner - - - Get the ID of the Object - - - Get the volume level - - - Get the - - - - Construct a new instance of the SoundTriggerEventArgs class - - Simulator where the event originated - The sound asset id - The ID of the owner - The ID of the object - The volume level - The - - - Provides data for the event - The event occurs when an attached sound - changes its volume level - - - Simulator where the event originated - - - Get the ID of the Object - - - Get the volume level - - - - Construct a new instance of the AttachedSoundGainChangedEventArgs class - - Simulator where the event originated - The ID of the Object - The new volume level - - - Provides data for the event - The event occurs when the simulator forwards - a request made by yourself or another agent to play either an asset sound or a built in sound - - Requests to play sounds where the is not one of the built-in - will require sending a request to download the sound asset before it can be played - - - The following code example uses the , - and - properties to display some information on a sound request on the window. - - // subscribe to the event - Client.Sound.SoundTrigger += Sound_SoundTrigger; - - // play the pre-defined BELL_TING sound - Client.Sound.SendSoundTrigger(Sounds.BELL_TING); - - // handle the response data - private void Sound_SoundTrigger(object sender, SoundTriggerEventArgs e) - { - Console.WriteLine("{0} played the sound {1} at volume {2}", - e.OwnerID, e.SoundID, e.Gain); - } - - - - - Simulator where the event originated - - - Get the sound asset id - - - Get the ID of the owner - - - Get the ID of the Object - - - Get the ID of the objects parent - - - Get the volume level - - - Get the regionhandle - - - Get the source position - - - - Construct a new instance of the SoundTriggerEventArgs class - - Simulator where the event originated - The sound asset id - The ID of the owner - The ID of the object - The ID of the objects parent - The volume level - The regionhandle - The source position - - - Provides data for the event - The event occurs when the simulator sends - the appearance data for an avatar - - The following code example uses the and - properties to display the selected shape of an avatar on the window. - - // subscribe to the event - Client.Avatars.AvatarAppearance += Avatars_AvatarAppearance; - - // handle the data when the event is raised - void Avatars_AvatarAppearance(object sender, AvatarAppearanceEventArgs e) - { - Console.WriteLine("The Agent {0} is using a {1} shape.", e.AvatarID, (e.VisualParams[31] > 0) : "male" ? "female") - } - - - - - Simulator where the event originated - - - Get the sound asset id - - - Get the ID of the owner - - - Get the ID of the Object - - - - Construct a new instance of the PreloadSoundEventArgs class - - Simulator where the event originated - The sound asset id - The ID of the owner - The ID of the object - - - - pre-defined built in sounds - - - - - - - - - - - - - - - - - - - - - - - - - - - - coins - - - cash register bell - - - - - - - - - rubber - - - plastic - - - flesh - - - wood splintering? - - - glass break - - - metal clunk - - - whoosh - - - shake - - - - - - ding - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A dictionary containing all pre-defined sounds - - A dictionary containing the pre-defined sounds, - where the key is the sounds ID, and the value is a string - containing a name to identify the purpose of the sound - - - X position of this patch - - - Y position of this patch - - - A 16x16 array of floats holding decompressed layer data - - - - Creates a LayerData packet for compressed land data given a full - simulator heightmap and an array of indices of patches to compress - - A 256 * 256 array of floating point values - specifying the height at each meter in the simulator - Array of indexes in the 16x16 grid of patches - for this simulator. For example if 1 and 17 are specified, patches - x=1,y=0 and x=1,y=1 are sent - - - - - Add a patch of terrain to a BitPacker - - BitPacker to write the patch to - Heightmap of the simulator, must be a 256 * - 256 float array - X offset of the patch to create, valid values are - from 0 to 15 - Y offset of the patch to create, valid values are - from 0 to 15 - - - The event subscribers. null if no subcribers - - - Raises the LandPatchReceived event - A LandPatchReceivedEventArgs object containing the - data returned from the simulator - - - Thread sync lock object - - - Raised when the simulator responds sends - - - - Default constructor - - - - - Simulator from that sent tha data - - - Sim coordinate of the patch - - - Sim coordinate of the patch - - - Size of tha patch - - - Heightmap for the patch - - - - The current status of a texture request as it moves through the pipeline or final result of a texture request. - - - - The initial state given to a request. Requests in this state - are waiting for an available slot in the pipeline - - - A request that has been added to the pipeline and the request packet - has been sent to the simulator - - - A request that has received one or more packets back from the simulator - - - A request that has received all packets back from the simulator - - - A request that has taken longer than - to download OR the initial packet containing the packet information was never received - - - The texture request was aborted by request of the agent - - - The simulator replied to the request that it was not able to find the requested texture - - - - A callback fired to indicate the status or final state of the requested texture. For progressive - downloads this will fire each time new asset data is returned from the simulator. - - The indicating either Progress for textures not fully downloaded, - or the final result of the request after it has been processed through the TexturePipeline - The object containing the Assets ID, raw data - and other information. For progressive rendering the will contain - the data from the beginning of the file. For failed, aborted and timed out requests it will contain - an empty byte array. - - - - Texture request download handler, allows a configurable number of download slots which manage multiple - concurrent texture downloads from the - - This class makes full use of the internal - system for full texture downloads. - - - - A request task containing information and status of a request as it is processed through the - - - - The current which identifies the current status of the request - - - The Unique Request ID, This is also the Asset ID of the texture being requested - - - The slot this request is occupying in the threadpoolSlots array - - - The ImageType of the request. - - - The callback to fire when the request is complete, will include - the and the - object containing the result data - - - If true, indicates the callback will be fired whenever new data is returned from the simulator. - This is used to progressively render textures as portions of the texture are received. - - - An object that maintains the data of an request thats in-process. - - - A dictionary containing all pending and in-process transfer requests where the Key is both the RequestID - and also the Asset Texture ID, and the value is an object containing the current state of the request and also - the asset data as it is being re-assembled - - - Holds the reference to the client object - - - Maximum concurrent texture requests allowed at a time - - - An array of objects used to manage worker request threads - - - An array of worker slots which shows the availablity status of the slot - - - The primary thread which manages the requests. - - - true if the TexturePipeline is currently running - - - A synchronization object used by the primary thread - - - A refresh timer used to increase the priority of stalled requests - - - Current number of pending and in-process transfers - - - - Default constructor, Instantiates a new copy of the TexturePipeline class - - Reference to the instantiated object - - - - Initialize callbacks required for the TexturePipeline to operate - - - - - Shutdown the TexturePipeline and cleanup any callbacks or transfers - - - - - Request a texture asset from the simulator using the system to - manage the requests and re-assemble the image from the packets received from the simulator - - The of the texture asset to download - The of the texture asset. - Use for most textures, or for baked layer texture assets - A float indicating the requested priority for the transfer. Higher priority values tell the simulator - to prioritize the request before lower valued requests. An image already being transferred using the can have - its priority changed by resending the request with the new priority value - Number of quality layers to discard. - This controls the end marker of the data sent - The packet number to begin the request at. A value of 0 begins the request - from the start of the asset texture - The callback to fire when the image is retrieved. The callback - will contain the result of the request and the texture asset data - If true, the callback will be fired for each chunk of the downloaded image. - The callback asset parameter will contain all previously received chunks of the texture asset starting - from the beginning of the request - - - - Sends the actual request packet to the simulator - - The image to download - Type of the image to download, either a baked - avatar texture or a normal texture - Priority level of the download. Default is - 1,013,000.0f - Number of quality layers to discard. - This controls the end marker of the data sent - Packet number to start the download at. - This controls the start marker of the data sent - Sending a priority of 0 and a discardlevel of -1 aborts - download - - - - Cancel a pending or in process texture request - - The texture assets unique ID - - - - Master Download Thread, Queues up downloads in the threadpool - - - - - The worker thread that sends the request and handles timeouts - - A object containing the request details - - - - Handle responses from the simulator that tell us a texture we have requested is unable to be located - or no longer exists. This will remove the request from the pipeline and free up a slot if one is in use - - The sender - The EventArgs object containing the packet data - - - - Handles the remaining Image data that did not fit in the initial ImageData packet - - The sender - The EventArgs object containing the packet data - - - - Handle the initial ImageDataPacket sent from the simulator - - The sender - The EventArgs object containing the packet data - - - - - - - - - Initialize the UDP packet handler in server mode - - Port to listening for incoming UDP packets on - - - - Initialize the UDP packet handler in client mode - - Remote UDP server to connect to - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Operation to apply when applying color to texture - - - - - Information needed to translate visual param value to RGBA color - - - - - Construct VisualColorParam - - Operation to apply when applying color to texture - Colors - - - - Represents alpha blending and bump infor for a visual parameter - such as sleive length - - - - Stregth of the alpha to apply - - - File containing the alpha channel - - - Skip blending if parameter value is 0 - - - Use miltiply insted of alpha blending - - - - Create new alhpa information for a visual param - - Stregth of the alpha to apply - File containing the alpha channel - Skip blending if parameter value is 0 - Use miltiply insted of alpha blending - - - - A single visual characteristic of an avatar mesh, such as eyebrow height - - - - Index of this visual param - - - Internal name - - - Group ID this parameter belongs to - - - Name of the wearable this parameter belongs to - - - Displayable label of this characteristic - - - Displayable label for the minimum value of this characteristic - - - Displayable label for the maximum value of this characteristic - - - Default value - - - Minimum value - - - Maximum value - - - Is this param used for creation of bump layer? - - - Alpha blending/bump info - - - Color information - - - Array of param IDs that are drivers for this parameter - - - - Set all the values through the constructor - - Index of this visual param - Internal name - - - Displayable label of this characteristic - Displayable label for the minimum value of this characteristic - Displayable label for the maximum value of this characteristic - Default value - Minimum value - Maximum value - Is this param used for creation of bump layer? - Array of param IDs that are drivers for this parameter - Alpha blending/bump info - Color information - - - - Holds the Params array of all the avatar appearance parameters - - - - - Base class for all Asset types - - - - A byte array containing the raw asset data - - - True if the asset it only stored on the server temporarily - - - A unique ID - - - The assets unique ID - - - - The "type" of asset, Notecard, Animation, etc - - - - - Construct a new Asset object - - - - - Construct a new Asset object - - A unique specific to this asset - A byte array containing the raw asset data - - - - Regenerates the AssetData byte array from the properties - of the derived class. - - - - - Decodes the AssetData, placing it in appropriate properties of the derived - class. - - True if the asset decoding succeeded, otherwise false - - - - Constants for the archiving module - - - - - The location of the archive control file - - - - - Path for the assets held in an archive - - - - - Path for the prims file - - - - - Path for terrains. Technically these may be assets, but I think it's quite nice to split them out. - - - - - Path for region settings. - - - - - Path for region settings. - - - - - The character the separates the uuid from extension information in an archived asset filename - - - - - Extensions used for asset types in the archive - - - - - Archives assets - - - - - Archive assets - - - - - Archive the assets given to this archiver to the given archive. - - - - - - Write an assets metadata file to the given archive - - - - - - Write asset data files to the given archive - - - - - - Temporary code to do the bare minimum required to read a tar archive for our purposes - - - - - Binary reader for the underlying stream - - - - - Used to trim off null chars - - - - - Used to trim off space chars - - - - - Generate a tar reader which reads from the given stream. - - - - - - Read the next entry in the tar file. - - - - the data for the entry. Returns null if there are no more entries - - - - Read the next 512 byte chunk of data as a tar header. - - A tar header struct. null if we have reached the end of the archive. - - - - Read data following a header - - - - - - - Convert octal bytes to a decimal representation - - - - - - - - - Temporary code to produce a tar archive in tar v7 format - - - - - Binary writer for the underlying stream - - - - - Write a directory entry to the tar archive. We can only handle one path level right now! - - - - - - Write a file to the tar archive - - - - - - - Write a file to the tar archive - - - - - - - Finish writing the raw tar archive data to a stream. The stream will be closed on completion. - - - - - Write a particular entry - - - - - - - - Represents an Animation - - - - Override the base classes AssetType - - - Default Constructor - - - - Construct an Asset object of type Animation - - A unique specific to this asset - A byte array containing the raw asset data - - - - Represents an that represents an avatars body ie: Hair, Etc. - - - - Override the base classes AssetType - - - Initializes a new instance of an AssetBodyPart object - - - Initializes a new instance of an AssetBodyPart object with parameters - A unique specific to this asset - A byte array containing the raw asset data - - - - Represents a Callingcard with AvatarID and Position vector - - - - Override the base classes AssetType - - - UUID of the Callingcard target avatar - - - Construct an Asset of type Callingcard - - - - Construct an Asset object of type Callingcard - - A unique specific to this asset - A byte array containing the raw asset data - - - - Constuct an asset of type Callingcard - - UUID of the target avatar - - - - Encode the raw contents of a string with the specific Callingcard format - - - - - Decode the raw asset data, populating the AvatarID and Position - - true if the AssetData was successfully decoded to a UUID and Vector - - - - Represents an that can be worn on an avatar - such as a Shirt, Pants, etc. - - - - Override the base classes AssetType - - - Initializes a new instance of an AssetScriptBinary object - - - Initializes a new instance of an AssetScriptBinary object with parameters - A unique specific to this asset - A byte array containing the raw asset data - - - - Type of gesture step - - - - - Base class for gesture steps - - - - - Retururns what kind of gesture step this is - - - - - Describes animation step of a gesture - - - - - Returns what kind of gesture step this is - - - - - If true, this step represents start of animation, otherwise animation stop - - - - - Animation asset - - - - - Animation inventory name - - - - - Describes sound step of a gesture - - - - - Returns what kind of gesture step this is - - - - - Sound asset - - - - - Sound inventory name - - - - - Describes sound step of a gesture - - - - - Returns what kind of gesture step this is - - - - - Text to output in chat - - - - - Describes sound step of a gesture - - - - - Returns what kind of gesture step this is - - - - - If true in this step we wait for all animations to finish - - - - - If true gesture player should wait for the specified amount of time - - - - - Time in seconds to wait if WaitForAnimation is false - - - - - Describes the final step of a gesture - - - - - Returns what kind of gesture step this is - - - - - Represents a sequence of animations, sounds, and chat actions - - - - - Returns asset type - - - - - Keyboard key that triggers the gestyre - - - - - Modifier to the trigger key - - - - - String that triggers playing of the gesture sequence - - - - - Text that replaces trigger in chat once gesture is triggered - - - - - Sequence of gesture steps - - - - - Constructs guesture asset - - - - - Constructs guesture asset - - A unique specific to this asset - A byte array containing the raw asset data - - - - Encodes gesture asset suitable for uplaod - - - - - Decodes gesture assset into play sequence - - true if the asset data was decoded successfully - - - - Represents a Landmark with RegionID and Position vector - - - - Override the base classes AssetType - - - UUID of the Landmark target region - - - Local position of the target - - - Construct an Asset of type Landmark - - - - Construct an Asset object of type Landmark - - A unique specific to this asset - A byte array containing the raw asset data - - - - Encode the raw contents of a string with the specific Landmark format - - - - - Decode the raw asset data, populating the RegionID and Position - - true if the AssetData was successfully decoded to a UUID and Vector - - - - Represents Mesh asset - - - - Override the base classes AssetType - - - - Decoded mesh data - - - - Initializes a new instance of an AssetMesh object - - - Initializes a new instance of an AssetMesh object with parameters - A unique specific to this asset - A byte array containing the raw asset data - - - - TODO: Encodes Collada file into LLMesh format - - - - - Decodes mesh asset. See - to furter decode it for rendering - true - - - - Represents an Animation - - - - Override the base classes AssetType - - - Default Constructor - - - - Construct an Asset object of type Animation - - Asset type - A unique specific to this asset - A byte array containing the raw asset data - - - - Represents a string of characters encoded with specific formatting properties - - - - Override the base classes AssetType - - - A text string containing main text of the notecard - - - List of s embedded on the notecard - - - Construct an Asset of type Notecard - - - - Construct an Asset object of type Notecard - - A unique specific to this asset - A byte array containing the raw asset data - - - - Encode the raw contents of a string with the specific Linden Text properties - - - - - Decode the raw asset data including the Linden Text properties - - true if the AssetData was successfully decoded - - - - A linkset asset, containing a parent primitive and zero or more children - - - - - Only used internally for XML serialization/deserialization - - - - Override the base classes AssetType - - - Initializes a new instance of an AssetPrim object - - - - Initializes a new instance of an AssetPrim object - - A unique specific to this asset - A byte array containing the raw asset data - - - - - - - - - - - - - - - The deserialized form of a single primitive in a linkset asset - - - - - Represents an AssetScriptBinary object containing the - LSO compiled bytecode of an LSL script - - - - Override the base classes AssetType - - - Initializes a new instance of an AssetScriptBinary object - - - Initializes a new instance of an AssetScriptBinary object with parameters - A unique specific to this asset - A byte array containing the raw asset data - - - - TODO: Encodes a scripts contents into a LSO Bytecode file - - - - - TODO: Decode LSO Bytecode into a string - - true - - - - Represents an LSL Text object containing a string of UTF encoded characters - - - - Override the base classes AssetType - - - A string of characters represting the script contents - - - Initializes a new AssetScriptText object - - - - Initializes a new AssetScriptText object with parameters - - A unique specific to this asset - A byte array containing the raw asset data - - - - Encode a string containing the scripts contents into byte encoded AssetData - - - - - Decode a byte array containing the scripts contents into a string - - true if decoding is successful - - - - Represents a Sound Asset - - - - Override the base classes AssetType - - - Initializes a new instance of an AssetSound object - - - Initializes a new instance of an AssetSound object with parameters - A unique specific to this asset - A byte array containing the raw asset data - - - - TODO: Encodes a sound file - - - - - TODO: Decode a sound file - - true - - - - Represents a texture - - - - Override the base classes AssetType - - - A object containing image data - - - - - - - - - Initializes a new instance of an AssetTexture object - - - - Initializes a new instance of an AssetTexture object - - A unique specific to this asset - A byte array containing the raw asset data - - - - Initializes a new instance of an AssetTexture object - - A object containing texture data - - - - Populates the byte array with a JPEG2000 - encoded image created from the data in - - - - - Decodes the JPEG2000 data in AssetData to the - object - - True if the decoding was successful, otherwise false - - - - Decodes the begin and end byte positions for each quality layer in - the image - - - - - - Represents a Wearable Asset, Clothing, Hair, Skin, Etc - - - - A string containing the name of the asset - - - A string containing a short description of the asset - - - The Assets WearableType - - - The For-Sale status of the object - - - An Integer representing the purchase price of the asset - - - The of the assets creator - - - The of the assets current owner - - - The of the assets prior owner - - - The of the Group this asset is set to - - - True if the asset is owned by a - - - The Permissions mask of the asset - - - A Dictionary containing Key/Value pairs of the objects parameters - - - A Dictionary containing Key/Value pairs where the Key is the textures Index and the Value is the Textures - - - Initializes a new instance of an AssetWearable object - - - Initializes a new instance of an AssetWearable object with parameters - A unique specific to this asset - A byte array containing the raw asset data - - - - Decode an assets byte encoded data to a string - - true if the asset data was decoded successfully - - - - Encode the assets string represantion into a format consumable by the asset server - - - - = - - - Number of times we've received an unknown CAPS exception in series. - - - For exponential backoff on error. - - - - A set of textures that are layered on texture of each other and "baked" - in to a single texture, for avatar appearances - - - - Final baked texture - - - Component layers - - - Width of the final baked image and scratchpad - - - Height of the final baked image and scratchpad - - - Bake type - - - Is this one of the 3 skin bakes - - - Final baked texture - - - Component layers - - - Width of the final baked image and scratchpad - - - Height of the final baked image and scratchpad - - - Bake type - - - - Default constructor - - Bake type - - - - Adds layer for baking - - TexturaData struct that contains texture and its params - - - - Converts avatar texture index (face) to Bake type - - Face number (AvatarTextureIndex) - BakeType, layer to which this texture belongs to - - - - Make sure images exist, resize source if needed to match the destination - - Destination image - Source image - Sanitization was succefull - - - - Fills a baked layer as a solid *appearing* color. The colors are - subtly dithered on a 16x16 grid to prevent the JPEG2000 stage from - compressing it too far since it seems to cause upload failures if - the image is a pure solid color - - Color of the base of this layer - - - - Fills a baked layer as a solid *appearing* color. The colors are - subtly dithered on a 16x16 grid to prevent the JPEG2000 stage from - compressing it too far since it seems to cause upload failures if - the image is a pure solid color - - Red value - Green value - Blue value - - - - Image width - - - - - Image height - - - - - Image channel flags - - - - - Red channel data - - - - - Green channel data - - - - - Blue channel data - - - - - Alpha channel data - - - - - Bump channel data - - - - - Create a new blank image - - width - height - channel flags - - - - - - - - - - Convert the channels in the image. Channels are created or destroyed as required. - - new channel flags - - - - Resize or stretch the image using nearest neighbor (ugly) resampling - - new width - new height - - - - Create a byte array containing 32-bit RGBA data with a bottom-left - origin, suitable for feeding directly into OpenGL - - A byte array containing raw texture data - - - - Create a byte array containing 32-bit RGBA data with a bottom-left - origin, suitable for feeding directly into OpenGL - - A byte array containing raw texture data - - - - A Wrapper around openjpeg to encode and decode images to and from byte arrays - - - - TGA Header size - - - - Defines the beginning and ending file positions of a layer in an - LRCP-progression JPEG2000 file - - - - - This structure is used to marshal both encoded and decoded images. - MUST MATCH THE STRUCT IN dotnet.h! - - - - - Information about a single packet in a JPEG2000 stream - - - - Packet start position - - - Packet header end position - - - Packet end position - - - OpenJPEG is not threadsafe, so this object is used to lock - during calls into unmanaged code - - - - Encode a object into a byte array - - The object to encode - true to enable lossless conversion, only useful for small images ie: sculptmaps - A byte array containing the encoded Image object - - - - Encode a object into a byte array - - The object to encode - a byte array of the encoded image - - - - Decode JPEG2000 data to an and - - - JPEG2000 encoded data - ManagedImage object to decode to - Image object to decode to - True if the decode succeeds, otherwise false - - - - - - - - - - - - - - - - - - - - - Encode a object into a byte array - - The source object to encode - true to enable lossless decoding - A byte array containing the source Bitmap object - - - - Capability to load TGAs to Bitmap - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Parsing Collada model files into data structures - - - - - Parses Collada document - - Load .dae model from this file - Load and decode images for uploading with model - A list of mesh prims that were parsed from the collada file - - - - Implements mesh upload communications with the simulator - - - - - Inlcude stub convex hull physics, required for uploading to Second Life - - - - - Use the same mesh used for geometry as the physical mesh upload - - - - - Callback for mesh upload operations - - null on failure, result from server on success - - - - Creates instance of the mesh uploader - - GridClient instance to communicate with the simulator - List of ModelPrimitive objects to upload as a linkset - Inventory name for newly uploaded object - Inventory description for newly upload object - - - - Performs model upload in one go, without first checking for the price - - - - - Performs model upload in one go, without first checking for the price - - Callback that will be invoke upon completion of the upload. Null is sent on request failure - - - - Ask server for details of cost and impact of the mesh upload - - Callback that will be invoke upon completion of the upload. Null is sent on request failure - - - - Performas actual mesh and image upload - - Uri recieved in the upload prepare stage - Callback that will be invoke upon completion of the upload. Null is sent on request failure - - - - Interface requirements for Messaging system - - - - - Abstract base for rendering plugins - - - - - Generates a basic mesh structure from a primitive - - Primitive to generate the mesh from - Level of detail to generate the mesh at - The generated mesh - - - - Generates a basic mesh structure from a sculpted primitive and - texture - - Sculpted primitive to generate the mesh from - Sculpt texture - Level of detail to generate the mesh at - The generated mesh - - - - Generates a series of faces, each face containing a mesh and - metadata - - Primitive to generate the mesh from - Level of detail to generate the mesh at - The generated mesh - - - - Generates a series of faces for a sculpted prim, each face - containing a mesh and metadata - - Sculpted primitive to generate the mesh from - Sculpt texture - Level of detail to generate the mesh at - The generated mesh - - - - Apply texture coordinate modifications from a - to a list of vertices - - Vertex list to modify texture coordinates for - Center-point of the face - Face texture parameters - Scale of the prim - - - - Binary reader, which is endian aware - - - - What is the format of the source file - - - - Construct a reader from a stream - - The stream to read from - - - - Construct a reader from a stream - - The stream to read from - What is the format of the file, assumes PC and similar architecture - - - - Read a 32 bit integer - - A 32 bit integer in the system's endianness - - - - Read a 16 bit integer - - A 16 bit integer in the system's endianness - - - - Read a 64 bit integer - - A 64 bit integer in the system's endianness - - - - Read an unsigned 32 bit integer - - A 32 bit unsigned integer in the system's endianness - - - - Read a single precision floating point value - - A single precision floating point value in the system's endianness - - - - Read a double precision floating point value - - A double precision floating point value in the system's endianness - - - - Read a UTF-8 string - - A standard system string - - - - Read a UTF-8 string - - length of string to read - A standard system string - - - - Load and handle Linden Lab binary meshes. - - - The exact definition of this file is a bit sketchy, especially concerning skin weights. - A good starting point is on the - second life wiki - - - - - Defines a polygon - - - - - Structure of a vertex, No surprises there, except for the Detail tex coord - - - The skinweights are a tad unconventional. The best explanation found is: - >Each weight actually contains two pieces of information. The number to the - >left of the decimal point is the index of the joint and also implicitly - >indexes to the following joint. The actual weight is to the right of the - >decimal point and interpolates between these two joints. The index is into - >an "expanded" list of joints, not just a linear array of the joints as - >defined in the skeleton file. In particular, any joint that has more than - >one child will be repeated in the list for each of its children. - - Maybe I'm dense, but that description seems to be a bit hard to build an - algorithm on. - - Esentially the weights are compressed into one floating point value. - 1. The whole number part is an index into an array of joints - 2. The fractional part is the weight that joint has - 3. If the fractional part is 0 (x.0000) then the vertex is 100% influenced by the specified joint - - - - - Provide a nice format for debugging - - Vertex definition as a string - - - - Describes deltas to apply to a vertex in order to morph a vertex - - - - - Provide a nice format for debugging - - MorphVertex definition as a string - - - - Describes a named mesh morph, essentially a named list of MorphVertices - - - - - Provide a nice format for debugging - - The name of the morph - - - - Don't really know what this does - - - - - Provide a nice format for debugging - - Human friendly format - - - - A reference mesh is one way to implement level of detail - - - Reference meshes are supplemental meshes to full meshes. For all practical - purposes almost all lod meshes are implemented as reference meshes, except for - 'avatar_eye_1.llm' which for some reason is implemented as a full mesh. - - - - - Load a mesh from a stream - - Filename and path of the file containing the reference mesh - - - - Level of Detail mesh - - - - - Construct a linden mesh with the given name - - the name of the mesh - - - - Construct a linden mesh with the given name - - the name of the mesh - The skeleton governing mesh deformation - - - - Load the mesh from a stream - - The filename and path of the file containing the mesh data - - - - Layout of one skinweight element - - - - List of skinweights, in the same order as the mesh vertices - - - - Decompress the skinweights - - the expanded joint list, used to index which bones should influece the vertex - - - - Load a reference mesh from a given stream - - The lod level of this reference mesh - the name and path of the file containing the mesh data - the loaded reference mesh - - - - Trim a string at the first occurence of NUL - - - The llm file uses null terminated strings (C/C++ style), this is where - the conversion is made. - - The string to trim - A standard .Net string - - - - load the 'avatar_skeleton.xml' - - - Partial class which extends the auto-generated 'LindenSkeleton.Xsd.cs'.eton.xsd - - - - - - Load a skeleton from a given file. - - - We use xml scema validation on top of the xml de-serializer, since the schema has - some stricter checks than the de-serializer provides. E.g. the vector attributes - are guaranteed to hold only 3 float values. This reduces the need for error checking - while working with the loaded skeleton. - - A valid recursive skeleton - - - - Load a skeleton from a given file. - - - We use xml scema validation on top of the xml de-serializer, since the schema has - some stricter checks than the de-serializer provides. E.g. the vector attributes - are guaranteed to hold only 3 float values. This reduces the need for error checking - while working with the loaded skeleton. - - The path to the skeleton definition file - A valid recursive skeleton - - - - Build and "expanded" list of joints - - - The algorithm is based on this description: - - >An "expanded" list of joints, not just a - >linear array of the joints as defined in the skeleton file. - >In particular, any joint that has more than one child will - >be repeated in the list for each of its children. - - The list should only take these joint names in consideration - An "expanded" joints list as a flat list of bone names - - - - Expand one joint - - The parent of the joint we are operating on - The joint we are supposed to expand - Joint list that we will extend upon - The expanded list should only contain these joints - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Contains all mesh faces that belong to a prim - - - - List of primitive faces - - - - Decodes mesh asset into FacetedMesh - - Mesh primitive - Asset retrieved from the asset server - Level of detail - Resulting decoded FacetedMesh - True if mesh asset decoding was successful - - - - Sent to the client to indicate a teleport request has completed - - - - The of the agent - - - - - - The simulators handle the agent teleported to - - - A Uri which contains a list of Capabilities the simulator supports - - - Indicates the level of access required - to access the simulator, or the content rating, or the simulators - map status - - - The IP Address of the simulator - - - The UDP Port the simulator will listen for UDP traffic on - - - Status flags indicating the state of the Agent upon arrival, Flying, etc. - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Sent to the viewer when a neighboring simulator is requesting the agent make a connection to it. - - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message sent to the client which indicates a teleport request has failed - and contains some information on why it failed - - - - - - - A string key of the reason the teleport failed e.g. CouldntTPCloser - Which could be used to look up a value in a dictionary or enum - - - The of the Agent - - - A string human readable message containing the reason - An example: Could not teleport closer to destination - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Contains a list of prim owner information for a specific parcel in a simulator - - - A Simulator will always return at least 1 entry - If agent does not have proper permission the OwnerID will be UUID.Zero - If agent does not have proper permission OR there are no primitives on parcel - the DataBlocksExtended map will not be sent from the simulator - - - - - Prim ownership information for a specified owner on a single parcel - - - - The of the prim owner, - UUID.Zero if agent has no permission to view prim owner information - - - The total number of prims - - - True if the OwnerID is a - - - True if the owner is online - This is no longer used by the LL Simulators - - - The date the most recent prim was rezzed - - - An Array of objects - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - The details of a single parcel in a region, also contains some regionwide globals - - - - Simulator-local ID of this parcel - - - Maximum corner of the axis-aligned bounding box for this - parcel - - - Minimum corner of the axis-aligned bounding box for this - parcel - - - Total parcel land area - - - - - - Key of authorized buyer - - - Bitmap describing land layout in 4x4m squares across the - entire region - - - - - - Date land was claimed - - - Appears to always be zero - - - Parcel Description - - - - - - - - - Total number of primitives owned by the parcel group on - this parcel - - - Whether the land is deeded to a group or not - - - - - - Maximum number of primitives this parcel supports - - - The Asset UUID of the Texture which when applied to a - primitive will display the media - - - A URL which points to any Quicktime supported media type - - - A byte, if 0x1 viewer should auto scale media to fit object - - - URL For Music Stream - - - Parcel Name - - - Autoreturn value in minutes for others' objects - - - - - - Total number of other primitives on this parcel - - - UUID of the owner of this parcel - - - Total number of primitives owned by the parcel owner on - this parcel - - - - - - How long is pass valid for - - - Price for a temporary pass - - - - - - Disallows people outside the parcel from being able to see in - - - - - - - - - - - - True if the region denies access to age unverified users - - - - - - This field is no longer used - - - The result of a request for parcel properties - - - Sale price of the parcel, only useful if ForSale is set - The SalePrice will remain the same after an ownership - transfer (sale), so it can be used to see the purchase price after - a sale if the new owner has not changed it - - - - Number of primitives your avatar is currently - selecting and sitting on in this parcel - - - - - - - - A number which increments by 1, starting at 0 for each ParcelProperties request. - Can be overriden by specifying the sequenceID with the ParcelPropertiesRequest being sent. - a Negative number indicates the action in has occurred. - - - - Maximum primitives across the entire simulator - - - Total primitives across the entire simulator - - - - - - Key of parcel snapshot - - - Parcel ownership status - - - Total number of primitives on this parcel - - - - - - - - - A description of the media - - - An Integer which represents the height of the media - - - An integer which represents the width of the media - - - A boolean, if true the viewer should loop the media - - - A string which contains the mime type of the media - - - true to obscure (hide) media url - - - true to obscure (hide) music url - - - true if avatars in this parcel should be invisible to people outside - - - true if avatars outside can hear any sounds avatars inside play - - - true if group members outside can hear any sounds avatars inside play - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - A message sent from the viewer to the simulator to updated a specific parcels settings - - - The of the agent authorized to purchase this - parcel of land or a NULL if the sale is authorized to anyone - - - true to enable auto scaling of the parcel media - - - The category of this parcel used when search is enabled to restrict - search results - - - A string containing the description to set - - - The of the which allows for additional - powers and restrictions. - - - The which specifies how avatars which teleport - to this parcel are handled - - - The LocalID of the parcel to update settings on - - - A string containing the description of the media which can be played - to visitors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true if avatars in this parcel should be invisible to people outside - - - true if avatars outside can hear any sounds avatars inside play - - - true if group members outside can hear any sounds avatars inside play - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - Base class used for the RemoteParcelRequest message - - - - A message sent from the viewer to the simulator to request information - on a remote parcel - - - - Local sim position of the parcel we are looking up - - - Region handle of the parcel we are looking up - - - Region of the parcel we are looking up - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message sent from the simulator to the viewer in response to a - which will contain parcel information - - - - The grid-wide unique parcel ID - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message containing a request for a remote parcel from a viewer, or a response - from the simulator to that request - - - - The request or response details block - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message sent from the simulator to an agent which contains - the groups the agent is in - - - - The Agent receiving the message - - - Group Details specific to the agent - - - true of the agent accepts group notices - - - The agents tier contribution to the group - - - The Groups - - - The of the groups insignia - - - The name of the group - - - The aggregate permissions the agent has in the group for all roles the agent - is assigned - - - An optional block containing additional agent specific information - - - true of the agent allows this group to be - listed in their profile - - - An array containing information - for each the agent is a member of - - - An array containing information - for each the agent is a member of - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message sent from the viewer to the simulator which - specifies the language and permissions for others to detect - the language specified - - - - A string containng the default language - to use for the agent - - - true of others are allowed to - know the language setting - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - An EventQueue message sent from the simulator to an agent when the agent - leaves a group - - - - An object containing the Agents UUID, and the Groups UUID - - - The ID of the Agent leaving the group - - - The GroupID the Agent is leaving - - - - An Array containing the AgentID and GroupID - - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - Base class for Asset uploads/results via Capabilities - - - - The request state - - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message sent from the viewer to the simulator to request a temporary upload capability - which allows an asset to be uploaded - - - - The Capability URL sent by the simulator to upload the baked texture to - - - - A message sent from the simulator that will inform the agent the upload is complete, - and the UUID of the uploaded asset - - - - The uploaded texture asset ID - - - - A message sent from the viewer to the simulator to request a temporary - capability URI which is used to upload an agents baked appearance textures - - - - Object containing request or response - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message sent from the simulator which indicates the minimum version required for - using voice chat - - - - Major Version Required - - - Minor version required - - - The name of the region sending the version requrements - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message sent from the simulator to the viewer containing the - voice server URI - - - - The Parcel ID which the voice server URI applies - - - The name of the region - - - A uri containing the server/channel information - which the viewer can utilize to participate in voice conversations - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - - - - - - - - - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message sent by the viewer to the simulator to request a temporary - capability for a script contained with in a Tasks inventory to be updated - - - - Object containing request or response - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message sent from the simulator to the viewer to indicate - a Tasks scripts status. - - - - The Asset ID of the script - - - True of the script is compiled/ran using the mono interpreter, false indicates it - uses the older less efficient lsl2 interprter - - - The Task containing the scripts - - - true of the script is in a running state - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message containing the request/response used for updating a gesture - contained with an agents inventory - - - - Object containing request or response - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message request/response which is used to update a notecard contained within - a tasks inventory - - - - The of the Task containing the notecard asset to update - - - The notecard assets contained in the tasks inventory - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A reusable class containing a message sent from the viewer to the simulator to request a temporary uploader capability - which is used to update an asset in an agents inventory - - - - - The Notecard AssetID to replace - - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message containing the request/response used for updating a notecard - contained with an agents inventory - - - - Object containing request or response - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message sent from the simulator to the viewer which indicates - an error occurred while attempting to update a script in an agents or tasks - inventory - - - - true of the script was successfully compiled by the simulator - - - A string containing the error which occured while trying - to update the script - - - A new AssetID assigned to the script - - - - A message sent from the viewer to the simulator - requesting the update of an existing script contained - within a tasks inventory - - - - if true, set the script mode to running - - - The scripts InventoryItem ItemID to update - - - A lowercase string containing either "mono" or "lsl2" which - specifies the script is compiled and ran on the mono runtime, or the older - lsl runtime - - - The tasks which contains the script to update - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message containing either the request or response used in updating a script inside - a tasks inventory - - - - Object containing request or response - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Response from the simulator to notify the viewer the upload is completed, and - the UUID of the script asset and its compiled status - - - - The uploaded texture asset ID - - - true of the script was compiled successfully - - - - A message sent from a viewer to the simulator requesting a temporary uploader capability - used to update a script contained in an agents inventory - - - - The existing asset if of the script in the agents inventory to replace - - - The language of the script - Defaults to lsl version 2, "mono" might be another possible option - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message containing either the request or response used in updating a script inside - an agents inventory - - - - Object containing request or response - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - Base class for Map Layers via Capabilities - - - - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Sent by an agent to the capabilities server to request map layers - - - - - A message sent from the simulator to the viewer which contains an array of map images and their grid coordinates - - - - - An object containing map location details - - - - The Asset ID of the regions tile overlay - - - The grid location of the southern border of the map tile - - - The grid location of the western border of the map tile - - - The grid location of the eastern border of the map tile - - - The grid location of the northern border of the map tile - - - An array containing LayerData items - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - Object containing request or response - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - New as of 1.23 RC1, no details yet. - - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - A string containing the method used - - - - A request sent from an agent to the Simulator to begin a new conference. - Contains a list of Agents which will be included in the conference - - - - An array containing the of the agents invited to this conference - - - The conferences Session ID - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A moderation request sent from a conference moderator - Contains an agent and an optional action to take - - - - The Session ID - - - - - - A list containing Key/Value pairs, known valid values: - key: text value: true/false - allow/disallow specified agents ability to use text in session - key: voice value: true/false - allow/disallow specified agents ability to use voice in session - - "text" or "voice" - - - - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - A message sent from the agent to the simulator which tells the - simulator we've accepted a conference invitation - - - - The conference SessionID - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - Key of sender - - - Name of sender - - - Key of destination avatar - - - ID of originating estate - - - Key of originating region - - - Coordinates in originating region - - - Instant message type - - - Group IM session toggle - - - Key of IM session, for Group Messages, the groups UUID - - - Timestamp of the instant message - - - Instant message text - - - Whether this message is held for offline avatars - - - Context specific packed data - - - Is this invitation for voice group/conference chat - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Sent from the simulator to the viewer. - - When an agent initially joins a session the AgentUpdatesBlock object will contain a list of session members including - a boolean indicating they can use voice chat in this session, a boolean indicating they are allowed to moderate - this session, and lastly a string which indicates another agent is entering the session with the Transition set to "ENTER" - - During the session lifetime updates on individuals are sent. During the update the booleans sent during the initial join are - excluded with the exception of the Transition field. This indicates a new user entering or exiting the session with - the string "ENTER" or "LEAVE" respectively. - - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - An EventQueue message sent when the agent is forcibly removed from a chatterbox session - - - - - A string containing the reason the agent was removed - - - - - The ChatterBoxSession's SessionID - - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - - - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - - Event Queue message describing physics engine attributes of a list of objects - Sim sends these when object is selected - - - - Array with the list of physics properties - - - - Serializes the message - - Serialized OSD - - - - Deserializes the message - - Incoming data to deserialize - - - - Deserializes the message - - Incoming data to deserialize - - - - Serializes the message - - Serialized OSD - - - - - Deserializes the message - - Incoming data to deserialize - - - - Serializes the message - - Serialized OSD - - - - Deserializes the message - - Incoming data to deserialize - - - - Serializes the message - - Serialized OSD - - - - Detects which class handles deserialization of this message - - An containing the data - Object capable of decoding this message - - - - A message sent from the viewer to the simulator which - specifies that the user has changed current URL - of the specific media on a prim face - - - - - New URL - - - - - Prim UUID where navigation occured - - - - - Face index - - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - Base class used for the ObjectMedia message - - - - Message used to retrive prim media data - - - - - Prim UUID - - - - - Requested operation, either GET or UPDATE - - - - - Serialize object - - Serialized object as OSDMap - - - - Deserialize the message - - An containing the data - - - - Message used to update prim media data - - - - - Prim UUID - - - - - Array of media entries indexed by face number - - - - - Media version string - - - - - Serialize object - - Serialized object as OSDMap - - - - Deserialize the message - - An containing the data - - - - Message used to update prim media data - - - - - Prim UUID - - - - - Array of media entries indexed by face number - - - - - Requested operation, either GET or UPDATE - - - - - Serialize object - - Serialized object as OSDMap - - - - Deserialize the message - - An containing the data - - - - Message for setting or getting per face MediaEntry - - - - The request or response details block - - - - Serialize the object - - An containing the objects data - - - - Deserialize the message - - An containing the data - - - Details about object resource usage - - - Object UUID - - - Object name - - - Indicates if object is group owned - - - Locatio of the object - - - Object owner - - - Resource usage, keys are resource names, values are resource usage for that specific resource - - - - Deserializes object from OSD - - An containing the data - - - - Makes an instance based on deserialized data - - serialized data - Instance containg deserialized data - - - Details about parcel resource usage - - - Parcel UUID - - - Parcel local ID - - - Parcel name - - - Indicates if parcel is group owned - - - Parcel owner - - - Array of containing per object resource usage - - - - Deserializes object from OSD - - An containing the data - - - - Makes an instance based on deserialized data - - serialized data - Instance containg deserialized data - - - Resource usage base class, both agent and parcel resource - usage contains summary information - - - Summary of available resources, keys are resource names, - values are resource usage for that specific resource - - - Summary resource usage, keys are resource names, - values are resource usage for that specific resource - - - - Serializes object - - serialized data - - - - Deserializes object from OSD - - An containing the data - - - Agent resource usage - - - Per attachment point object resource usage - - - - Deserializes object from OSD - - An containing the data - - - - Makes an instance based on deserialized data - - serialized data - Instance containg deserialized data - - - - Detects which class handles deserialization of this message - - An containing the data - Object capable of decoding this message - - - Request message for parcel resource usage - - - UUID of the parel to request resource usage info - - - - Serializes object - - serialized data - - - - Deserializes object from OSD - - An containing the data - - - Response message for parcel resource usage - - - URL where parcel resource usage details can be retrieved - - - URL where parcel resource usage summary can be retrieved - - - - Serializes object - - serialized data - - - - Deserializes object from OSD - - An containing the data - - - - Detects which class handles deserialization of this message - - An containing the data - Object capable of decoding this message - - - Parcel resource usage - - - Array of containing per percal resource usage - - - - Deserializes object from OSD - - An containing the data - - - - Reply to request for bunch if display names - - - - Current display name - - - Following UUIDs failed to return a valid display name - - - - Serializes the message - - OSD containting the messaage - - - - Message sent when requesting change of the display name - - - - Current display name - - - Desired new display name - - - - Serializes the message - - OSD containting the messaage - - - - Message recieved in response to request to change display name - - - - New display name - - - String message indicating the result of the operation - - - Numerical code of the result, 200 indicates success - - - - Serializes the message - - OSD containting the messaage - - - - Message recieved when someone nearby changes their display name - - - - Previous display name, empty string if default - - - New display name - - - - Serializes the message - - OSD containting the messaage - - - - Return a decoded capabilities message as a strongly typed object - - A string containing the name of the capabilities message key - An to decode - A strongly typed object containing the decoded information from the capabilities message, or null - if no existing Message object exists for the specified event - - - - Permissions for control of object media - - - - - Style of cotrols that shold be displayed to the user - - - - - Class representing media data for a single face - - - - Is display of the alternative image enabled - - - Should media auto loop - - - Shoule media be auto played - - - Auto scale media to prim face - - - Should viewer automatically zoom in on the face when clicked - - - Should viewer interpret first click as interaction with the media - or when false should the first click be treated as zoom in commadn - - - Style of controls viewer should display when - viewer media on this face - - - Starting URL for the media - - - Currently navigated URL - - - Media height in pixes - - - Media width in pixels - - - Who can controls the media - - - Who can interact with the media - - - Is URL whitelist enabled - - - Array of URLs that are whitelisted - - - - Serialize to OSD - - OSDMap with the serialized data - - - - Deserialize from OSD data - - Serialized OSD data - Deserialized object - - - - Particle system specific enumerators, flags and methods. - - - - - Current version of the media data for the prim - - - - - Array of media entries indexed by face number - - - - - Complete structure for the particle system - - - - - Particle source pattern - - - - None - - - Drop particles from source position with no force - - - "Explode" particles in all directions - - - Particles shoot across a 2D area - - - Particles shoot across a 3D Cone - - - Inverse of AngleCone (shoot particles everywhere except the 3D cone defined - - - - Particle Data Flags - - - - None - - - Interpolate color and alpha from start to end - - - Interpolate scale from start to end - - - Bounce particles off particle sources Z height - - - velocity of particles is dampened toward the simulators wind - - - Particles follow the source - - - Particles point towards the direction of source's velocity - - - Target of the particles - - - Particles are sent in a straight line - - - Particles emit a glow - - - used for point/grab/touch - - - continuous ribbon particle - - - particle data contains glow - - - particle data contains blend functions - - - - Particle Flags Enum - - - - None - - - Acceleration and velocity for particles are - relative to the object rotation - - - Particles use new 'correct' angle parameters - - - Particle Flags - There appears to be more data packed in to this area - for many particle systems. It doesn't appear to be flag values - and serialization breaks unless there is a flag for every - possible bit so it is left as an unsigned integer - - - pattern of particles - - - A representing the maximimum age (in seconds) particle will be displayed - Maximum value is 30 seconds - - - A representing the number of seconds, - from when the particle source comes into view, - or the particle system's creation, that the object will emits particles; - after this time period no more particles are emitted - - - A in radians that specifies where particles will not be created - - - A in radians that specifies where particles will be created - - - A representing the number of seconds between burts. - - - A representing the number of meters - around the center of the source where particles will be created. - - - A representing in seconds, the minimum speed between bursts of new particles - being emitted - - - A representing in seconds the maximum speed of new particles being emitted. - - - A representing the maximum number of particles emitted per burst - - - A which represents the velocity (speed) from the source which particles are emitted - - - A which represents the Acceleration from the source which particles are emitted - - - The Key of the texture displayed on the particle - - - The Key of the specified target object or avatar particles will follow - - - Flags of particle from - - - Max Age particle system will emit particles for - - - The the particle has at the beginning of its lifecycle - - - The the particle has at the ending of its lifecycle - - - A that represents the starting X size of the particle - Minimum value is 0, maximum value is 4 - - - A that represents the starting Y size of the particle - Minimum value is 0, maximum value is 4 - - - A that represents the ending X size of the particle - Minimum value is 0, maximum value is 4 - - - A that represents the ending Y size of the particle - Minimum value is 0, maximum value is 4 - - - A that represents the start glow value - Minimum value is 0, maximum value is 1 - - - A that represents the end glow value - Minimum value is 0, maximum value is 1 - - - OpenGL blend function to use at particle source - - - OpenGL blend function to use at particle destination - - - - Can this particle system be packed in a legacy compatible way - - True if the particle system doesn't use new particle system features - - - - Decodes a byte[] array into a ParticleSystem Object - - ParticleSystem object - Start position for BitPacker - - - - Generate byte[] array from particle data - - Byte array - - - - - - - Parameters used to construct a visual representation of a primitive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Attachment point to an avatar - - - - - - - - - - - - - - - - Calculdates hash code for prim construction data - - The has - - - - Information on the flexible properties of a primitive - - - - - - - - - - - - - - - - - - - - - - - Default constructor - - - - - - - - - - - - - - - - - - - - - - - - Information on the light properties of a primitive - - - - - - - - - - - - - - - - - - - - Default constructor - - - - - - - - - - - - - - - - - - - - - - - - Information on the light properties of a primitive as texture map - - - - - - - - - - - Default constructor - - - - - - - - - - - - - - - - - - - - - - - - Information on the sculpt properties of a sculpted primitive - - - - - Render inside out (inverts the normals). - - - - - Render an X axis mirror of the sculpty. - - - - - Default constructor - - - - - - - - - - - - Extended properties to describe an object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default constructor - - - - - Set the properties that are set in an ObjectPropertiesFamily packet - - that has - been partially filled by an ObjectPropertiesFamily packet - - - - Describes physics attributes of the prim - - - - Primitive's local ID - - - Density (1000 for normal density) - - - Friction - - - Gravity multiplier (1 for normal gravity) - - - Type of physics representation of this primitive in the simulator - - - Restitution - - - - Creates PhysicsProperties from OSD - - OSDMap with incoming data - Deserialized PhysicsProperties object - - - - Serializes PhysicsProperties to OSD - - OSDMap with serialized PhysicsProperties data - - - - - - - - - - - - - - - - - - - - - Foliage type for this primitive. Only applicable if this - primitive is foliage - - - Unknown - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Identifies the owner if audio or a particle system is - active - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Objects physics engine propertis - - - Extra data about primitive - - - Indicates if prim is attached to an avatar - - - Number of clients referencing this prim - - - Uses basic heuristics to estimate the primitive shape - - - - Default constructor - - - - - Packs PathTwist, PathTwistBegin, PathRadiusOffset, and PathSkew - parameters in to signed eight bit values - - Floating point parameter to pack - Signed eight bit value containing the packed parameter - - - - Unpacks PathTwist, PathTwistBegin, PathRadiusOffset, and PathSkew - parameters from signed eight bit integers to floating point values - - Signed eight bit value to unpack - Unpacked floating point value - - - - Texture animation mode - - - - Disable texture animation - - - Enable texture animation - - - Loop when animating textures - - - Animate in reverse direction - - - Animate forward then reverse - - - Slide texture smoothly instead of frame-stepping - - - Rotate texture instead of using frames - - - Scale texture instead of using frames - - - - A single textured face. Don't instantiate this class yourself, use the - methods in TextureEntry - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - In the future this will specify whether a webpage is - attached to this face - - - - - - - - - - Contains the definition for individual faces - - - - - - - - - - - - Represents all of the texturable faces for an object - - Grid objects have infinite faces, with each face - using the properties of the default face unless set otherwise. So if - you have a TextureEntry with a default texture uuid of X, and face 18 - has a texture UUID of Y, every face would be textured with X except for - face 18 that uses Y. In practice however, primitives utilize a maximum - of nine faces - - - - - - - - - - Constructor that takes a default texture UUID - - Texture UUID to use as the default texture - - - - Constructor that takes a TextureEntryFace for the - default face - - Face to use as the default face - - - - Constructor that creates the TextureEntry class from a byte array - - Byte array containing the TextureEntry field - Starting position of the TextureEntry field in - the byte array - Length of the TextureEntry field, in bytes - - - - This will either create a new face if a custom face for the given - index is not defined, or return the custom face for that index if - it already exists - - The index number of the face to create or - retrieve - A TextureEntryFace containing all the properties for that - face - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Controls the texture animation of a particular prim - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The type of bump-mapping applied to a face - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The level of shininess applied to a face - - - - - - - - - - - - - - - - - The texture mapping style used for a face - - - - - - - - - - - - - - - - - Flags in the TextureEntry block that describe which properties are - set - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This is used to login a specific user account(s). It may only be called after - Connector initialization has completed successfully - - Handle returned from successful Connector ‘create’ request - User's account name - User's account password - Values may be “AutoAnswer” or “VerifyAnswer” - "" - This is an integer that specifies how often - the daemon will send participant property events while in a channel. If this is not set - the default will be “on state change”, which means that the events will be sent when - the participant starts talking, stops talking, is muted, is unmuted. - The valid values are: - 0 – Never - 5 – 10 times per second - 10 – 5 times per second - 50 – 1 time per second - 100 – on participant state change (this is the default) - false - - - - - This is used to logout a user session. It should only be called with a valid AccountHandle. - - Handle returned from successful Connector ‘login’ request - - - - - This is used to get a list of audio devices that can be used for capture (input) of voice. - - - - - - This is used to get a list of audio devices that can be used for render (playback) of voice. - - - - - This command is used to select the render device. - - The name of the device as returned by the Aux.GetRenderDevices command. - - - - This command is used to select the capture device. - - The name of the device as returned by the Aux.GetCaptureDevices command. - - - - This command is used to start the audio capture process which will cause - AuxAudioProperty Events to be raised. These events can be used to display a - microphone VU meter for the currently selected capture device. This command - should not be issued if the user is on a call. - - (unused but required) - - - - - This command is used to stop the audio capture process. - - - - - - This command is used to set the mic volume while in the audio tuning process. - Once an acceptable mic level is attained, the application must issue a - connector set mic volume command to have that level be used while on voice - calls. - - the microphone volume (-100 to 100 inclusive) - - - - - This command is used to set the speaker volume while in the audio tuning - process. Once an acceptable speaker level is attained, the application must - issue a connector set speaker volume command to have that level be used while - on voice calls. - - the speaker volume (-100 to 100 inclusive) - - - - - This is used to initialize and stop the Connector as a whole. The Connector - Create call must be completed successfully before any other requests are made - (typically during application initialization). The shutdown should be called - when the application is shutting down to gracefully release resources - - A string value indicting the Application name - URL for the management server - LoggingSettings - - - - - - Shutdown Connector -- Should be called when the application is shutting down - to gracefully release resources - - Handle returned from successful Connector ‘create’ request - - - - Mute or unmute the microphone - - Handle returned from successful Connector ‘create’ request - true (mute) or false (unmute) - - - - Mute or unmute the speaker - - Handle returned from successful Connector ‘create’ request - true (mute) or false (unmute) - - - - Set microphone volume - - Handle returned from successful Connector ‘create’ request - The level of the audio, a number between -100 and 100 where - 0 represents ‘normal’ speaking volume - - - - Set local speaker volume - - Handle returned from successful Connector ‘create’ request - The level of the audio, a number between -100 and 100 where - 0 represents ‘normal’ speaking volume - - - - List of audio input devices - - - - - List of audio output devices - - - - - Start up the Voice service. - - - - - Handle miscellaneous request status - - - - ///If something goes wrong, we log it. - - - - Cleanup oject resources - - - - - Request voice cap when changing regions - - - - - Handle a change in session state - - - - - Close a voice session - - - - - - Locate a Session context from its handle - - Creates the session context if it does not exist. - - - - Handle completion of main voice cap request. - - - - - - - - Daemon has started so connect to it. - - - - - The daemon TCP connection is open. - - - - - Handle creation of the Connector. - - - - - Handle response to audio output device query - - - - - Handle response to audio input device query - - - - - Set audio test mode - - - - - Set voice channel for new parcel - - - - - - Request info from a parcel capability Uri. - - - - - - Receive parcel voice cap - - - - - - - - Tell Vivox where we are standing - - This has to be called when we move or turn. - - - - Start and stop updating out position. - - - - - Enable logging - - - The folder where any logs will be created - - - This will be prepended to beginning of each log file - - - The suffix or extension to be appended to each log file - - - - 0: NONE - No logging - 1: ERROR - Log errors only - 2: WARNING - Log errors and warnings - 3: INFO - Log errors, warnings and info - 4: DEBUG - Log errors, warnings, info and debug - - - - - Constructor for default logging settings - - - - Audio Properties Events are sent after audio capture is started. These events are used to display a microphone VU meter - - - - Event for most mundane request reposnses. - - - - Response to Connector.Create request - - - Response to Aux.GetCaptureDevices request - - - Response to Aux.GetRenderDevices request - - - Audio Properties Events are sent after audio capture is started. - These events are used to display a microphone VU meter - - - Response to Account.Login request - - - This event message is sent whenever the login state of the - particular Account has transitioned from one value to another - - - - Starts a thread that keeps the daemon running - - - - - - - Stops the daemon and the thread keeping it running - - - - - - - - - - - - - Create a Session - Sessions typically represent a connection to a media session with one or more - participants. This is used to generate an ‘outbound’ call to another user or - channel. The specifics depend on the media types involved. A session handle is - required to control the local user functions within the session (or remote - users if the current account has rights to do so). Currently creating a - session automatically connects to the audio media, there is no need to call - Session.Connect at this time, this is reserved for future use. - - Handle returned from successful Connector ‘create’ request - This is the URI of the terminating point of the session (ie who/what is being called) - This is the display name of the entity being called (user or channel) - Only needs to be supplied when the target URI is password protected - This indicates the format of the password as passed in. This can either be - “ClearText” or “SHA1UserName”. If this element does not exist, it is assumed to be “ClearText”. If it is - “SHA1UserName”, the password as passed in is the SHA1 hash of the password and username concatenated together, - then base64 encoded, with the final “=” character stripped off. - - - - - - - Used to accept a call - - SessionHandle such as received from SessionNewEvent - "default" - - - - - This command is used to start the audio render process, which will then play - the passed in file through the selected audio render device. This command - should not be issued if the user is on a call. - - The fully qualified path to the sound file. - True if the file is to be played continuously and false if it is should be played once. - - - - - This command is used to stop the audio render process. - - The fully qualified path to the sound file issued in the start render command. - - - - - This is used to ‘end’ an established session (i.e. hang-up or disconnect). - - Handle returned from successful Session ‘create’ request or a SessionNewEvent - - - - - Set the combined speaking and listening position in 3D space. - - Handle returned from successful Session ‘create’ request or a SessionNewEvent - Speaking position - Listening position - - - - - Set User Volume for a particular user. Does not affect how other users hear that user. - - Handle returned from successful Session ‘create’ request or a SessionNewEvent - - The level of the audio, a number between -100 and 100 where 0 represents ‘normal’ speaking volume - - - - Positional vector of the users position - - - Velocity vector of the position - - - At Orientation (X axis) of the position - - - Up Orientation (Y axis) of the position - - - Left Orientation (Z axis) of the position - - - - Extract the avatar UUID encoded in a SIP URI - - - - - - - Represents a single Voice Session to the Vivox service. - - - - - Close this session. - - - - - Look up an existing Participants in this session - - - - - - - - - - - - Delegate to wrap another delegate and its arguments - - - - - - - An instance of DelegateWrapper which calls InvokeWrappedDelegate, - which in turn calls the DynamicInvoke method of the wrapped - delegate - - - - - Callback used to call EndInvoke on the asynchronously - invoked DelegateWrapper - - - - - Executes the specified delegate with the specified arguments - asynchronously on a thread pool thread - - - - - - - Invokes the wrapped delegate synchronously - - - - - - - Calls EndInvoke on the wrapper and Close on the resulting WaitHandle - to prevent resource leaks - - - - - diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll index a0782f8..83d3946 100755 Binary files a/bin/OpenMetaverse.dll and b/bin/OpenMetaverse.dll differ diff --git a/bin/OpenMetaverseTypes.XML b/bin/OpenMetaverseTypes.XML deleted file mode 100644 index 3da5955..0000000 --- a/bin/OpenMetaverseTypes.XML +++ /dev/null @@ -1,2667 +0,0 @@ - - - - OpenMetaverseTypes - - - - - Same as Queue except Dequeue function blocks until there is an object to return. - Note: This class does not need to be synchronized - - - - - Create new BlockingQueue. - - The System.Collections.ICollection to copy elements from - - - - Create new BlockingQueue. - - The initial number of elements that the queue can contain - - - - Create new BlockingQueue. - - - - - BlockingQueue Destructor (Close queue, resume any waiting thread). - - - - - Remove all objects from the Queue. - - - - - Remove all objects from the Queue, resume all dequeue threads. - - - - - Removes and returns the object at the beginning of the Queue. - - Object in queue. - - - - Removes and returns the object at the beginning of the Queue. - - time to wait before returning - Object in queue. - - - - Removes and returns the object at the beginning of the Queue. - - time to wait before returning (in milliseconds) - Object in queue. - - - - Adds an object to the end of the Queue - - Object to put in queue - - - - Open Queue. - - - - - Gets flag indicating if queue has been closed. - - - - - Copy constructor - - Circular queue to copy - - - - An 8-bit color structure including an alpha channel - - - - Red - - - Green - - - Blue - - - Alpha - - - - - - - - - - - - - Builds a color from a byte array - - Byte array containing a 16 byte color - Beginning position in the byte array - True if the byte array stores inverted values, - otherwise false. For example the color black (fully opaque) inverted - would be 0xFF 0xFF 0xFF 0x00 - - - - Returns the raw bytes for this vector - - Byte array containing a 16 byte color - Beginning position in the byte array - True if the byte array stores inverted values, - otherwise false. For example the color black (fully opaque) inverted - would be 0xFF 0xFF 0xFF 0x00 - True if the alpha value is inverted in - addition to whatever the inverted parameter is. Setting inverted true - and alphaInverted true will flip the alpha value back to non-inverted, - but keep the other color bytes inverted - A 16 byte array containing R, G, B, and A - - - - Copy constructor - - Color to copy - - - - IComparable.CompareTo implementation - - Sorting ends up like this: |--Grayscale--||--Color--|. - Alpha is only used when the colors are otherwise equivalent - - - - Builds a color from a byte array - - Byte array containing a 16 byte color - Beginning position in the byte array - True if the byte array stores inverted values, - otherwise false. For example the color black (fully opaque) inverted - would be 0xFF 0xFF 0xFF 0x00 - True if the alpha value is inverted in - addition to whatever the inverted parameter is. Setting inverted true - and alphaInverted true will flip the alpha value back to non-inverted, - but keep the other color bytes inverted - - - - Writes the raw bytes for this color to a byte array - - Destination byte array - Position in the destination array to start - writing. Must be at least 16 bytes before the end of the array - - - - Serializes this color into four bytes in a byte array - - Destination byte array - Position in the destination array to start - writing. Must be at least 4 bytes before the end of the array - True to invert the output (1.0 becomes 0 - instead of 255) - - - - Writes the raw bytes for this color to a byte array - - Destination byte array - Position in the destination array to start - writing. Must be at least 16 bytes before the end of the array - - - - Ensures that values are in range 0-1 - - - - - Create an RGB color from a hue, saturation, value combination - - Hue - Saturation - Value - An fully opaque RGB color (alpha is 1.0) - - - - Performs linear interpolation between two colors - - Color to start at - Color to end at - Amount to interpolate - The interpolated color - - - A Color4 with zero RGB values and fully opaque (alpha 1.0) - - - A Color4 with full RGB values (1.0) and fully opaque (alpha 1.0) - - - - Attribute class that allows extra attributes to be attached to ENUMs - - - - Text used when presenting ENUM to user - - - Default initializer - - - Text used when presenting ENUM to user - - - - The different types of grid assets - - - - Unknown asset type - - - Texture asset, stores in JPEG2000 J2C stream format - - - Sound asset - - - Calling card for another avatar - - - Link to a location in world - - - Collection of textures and parameters that can be worn by an avatar - - - Primitive that can contain textures, sounds, - scripts and more - - - Notecard asset - - - Holds a collection of inventory items. "Category" in the Linden viewer - - - Linden scripting language script - - - LSO bytecode for a script - - - Uncompressed TGA texture - - - Collection of textures and shape parameters that can be worn - - - Uncompressed sound - - - Uncompressed TGA non-square image, not to be used as a - texture - - - Compressed JPEG non-square image, not to be used as a - texture - - - Animation - - - Sequence of animations, sounds, chat, and pauses - - - Simstate file - - - Asset is a link to another inventory item - - - Asset is a link to another inventory folder - - - Marketplace Folder. Same as an Category but different display methods. - - - Linden mesh format - - - - The different types of folder. - - - - None folder type - - - Texture folder type - - - Sound folder type - - - Calling card folder type - - - Landmark folder type - - - Clothing folder type - - - Object folder type - - - Notecard folder type - - - The root folder type - - - LSLText folder - - - Bodyparts folder - - - Trash folder - - - Snapshot folder - - - Lost And Found folder - - - Animation folder - - - Gesture folder - - - Favorites folder - - - Ensemble beginning range - - - Ensemble ending range - - - Current outfit folder - - - Outfit folder - - - My outfits folder - - - Mesh folder - - - Marketplace direct delivery inbox ("Received Items") - - - Marketplace direct delivery outbox - - - Basic root folder - - - Marketplace listings folder - - - Marketplace stock folder - - - Hypergrid Suitcase folder - - - - Inventory Item Types, eg Script, Notecard, Folder, etc - - - - Unknown - - - Texture - - - Sound - - - Calling Card - - - Landmark - - - Notecard - - - - - - Folder - - - - - - an LSL Script - - - - - - - - - - - - - - - - - - - - - - Item Sale Status - - - - Not for sale - - - The original is for sale - - - Copies are for sale - - - The contents of the object are for sale - - - - Types of wearable assets - - - - Body shape - - - Skin textures and attributes - - - Hair - - - Eyes - - - Shirt - - - Pants - - - Shoes - - - Socks - - - Jacket - - - Gloves - - - Undershirt - - - Underpants - - - Skirt - - - Alpha mask to hide parts of the avatar - - - Tattoo - - - Physics - - - Invalid wearable asset - - - - Identifier code for primitive types - - - - None - - - A Primitive - - - A Avatar - - - Linden grass - - - Linden tree - - - A primitive that acts as the source for a particle stream - - - A Linden tree - - - - Primary parameters for primitives such as Physics Enabled or Phantom - - - - Deprecated - - - Whether physics are enabled for this object - - - - - - - - - - - - - - - - - - - - - Whether this object contains an active touch script - - - - - - Whether this object can receive payments - - - Whether this object is phantom (no collisions) - - - - - - - - - - - - - - - Deprecated - - - - - - - - - - - - Deprecated - - - - - - - - - - - - - - - Server flag, will not be sent to clients. Specifies that - the object is destroyed when it touches a simulator edge - - - Server flag, will not be sent to clients. Specifies that - the object will be returned to the owner's inventory when it - touches a simulator edge - - - Server flag, will not be sent to clients. - - - Server flag, will not be sent to client. Specifies that - the object is hovering/flying - - - - - - - - - - - - - - - - Sound flags for sounds attached to primitives - - - - - - - - - - - - - - - - - - - - - - - - - - Material type for a primitive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Used in a helper function to roughly determine prim shape - - - - - Extra parameters for primitives, these flags are for features that have - been added after the original ObjectFlags that has all eight bits - reserved already - - - - Whether this object has flexible parameters - - - Whether this object has light parameters - - - Whether this object is a sculpted prim - - - Whether this object is a light image map - - - Whether this object is a mesh - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Attachment points for objects on avatar bodies - - - Both InventoryObject and InventoryAttachment types can be attached - - - - Right hand if object was not previously attached - - - Chest - - - Skull - - - Left shoulder - - - Right shoulder - - - Left hand - - - Right hand - - - Left foot - - - Right foot - - - Spine - - - Pelvis - - - Mouth - - - Chin - - - Left ear - - - Right ear - - - Left eyeball - - - Right eyeball - - - Nose - - - Right upper arm - - - Right forearm - - - Left upper arm - - - Left forearm - - - Right hip - - - Right upper leg - - - Right lower leg - - - Left hip - - - Left upper leg - - - Left lower leg - - - Stomach - - - Left pectoral - - - Right pectoral - - - HUD Center position 2 - - - HUD Top-right - - - HUD Top - - - HUD Top-left - - - HUD Center - - - HUD Bottom-left - - - HUD Bottom - - - HUD Bottom-right - - - Neck - - - Avatar Center - - - - Tree foliage types - - - - Pine1 tree - - - Oak tree - - - Tropical Bush1 - - - Palm1 tree - - - Dogwood tree - - - Tropical Bush2 - - - Palm2 tree - - - Cypress1 tree - - - Cypress2 tree - - - Pine2 tree - - - Plumeria - - - Winter pinetree1 - - - Winter Aspen tree - - - Winter pinetree2 - - - Eucalyptus tree - - - Fern - - - Eelgrass - - - Sea Sword - - - Kelp1 plant - - - Beach grass - - - Kelp2 plant - - - - Grass foliage types - - - - - - - - - - - - - - - - - - - - - - - Action associated with clicking on an object - - - - Touch object - - - Sit on object - - - Purchase object or contents - - - Pay the object - - - Open task inventory - - - Play parcel media - - - Open parcel media - - - - Type of physics representation used for this prim in the simulator - - - - Use prim physics form this object - - - No physics, prim doesn't collide - - - Use convex hull represantion of this prim - - - For thread safety - - - For thread safety - - - - Purges expired objects from the cache. Called automatically by the purge timer. - - - - - A thread-safe lockless queue that supports multiple readers and - multiple writers - - - - - Provides a node container for data in a singly linked list - - - - Pointer to the next node in list - - - The data contained by the node - - - - Constructor - - - - - Constructor - - - - Queue head - - - Queue tail - - - Queue item count - - - Gets the current number of items in the queue. Since this - is a lockless collection this value should be treated as a close - estimate - - - - Constructor - - - - - Enqueue an item - - Item to enqeue - - - - Try to dequeue an item - - Dequeued item if the dequeue was successful - True if an item was successfully deqeued, otherwise false - - - - Convert this matrix to euler rotations - - X euler angle - Y euler angle - Z euler angle - - - - Convert this matrix to a quaternion rotation - - A quaternion representation of this rotation matrix - - - - Construct a matrix from euler rotation values in radians - - X euler angle in radians - Y euler angle in radians - Z euler angle in radians - - - - Get a formatted string representation of the vector - - A string representation of the vector - - - A 4x4 matrix containing all zeroes - - - A 4x4 identity matrix - - - X value - - - Y value - - - Z value - - - W value - - - - Build a quaternion from normalized float values - - X value from -1.0 to 1.0 - Y value from -1.0 to 1.0 - Z value from -1.0 to 1.0 - - - - Constructor, builds a quaternion object from a byte array - - Byte array containing four four-byte floats - Offset in the byte array to start reading at - Whether the source data is normalized or - not. If this is true 12 bytes will be read, otherwise 16 bytes will - be read. - - - - Normalizes the quaternion - - - - - Builds a quaternion object from a byte array - - The source byte array - Offset in the byte array to start reading at - Whether the source data is normalized or - not. If this is true 12 bytes will be read, otherwise 16 bytes will - be read. - - - - Normalize this quaternion and serialize it to a byte array - - A 12 byte array containing normalized X, Y, and Z floating - point values in order using little endian byte ordering - - - - Writes the raw bytes for this quaternion to a byte array - - Destination byte array - Position in the destination array to start - writing. Must be at least 12 bytes before the end of the array - - - - Convert this quaternion to euler angles - - X euler angle - Y euler angle - Z euler angle - - - - Convert this quaternion to an angle around an axis - - Unit vector describing the axis - Angle around the axis, in radians - - - - Returns the conjugate (spatial inverse) of a quaternion - - - - - Build a quaternion from an axis and an angle of rotation around - that axis - - - - - Build a quaternion from an axis and an angle of rotation around - that axis - - Axis of rotation - Angle of rotation - - - - Creates a quaternion from a vector containing roll, pitch, and yaw - in radians - - Vector representation of the euler angles in - radians - Quaternion representation of the euler angles - - - - Creates a quaternion from roll, pitch, and yaw euler angles in - radians - - X angle in radians - Y angle in radians - Z angle in radians - Quaternion representation of the euler angles - - - - Conjugates and renormalizes a vector - - - - - Spherical linear interpolation between two quaternions - - - - - Get a string representation of the quaternion elements with up to three - decimal digits and separated by spaces only - - Raw string representation of the quaternion - - - A quaternion with a value of 0,0,0,1 - - - - Determines the appropriate events to set, leaves the locks, and sets the events. - - - - - A routine for lazily creating a event outside the lock (so if errors - happen they are outside the lock and that we don't do much work - while holding a spin lock). If all goes well, reenter the lock and - set 'waitEvent' - - - - - Waits on 'waitEvent' with a timeout of 'millisceondsTimeout. - Before the wait 'numWaiters' is incremented and is restored before leaving this routine. - - - - - A hierarchical token bucket for bandwidth throttling. See - http://en.wikipedia.org/wiki/Token_bucket for more information - - - - Parent bucket to this bucket, or null if this is a root - bucket - - - Size of the bucket in bytes. If zero, the bucket has - infinite capacity - - - Rate that the bucket fills, in bytes per millisecond. If - zero, the bucket always remains full - - - Number of tokens currently in the bucket - - - Time of the last drip, in system ticks - - - - The parent bucket of this bucket, or null if this bucket has no - parent. The parent bucket will limit the aggregate bandwidth of all - of its children buckets - - - - - Maximum burst rate in bytes per second. This is the maximum number - of tokens that can accumulate in the bucket at any one time - - - - - The speed limit of this bucket in bytes per second. This is the - number of tokens that are added to the bucket per second - - Tokens are added to the bucket any time - is called, at the granularity of - the system tick interval (typically around 15-22ms) - - - - The number of bytes that can be sent at this moment. This is the - current number of tokens in the bucket - If this bucket has a parent bucket that does not have - enough tokens for a request, will - return false regardless of the content of this bucket - - - - - Default constructor - - Parent bucket if this is a child bucket, or - null if this is a root bucket - Maximum size of the bucket in bytes, or - zero if this bucket has no maximum capacity - Rate that the bucket fills, in bytes per - second. If zero, the bucket always remains full - - - - Remove a given number of tokens from the bucket - - Number of tokens to remove from the bucket - True if the requested number of tokens were removed from - the bucket, otherwise false - - - - Remove a given number of tokens from the bucket - - Number of tokens to remove from the bucket - True if tokens were added to the bucket - during this call, otherwise false - True if the requested number of tokens were removed from - the bucket, otherwise false - - - - Add tokens to the bucket over time. The number of tokens added each - call depends on the length of time that has passed since the last - call to Drip - - True if tokens were added to the bucket, otherwise false - - - - Operating system - - - - Unknown - - - Microsoft Windows - - - Microsoft Windows CE - - - Linux - - - Apple OSX - - - - Runtime platform - - - - .NET runtime - - - Mono runtime: http://www.mono-project.com/ - - - Used for converting degrees to radians - - - Used for converting radians to degrees - - - Provide a single instance of the CultureInfo class to - help parsing in situations where the grid assumes an en-us - culture - - - UNIX epoch in DateTime format - - - Provide a single instance of the MD5 class to avoid making - duplicate copies and handle thread safety - - - Provide a single instance of the SHA-1 class to avoid - making duplicate copies and handle thread safety - - - Provide a single instance of a random number generator - to avoid making duplicate copies and handle thread safety - - - - Clamp a given value between a range - - Value to clamp - Minimum allowable value - Maximum allowable value - A value inclusively between lower and upper - - - - Clamp a given value between a range - - Value to clamp - Minimum allowable value - Maximum allowable value - A value inclusively between lower and upper - - - - Clamp a given value between a range - - Value to clamp - Minimum allowable value - Maximum allowable value - A value inclusively between lower and upper - - - - Round a floating-point value to the nearest integer - - Floating point number to round - Integer - - - - Test if a single precision float is a finite number - - - - - Test if a double precision float is a finite number - - - - - Get the distance between two floating-point values - - First value - Second value - The distance between the two values - - - - Compute the MD5 hash for a byte array - - Byte array to compute the hash for - MD5 hash of the input data - - - - Compute the SHA1 hash for a byte array - - Byte array to compute the hash for - SHA1 hash of the input data - - - - Calculate the SHA1 hash of a given string - - The string to hash - The SHA1 hash as a string - - - - Compute the SHA256 hash for a byte array - - Byte array to compute the hash for - SHA256 hash of the input data - - - - Calculate the SHA256 hash of a given string - - The string to hash - The SHA256 hash as a string - - - - Calculate the MD5 hash of a given string - - The password to hash - An MD5 hash in string format, with $1$ prepended - - - - Calculate the MD5 hash of a given string - - The string to hash - The MD5 hash as a string - - - - Generate a random double precision floating point value - - Random value of type double - - - - Get the current running platform - - Enumeration of the current platform we are running on - - - - Get the current running runtime - - Enumeration of the current runtime we are running on - - - - Convert the first two bytes starting in the byte array in - little endian ordering to a signed short integer - - An array two bytes or longer - A signed short integer, will be zero if a short can't be - read at the given position - - - - Convert the first two bytes starting at the given position in - little endian ordering to a signed short integer - - An array two bytes or longer - Position in the array to start reading - A signed short integer, will be zero if a short can't be - read at the given position - - - - Convert the first four bytes starting at the given position in - little endian ordering to a signed integer - - An array four bytes or longer - Position to start reading the int from - A signed integer, will be zero if an int can't be read - at the given position - - - - Convert the first four bytes of the given array in little endian - ordering to a signed integer - - An array four bytes or longer - A signed integer, will be zero if the array contains - less than four bytes - - - - Convert the first eight bytes of the given array in little endian - ordering to a signed long integer - - An array eight bytes or longer - A signed long integer, will be zero if the array contains - less than eight bytes - - - - Convert the first eight bytes starting at the given position in - little endian ordering to a signed long integer - - An array eight bytes or longer - Position to start reading the long from - A signed long integer, will be zero if a long can't be read - at the given position - - - - Convert the first two bytes starting at the given position in - little endian ordering to an unsigned short - - Byte array containing the ushort - Position to start reading the ushort from - An unsigned short, will be zero if a ushort can't be read - at the given position - - - - Convert two bytes in little endian ordering to an unsigned short - - Byte array containing the ushort - An unsigned short, will be zero if a ushort can't be - read - - - - Convert the first four bytes starting at the given position in - little endian ordering to an unsigned integer - - Byte array containing the uint - Position to start reading the uint from - An unsigned integer, will be zero if a uint can't be read - at the given position - - - - Convert the first four bytes of the given array in little endian - ordering to an unsigned integer - - An array four bytes or longer - An unsigned integer, will be zero if the array contains - less than four bytes - - - - Convert the first eight bytes of the given array in little endian - ordering to an unsigned 64-bit integer - - An array eight bytes or longer - An unsigned 64-bit integer, will be zero if the array - contains less than eight bytes - - - - Convert four bytes in little endian ordering to a floating point - value - - Byte array containing a little ending floating - point value - Starting position of the floating point value in - the byte array - Single precision value - - - - Convert an integer to a byte array in little endian format - - The integer to convert - A four byte little endian array - - - - Convert an integer to a byte array in big endian format - - The integer to convert - A four byte big endian array - - - - Convert a 64-bit integer to a byte array in little endian format - - The value to convert - An 8 byte little endian array - - - - Convert a 64-bit unsigned integer to a byte array in little endian - format - - The value to convert - An 8 byte little endian array - - - - Convert a floating point value to four bytes in little endian - ordering - - A floating point value - A four byte array containing the value in little endian - ordering - - - - Converts an unsigned integer to a hexadecimal string - - An unsigned integer to convert to a string - A hexadecimal string 10 characters long - 0x7fffffff - - - - Convert a variable length UTF8 byte array to a string - - The UTF8 encoded byte array to convert - The decoded string - - - - Converts a byte array to a string containing hexadecimal characters - - The byte array to convert to a string - The name of the field to prepend to each - line of the string - A string containing hexadecimal characters on multiple - lines. Each line is prepended with the field name - - - - Converts a byte array to a string containing hexadecimal characters - - The byte array to convert to a string - Number of bytes in the array to parse - A string to prepend to each line of the hex - dump - A string containing hexadecimal characters on multiple - lines. Each line is prepended with the field name - - - - Convert a string to a UTF8 encoded byte array - - The string to convert - A null-terminated UTF8 byte array - - - - Converts a string containing hexadecimal characters to a byte array - - String containing hexadecimal characters - If true, gracefully handles null, empty and - uneven strings as well as stripping unconvertable characters - The converted byte array - - - - Returns true is c is a hexadecimal digit (A-F, a-f, 0-9) - - Character to test - true if hex digit, false if not - - - - Converts 1 or 2 character string into equivalant byte value - - 1 or 2 character string - byte - - - - Convert a float value to a byte given a minimum and maximum range - - Value to convert to a byte - Minimum value range - Maximum value range - A single byte representing the original float value - - - - Convert a byte to a float value given a minimum and maximum range - - Byte array to get the byte from - Position in the byte array the desired byte is at - Minimum value range - Maximum value range - A float value inclusively between lower and upper - - - - Convert a byte to a float value given a minimum and maximum range - - Byte to convert to a float value - Minimum value range - Maximum value range - A float value inclusively between lower and upper - - - - Attempts to parse a floating point value from a string, using an - EN-US number format - - String to parse - Resulting floating point number - True if the parse was successful, otherwise false - - - - Attempts to parse a floating point value from a string, using an - EN-US number format - - String to parse - Resulting floating point number - True if the parse was successful, otherwise false - - - - Tries to parse an unsigned 32-bit integer from a hexadecimal string - - String to parse - Resulting integer - True if the parse was successful, otherwise false - - - - Returns text specified in EnumInfo attribute of the enumerator - To add the text use [EnumInfo(Text = "Some nice text here")] before declaration - of enum values - - Enum value - Text representation of the enum - - - - Takes an AssetType and returns the string representation - - The source - The string version of the AssetType - - - - Translate a string name of an AssetType into the proper Type - - A string containing the AssetType name - The AssetType which matches the string name, or AssetType.Unknown if no match was found - - - - Takes a FolderType and returns the string representation - - The source - The string version of the FolderType - - - - Translate a string name of an FolderType into the proper Type - - A string containing the FolderType name - The FolderType which matches the string name, or FolderType. None if no match was found - - - - Convert an InventoryType to a string - - The to convert - A string representation of the source - - - - Convert a string into a valid InventoryType - - A string representation of the InventoryType to convert - A InventoryType object which matched the type - - - - Convert a SaleType to a string - - The to convert - A string representation of the source - - - - Convert a string into a valid SaleType - - A string representation of the SaleType to convert - A SaleType object which matched the type - - - - Converts a string used in LLSD to AttachmentPoint type - - String representation of AttachmentPoint to convert - AttachmentPoint enum - - - - Copy a byte array - - Byte array to copy - A copy of the given byte array - - - - Packs to 32-bit unsigned integers in to a 64-bit unsigned integer - - The left-hand (or X) value - The right-hand (or Y) value - A 64-bit integer containing the two 32-bit input values - - - - Unpacks two 32-bit unsigned integers from a 64-bit unsigned integer - - The 64-bit input integer - The left-hand (or X) output value - The right-hand (or Y) output value - - - - Convert an IP address object to an unsigned 32-bit integer - - IP address to convert - 32-bit unsigned integer holding the IP address bits - - - - Gets a unix timestamp for the current time - - An unsigned integer representing a unix timestamp for now - - - - Convert a UNIX timestamp to a native DateTime object - - An unsigned integer representing a UNIX - timestamp - A DateTime object containing the same time specified in - the given timestamp - - - - Convert a UNIX timestamp to a native DateTime object - - A signed integer representing a UNIX - timestamp - A DateTime object containing the same time specified in - the given timestamp - - - - Convert a native DateTime object to a UNIX timestamp - - A DateTime object you want to convert to a - timestamp - An unsigned integer representing a UNIX timestamp - - - - Swap two values - - Type of the values to swap - First value - Second value - - - - Try to parse an enumeration value from a string - - Enumeration type - String value to parse - Enumeration value on success - True if the parsing succeeded, otherwise false - - - - Swaps the high and low words in a byte. Converts aaaabbbb to bbbbaaaa - - Byte to swap the words in - Byte value with the words swapped - - - - Attempts to convert a string representation of a hostname or IP - address to a - - Hostname to convert to an IPAddress - Converted IP address object, or null if the conversion - failed - - - - A 128-bit Universally Unique Identifier, used throughout the Second - Life networking protocol - - - - The System.Guid object this struct wraps around - - - - Constructor that takes a string UUID representation - - A string representation of a UUID, case - insensitive and can either be hyphenated or non-hyphenated - UUID("11f8aa9c-b071-4242-836b-13b7abe0d489") - - - - Constructor that takes a System.Guid object - - A Guid object that contains the unique identifier - to be represented by this UUID - - - - Constructor that takes a byte array containing a UUID - - Byte array containing a 16 byte UUID - Beginning offset in the array - - - - Constructor that takes an unsigned 64-bit unsigned integer to - convert to a UUID - - 64-bit unsigned integer to convert to a UUID - - - - Copy constructor - - UUID to copy - - - - IComparable.CompareTo implementation - - - - - Assigns this UUID from 16 bytes out of a byte array - - Byte array containing the UUID to assign this UUID to - Starting position of the UUID in the byte array - - - - Returns a copy of the raw bytes for this UUID - - A 16 byte array containing this UUID - - - - Writes the raw bytes for this UUID to a byte array - - Destination byte array - Position in the destination array to start - writing. Must be at least 16 bytes before the end of the array - - - - Calculate an LLCRC (cyclic redundancy check) for this UUID - - The CRC checksum for this UUID - - - - Create a 64-bit integer representation from the second half of this UUID - - An integer created from the last eight bytes of this UUID - - - - Generate a UUID from a string - - A string representation of a UUID, case - insensitive and can either be hyphenated or non-hyphenated - UUID.Parse("11f8aa9c-b071-4242-836b-13b7abe0d489") - - - - Generate a UUID from a string - - A string representation of a UUID, case - insensitive and can either be hyphenated or non-hyphenated - Will contain the parsed UUID if successful, - otherwise null - True if the string was successfully parse, otherwise false - UUID.TryParse("11f8aa9c-b071-4242-836b-13b7abe0d489", result) - - - - Combine two UUIDs together by taking the MD5 hash of a byte array - containing both UUIDs - - First UUID to combine - Second UUID to combine - The UUID product of the combination - - - - - - - - - - Return a hash code for this UUID, used by .NET for hash tables - - An integer composed of all the UUID bytes XORed together - - - - Comparison function - - An object to compare to this UUID - True if the object is a UUID and both UUIDs are equal - - - - Comparison function - - UUID to compare to - True if the UUIDs are equal, otherwise false - - - - Get a hyphenated string representation of this UUID - - A string representation of this UUID, lowercase and - with hyphens - 11f8aa9c-b071-4242-836b-13b7abe0d489 - - - - Equals operator - - First UUID for comparison - Second UUID for comparison - True if the UUIDs are byte for byte equal, otherwise false - - - - Not equals operator - - First UUID for comparison - Second UUID for comparison - True if the UUIDs are not equal, otherwise true - - - - XOR operator - - First UUID - Second UUID - A UUID that is a XOR combination of the two input UUIDs - - - - String typecasting operator - - A UUID in string form. Case insensitive, - hyphenated or non-hyphenated - A UUID built from the string representation - - - An UUID with a value of all zeroes - - - A cache of UUID.Zero as a string to optimize a common path - - - - A two-dimensional vector with floating-point values - - - - X value - - - Y value - - - - Test if this vector is equal to another vector, within a given - tolerance range - - Vector to test against - The acceptable magnitude of difference - between the two vectors - True if the magnitude of difference between the two vectors - is less than the given tolerance, otherwise false - - - - Test if this vector is composed of all finite numbers - - - - - IComparable.CompareTo implementation - - - - - Builds a vector from a byte array - - Byte array containing two four-byte floats - Beginning position in the byte array - - - - Returns the raw bytes for this vector - - An eight-byte array containing X and Y - - - - Writes the raw bytes for this vector to a byte array - - Destination byte array - Position in the destination array to start - writing. Must be at least 8 bytes before the end of the array - - - - Parse a vector from a string - - A string representation of a 2D vector, enclosed - in arrow brackets and separated by commas - - - - Interpolates between two vectors using a cubic equation - - - - - Get a formatted string representation of the vector - - A string representation of the vector - - - - Get a string representation of the vector elements with up to three - decimal digits and separated by spaces only - - Raw string representation of the vector - - - A vector with a value of 0,0 - - - A vector with a value of 1,1 - - - A vector with a value of 1,0 - - - A vector with a value of 0,1 - - - - A three-dimensional vector with floating-point values - - - - X value - - - Y value - - - Z value - - - - Constructor, builds a vector from a byte array - - Byte array containing three four-byte floats - Beginning position in the byte array - - - - Test if this vector is equal to another vector, within a given - tolerance range - - Vector to test against - The acceptable magnitude of difference - between the two vectors - True if the magnitude of difference between the two vectors - is less than the given tolerance, otherwise false - - - - IComparable.CompareTo implementation - - - - - Test if this vector is composed of all finite numbers - - - - - Builds a vector from a byte array - - Byte array containing a 12 byte vector - Beginning position in the byte array - - - - Returns the raw bytes for this vector - - A 12 byte array containing X, Y, and Z - - - - Writes the raw bytes for this vector to a byte array - - Destination byte array - Position in the destination array to start - writing. Must be at least 12 bytes before the end of the array - - - - Parse a vector from a string - - A string representation of a 3D vector, enclosed - in arrow brackets and separated by commas - - - - Calculate the rotation between two vectors - - Normalized directional vector (such as 1,0,0 for forward facing) - Normalized target vector - - - - Interpolates between two vectors using a cubic equation - - - - - Get a formatted string representation of the vector - - A string representation of the vector - - - - Get a string representation of the vector elements with up to three - decimal digits and separated by spaces only - - Raw string representation of the vector - - - - Cross product between two vectors - - - - - Explicit casting for Vector3d > Vector3 - - - - - - A vector with a value of 0,0,0 - - - A vector with a value of 1,1,1 - - - A unit vector facing forward (X axis), value 1,0,0 - - - A unit vector facing left (Y axis), value 0,1,0 - - - A unit vector facing up (Z axis), value 0,0,1 - - - - A three-dimensional vector with doubleing-point values - - - - X value - - - Y value - - - Z value - - - - Constructor, builds a vector from a byte array - - Byte array containing three eight-byte doubles - Beginning position in the byte array - - - - Test if this vector is equal to another vector, within a given - tolerance range - - Vector to test against - The acceptable magnitude of difference - between the two vectors - True if the magnitude of difference between the two vectors - is less than the given tolerance, otherwise false - - - - IComparable.CompareTo implementation - - - - - Test if this vector is composed of all finite numbers - - - - - Builds a vector from a byte array - - Byte array containing a 24 byte vector - Beginning position in the byte array - - - - Returns the raw bytes for this vector - - A 24 byte array containing X, Y, and Z - - - - Writes the raw bytes for this vector to a byte array - - Destination byte array - Position in the destination array to start - writing. Must be at least 24 bytes before the end of the array - - - - Parse a vector from a string - - A string representation of a 3D vector, enclosed - in arrow brackets and separated by commas - - - - Interpolates between two vectors using a cubic equation - - - - - Get a formatted string representation of the vector - - A string representation of the vector - - - - Get a string representation of the vector elements with up to three - decimal digits and separated by spaces only - - Raw string representation of the vector - - - - Cross product between two vectors - - - - - Implicit casting for Vector3 > Vector3d - - - - - - A vector with a value of 0,0,0 - - - A vector with a value of 1,1,1 - - - A unit vector facing forward (X axis), value of 1,0,0 - - - A unit vector facing left (Y axis), value of 0,1,0 - - - A unit vector facing up (Z axis), value of 0,0,1 - - - X value - - - Y value - - - Z value - - - W value - - - - Constructor, builds a vector from a byte array - - Byte array containing four four-byte floats - Beginning position in the byte array - - - - Test if this vector is equal to another vector, within a given - tolerance range - - Vector to test against - The acceptable magnitude of difference - between the two vectors - True if the magnitude of difference between the two vectors - is less than the given tolerance, otherwise false - - - - IComparable.CompareTo implementation - - - - - Test if this vector is composed of all finite numbers - - - - - Builds a vector from a byte array - - Byte array containing a 16 byte vector - Beginning position in the byte array - - - - Returns the raw bytes for this vector - - A 16 byte array containing X, Y, Z, and W - - - - Writes the raw bytes for this vector to a byte array - - Destination byte array - Position in the destination array to start - writing. Must be at least 16 bytes before the end of the array - - - - Get a string representation of the vector elements with up to three - decimal digits and separated by spaces only - - Raw string representation of the vector - - - A vector with a value of 0,0,0,0 - - - A vector with a value of 1,1,1,1 - - - A vector with a value of 1,0,0,0 - - - A vector with a value of 0,1,0,0 - - - A vector with a value of 0,0,1,0 - - - A vector with a value of 0,0,0,1 - - - diff --git a/bin/OpenMetaverseTypes.dll b/bin/OpenMetaverseTypes.dll index aa1d2e6..3bb48cf 100755 Binary files a/bin/OpenMetaverseTypes.dll and b/bin/OpenMetaverseTypes.dll differ -- cgit v1.1 From 8b16131206818329e973faec3a9861fca37f0073 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 13 Jul 2017 20:21:18 +0100 Subject: add Util.GetTimeStamp() that returns the stamp in seconds; use it on ubOde; separed land collsions dispatch from the others... --- OpenSim/Framework/Util.cs | 9 +- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 104 +++++++++++++++------ OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs | 4 +- OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | 34 +++---- 4 files changed, 104 insertions(+), 47 deletions(-) diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index ed24452..a42dcc6 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -156,12 +156,14 @@ namespace OpenSim.Framework public static readonly int MAX_THREADPOOL_LEVEL = 3; public static double TimeStampClockPeriodMS; + public static double TimeStampClockPeriod; static Util() { LogThreadPool = 0; LogOverloads = true; - TimeStampClockPeriodMS = 1000.0D / (double)Stopwatch.Frequency; + TimeStampClockPeriod = 1.0D/ (double)Stopwatch.Frequency; + TimeStampClockPeriodMS = 1e3 * TimeStampClockPeriod; m_log.InfoFormat("[UTIL] TimeStamp clock with period of {0}ms", Math.Round(TimeStampClockPeriodMS,6,MidpointRounding.AwayFromZero)); } @@ -3016,6 +3018,11 @@ namespace OpenSim.Framework // returns a timestamp in ms as double // using the time resolution avaiable to StopWatch + public static double GetTimeStamp() + { + return (double)Stopwatch.GetTimestamp() * TimeStampClockPeriod; + } + public static double GetTimeStampMS() { return (double)Stopwatch.GetTimestamp() * TimeStampClockPeriodMS; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 2e16663..2384143 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -329,7 +329,8 @@ namespace OpenSim.Region.Framework.Scenes private byte[] m_TextureAnimation; private byte m_clickAction; private Color m_color = Color.Black; - private readonly List m_lastColliders = new List(); + private List m_lastColliders = new List(); + private bool m_lastLandCollide; private int m_linkNum; private int m_scriptAccessPin; @@ -2789,12 +2790,13 @@ namespace OpenSim.Region.Framework.Scenes { ColliderArgs colliderArgs = new ColliderArgs(); List colliding = new List(); + Scene parentScene = ParentGroup.Scene; foreach (uint localId in colliders) { if (localId == 0) continue; - SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId); + SceneObjectPart obj = parentScene.GetSceneObjectPart(localId); if (obj != null) { if (!dest.CollisionFilteredOut(obj.UUID, obj.Name)) @@ -2802,7 +2804,7 @@ namespace OpenSim.Region.Framework.Scenes } else { - ScenePresence av = ParentGroup.Scene.GetScenePresence(localId); + ScenePresence av = parentScene.GetScenePresence(localId); if (av != null && (!av.IsChildAgent)) { if (!dest.CollisionFilteredOut(av.UUID, av.Name)) @@ -2879,6 +2881,9 @@ namespace OpenSim.Region.Framework.Scenes return; // this a thread from physics ( heartbeat ) + bool thisHitLand = false; + bool startLand = false; + bool endedLand = false; CollisionEventUpdate a = (CollisionEventUpdate)e; Dictionary collissionswith = a.m_objCollisionList; @@ -2888,13 +2893,17 @@ namespace OpenSim.Region.Framework.Scenes if (collissionswith.Count == 0) { - if (m_lastColliders.Count == 0) + if (m_lastColliders.Count == 0 && !m_lastLandCollide) return; // nothing to do + endedLand = m_lastLandCollide; + m_lastLandCollide = false; + foreach (uint localID in m_lastColliders) { endedColliders.Add(localID); } + m_lastColliders.Clear(); } else @@ -2910,19 +2919,39 @@ namespace OpenSim.Region.Framework.Scenes foreach (uint id in collissionswith.Keys) { - thisHitColliders.Add(id); - if (!m_lastColliders.Contains(id)) + if(id == 0) { - startedColliders.Add(id); - - curcontact = collissionswith[id]; - if (Math.Abs(curcontact.RelativeSpeed) > 0.2) + thisHitLand = true; + if (!m_lastLandCollide) + { + startLand = true; + curcontact = collissionswith[id]; + if (Math.Abs(curcontact.RelativeSpeed) > 0.2) + { + soundinfo = new CollisionForSoundInfo(); + soundinfo.colliderID = id; + soundinfo.position = curcontact.Position; + soundinfo.relativeVel = curcontact.RelativeSpeed; + soundinfolist.Add(soundinfo); + } + } + } + else + { + thisHitColliders.Add(id); + if (!m_lastColliders.Contains(id)) { - soundinfo = new CollisionForSoundInfo(); - soundinfo.colliderID = id; - soundinfo.position = curcontact.Position; - soundinfo.relativeVel = curcontact.RelativeSpeed; - soundinfolist.Add(soundinfo); + startedColliders.Add(id); + + curcontact = collissionswith[id]; + if (Math.Abs(curcontact.RelativeSpeed) > 0.2) + { + soundinfo = new CollisionForSoundInfo(); + soundinfo.colliderID = id; + soundinfo.position = curcontact.Position; + soundinfo.relativeVel = curcontact.RelativeSpeed; + soundinfolist.Add(soundinfo); + } } } } @@ -2931,9 +2960,18 @@ namespace OpenSim.Region.Framework.Scenes { foreach (uint id in collissionswith.Keys) { - thisHitColliders.Add(id); - if (!m_lastColliders.Contains(id)) - startedColliders.Add(id); + if(id == 0) + { + thisHitLand = true; + if (!m_lastLandCollide) + startLand = true; + } + else + { + thisHitColliders.Add(id); + if (!m_lastColliders.Contains(id)) + startedColliders.Add(id); + } } } @@ -2952,22 +2990,32 @@ namespace OpenSim.Region.Framework.Scenes foreach (uint localID in endedColliders) m_lastColliders.Remove(localID); + if(m_lastLandCollide && !thisHitLand) + endedLand = true; + + m_lastLandCollide = thisHitLand; + // play sounds. if (soundinfolist.Count > 0) CollisionSounds.PartCollisionSound(this, soundinfolist); } + + EventManager eventmanager = ParentGroup.Scene.EventManager; - SendCollisionEvent(scriptEvents.collision_start, startedColliders, ParentGroup.Scene.EventManager.TriggerScriptCollidingStart); + SendCollisionEvent(scriptEvents.collision_start, startedColliders, eventmanager.TriggerScriptCollidingStart); if (!VolumeDetectActive) - SendCollisionEvent(scriptEvents.collision , m_lastColliders , ParentGroup.Scene.EventManager.TriggerScriptColliding); - SendCollisionEvent(scriptEvents.collision_end , endedColliders , ParentGroup.Scene.EventManager.TriggerScriptCollidingEnd); + SendCollisionEvent(scriptEvents.collision , m_lastColliders , eventmanager.TriggerScriptColliding); + SendCollisionEvent(scriptEvents.collision_end , endedColliders , eventmanager.TriggerScriptCollidingEnd); - if (startedColliders.Contains(0)) - SendLandCollisionEvent(scriptEvents.land_collision_start, ParentGroup.Scene.EventManager.TriggerScriptLandCollidingStart); - if (m_lastColliders.Contains(0)) - SendLandCollisionEvent(scriptEvents.land_collision, ParentGroup.Scene.EventManager.TriggerScriptLandColliding); - if (endedColliders.Contains(0)) - SendLandCollisionEvent(scriptEvents.land_collision_end, ParentGroup.Scene.EventManager.TriggerScriptLandCollidingEnd); + if (!VolumeDetectActive) + { + if (startLand) + SendLandCollisionEvent(scriptEvents.land_collision_start, eventmanager.TriggerScriptLandCollidingStart); + if (m_lastLandCollide) + SendLandCollisionEvent(scriptEvents.land_collision, eventmanager.TriggerScriptLandColliding); + if (endedLand) + SendLandCollisionEvent(scriptEvents.land_collision_end, eventmanager.TriggerScriptLandCollidingEnd); + } } // The Collision sounds code calls this @@ -2986,7 +3034,7 @@ namespace OpenSim.Region.Framework.Scenes volume = 0; int now = Util.EnvironmentTickCount(); - if(Util.EnvironmentTickCountSubtract(now,LastColSoundSentTime) <200) + if(Util.EnvironmentTickCountSubtract(now, LastColSoundSentTime) < 200) return; LastColSoundSentTime = now; diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs index 005caee..44e722c 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs @@ -1240,7 +1240,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde SentEmptyCollisionsEvent = true; // _parent_scene.RemoveCollisionEventReporting(this); } - else if(Body == IntPtr.Zero || d.BodyIsEnabled(Body)) + else if(Body == IntPtr.Zero || (d.BodyIsEnabled(Body) && m_bodydisablecontrol >= 0 )) { SentEmptyCollisionsEvent = false; CollisionEventsThisFrame.Clear(); @@ -3595,7 +3595,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde _zeroFlag = true; d.BodySetAutoDisableSteps(Body, 1); d.BodyEnable(Body); - m_bodydisablecontrol = -4; + m_bodydisablecontrol = -3; } if(m_bodydisablecontrol < 0) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs index 5758e0a..004ee7f 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs @@ -203,8 +203,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde private float metersInSpace = 25.6f; private float m_timeDilation = 1.0f; - private DateTime m_lastframe; - private DateTime m_lastMeshExpire; + private double m_lastframe; + private double m_lastMeshExpire; public float gravityx = 0f; public float gravityy = 0f; @@ -629,8 +629,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde staticPrimspaceOffRegion[i] = newspace; } - m_lastframe = DateTime.UtcNow; + m_lastframe = Util.GetTimeStamp(); m_lastMeshExpire = m_lastframe; + step_time = -1; } internal void waitForSpaceUnlock(IntPtr space) @@ -1625,6 +1626,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde } m_log.InfoFormat("[ubOde] {0} prim actors loaded",_prims.Count); } + m_lastframe = Util.GetTimeStamp() + 0.5; + step_time = -0.5f; } /// @@ -1638,13 +1641,12 @@ namespace OpenSim.Region.PhysicsModule.ubOde /// public override float Simulate(float reqTimeStep) { - DateTime now = DateTime.UtcNow; - TimeSpan timedif = now - m_lastframe; - float timeStep = (float)timedif.TotalSeconds; + double now = Util.GetTimeStamp(); + double timeStep = now - m_lastframe; m_lastframe = now; // acumulate time so we can reduce error - step_time += timeStep; + step_time += (float)timeStep; if (step_time < HalfOdeStep) return 0; @@ -1853,14 +1855,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde } } - timedif = now - m_lastMeshExpire; - - if (timedif.Seconds > 10) - { - mesher.ExpireReleaseMeshs(); - m_lastMeshExpire = now; - } - // information block for in debug breakpoint only /* int ntopactivegeoms = d.SpaceGetNumGeoms(ActiveSpace); @@ -1940,7 +1934,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde // if we lag too much skip frames m_timeDilation = 0.0f; step_time = 0; - m_lastframe = DateTime.UtcNow; // skip also the time lost + m_lastframe = Util.GetTimeStamp(); // skip also the time lost } else { @@ -1948,6 +1942,14 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (m_timeDilation > 1) m_timeDilation = 1; } + + if (m_timeDilation == 1 && now - m_lastMeshExpire > 30) + { + mesher.ExpireReleaseMeshs(); + m_lastMeshExpire = now; + } + + } return fps; -- cgit v1.1 From 4b7f79e2967e8e7ac7c70118b70a9b66cd16a2b1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 15 Jul 2017 04:06:34 +0100 Subject: fixes and changes on TreePopulatorModule. Please read OpenSimDefaults.ini [Trees] section. Does need more work, and some hardcode settings may not be the optimal still" --- .../World/TreePopulator/TreePopulatorModule.cs | 685 +++++++++++++-------- bin/OpenSimDefaults.ini | 20 +- 2 files changed, 426 insertions(+), 279 deletions(-) diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index da8c9a3..bdd875a 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs @@ -27,8 +27,13 @@ using System; using System.Collections.Generic; +using System.IO; using System.Reflection; using System.Timers; +using System.Threading; +using System.Xml; +using System.Xml.Serialization; + using OpenMetaverse; using log4net; using Mono.Addins; @@ -38,9 +43,7 @@ using OpenSim.Region.CoreModules.Framework.InterfaceCommander; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using System.Xml; -using System.Xml.Serialization; -using System.IO; +using Timer= System.Timers.Timer; namespace OpenSim.Region.OptionalModules.World.TreePopulator { @@ -48,7 +51,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator /// Version 2.02 - Still hacky /// [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "TreePopulatorModule")] - public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule + public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private readonly Commander m_commander = new Commander("tree"); @@ -82,20 +85,20 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator { Copse cp = (Copse)DeserializeObject(fileName); - this.m_name = cp.m_name; - this.m_frozen = cp.m_frozen; - this.m_tree_quantity = cp.m_tree_quantity; - this.m_treeline_high = cp.m_treeline_high; - this.m_treeline_low = cp.m_treeline_low; - this.m_range = cp.m_range; - this.m_tree_type = cp.m_tree_type; - this.m_seed_point = cp.m_seed_point; - this.m_initial_scale = cp.m_initial_scale; - this.m_maximum_scale = cp.m_maximum_scale; - this.m_initial_scale = cp.m_initial_scale; - this.m_rate = cp.m_rate; - this.m_planted = planted; - this.m_trees = new List(); + m_name = cp.m_name; + m_frozen = cp.m_frozen; + m_tree_quantity = cp.m_tree_quantity; + m_treeline_high = cp.m_treeline_high; + m_treeline_low = cp.m_treeline_low; + m_range = cp.m_range; + m_tree_type = cp.m_tree_type; + m_seed_point = cp.m_seed_point; + m_initial_scale = cp.m_initial_scale; + m_maximum_scale = cp.m_maximum_scale; + m_initial_scale = cp.m_initial_scale; + m_rate = cp.m_rate; + m_planted = planted; + m_trees = new List(); } public Copse(string copsedef) @@ -103,61 +106,63 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator char[] delimiterChars = {':', ';'}; string[] field = copsedef.Split(delimiterChars); - this.m_name = field[1].Trim(); - this.m_frozen = (copsedef[0] == 'F'); - this.m_tree_quantity = int.Parse(field[2]); - this.m_treeline_high = float.Parse(field[3], Culture.NumberFormatInfo); - this.m_treeline_low = float.Parse(field[4], Culture.NumberFormatInfo); - this.m_range = double.Parse(field[5], Culture.NumberFormatInfo); - this.m_tree_type = (Tree) Enum.Parse(typeof(Tree),field[6]); - this.m_seed_point = Vector3.Parse(field[7]); - this.m_initial_scale = Vector3.Parse(field[8]); - this.m_maximum_scale = Vector3.Parse(field[9]); - this.m_rate = Vector3.Parse(field[10]); - this.m_planted = true; - this.m_trees = new List(); + m_name = field[1].Trim(); + m_frozen = (copsedef[0] == 'F'); + m_tree_quantity = int.Parse(field[2]); + m_treeline_high = float.Parse(field[3], Culture.NumberFormatInfo); + m_treeline_low = float.Parse(field[4], Culture.NumberFormatInfo); + m_range = double.Parse(field[5], Culture.NumberFormatInfo); + m_tree_type = (Tree) Enum.Parse(typeof(Tree),field[6]); + m_seed_point = Vector3.Parse(field[7]); + m_initial_scale = Vector3.Parse(field[8]); + m_maximum_scale = Vector3.Parse(field[9]); + m_rate = Vector3.Parse(field[10]); + m_planted = true; + m_trees = new List(); } public Copse(string name, int quantity, float high, float low, double range, Vector3 point, Tree type, Vector3 scale, Vector3 max_scale, Vector3 rate, List trees) { - this.m_name = name; - this.m_frozen = false; - this.m_tree_quantity = quantity; - this.m_treeline_high = high; - this.m_treeline_low = low; - this.m_range = range; - this.m_tree_type = type; - this.m_seed_point = point; - this.m_initial_scale = scale; - this.m_maximum_scale = max_scale; - this.m_rate = rate; - this.m_planted = false; - this.m_trees = trees; + m_name = name; + m_frozen = false; + m_tree_quantity = quantity; + m_treeline_high = high; + m_treeline_low = low; + m_range = range; + m_tree_type = type; + m_seed_point = point; + m_initial_scale = scale; + m_maximum_scale = max_scale; + m_rate = rate; + m_planted = false; + m_trees = trees; } public override string ToString() { - string frozen = (this.m_frozen ? "F" : "A"); + string frozen = (m_frozen ? "F" : "A"); return string.Format("{0}TPM: {1}; {2}; {3:0.0}; {4:0.0}; {5:0.0}; {6}; {7:0.0}; {8:0.0}; {9:0.0}; {10:0.00};", frozen, - this.m_name, - this.m_tree_quantity, - this.m_treeline_high, - this.m_treeline_low, - this.m_range, - this.m_tree_type, - this.m_seed_point.ToString(), - this.m_initial_scale.ToString(), - this.m_maximum_scale.ToString(), - this.m_rate.ToString()); + m_name, + m_tree_quantity, + m_treeline_high, + m_treeline_low, + m_range, + m_tree_type, + m_seed_point.ToString(), + m_initial_scale.ToString(), + m_maximum_scale.ToString(), + m_rate.ToString()); } } - private List m_copse; - + private List m_copses = new List(); + private object mylock; private double m_update_ms = 1000.0; // msec between updates private bool m_active_trees = false; + private bool m_enabled = true; // original default + private bool m_allowGrow = true; // original default Timer CalculateTrees; @@ -174,51 +179,51 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator public void Initialise(IConfigSource config) { - - // ini file settings - try - { - m_active_trees = config.Configs["Trees"].GetBoolean("active_trees", m_active_trees); - } - catch (Exception) + IConfig moduleConfig = config.Configs["Trees"]; + if (moduleConfig != null) { - m_log.Debug("[TREES]: ini failure for active_trees - using default"); + m_enabled = moduleConfig.GetBoolean("enabled", m_enabled); + m_active_trees = moduleConfig.GetBoolean("active_trees", m_active_trees); + m_allowGrow = moduleConfig.GetBoolean("allowGrow", m_allowGrow); + m_update_ms = moduleConfig.GetDouble("update_rate", m_update_ms); } - try - { - m_update_ms = config.Configs["Trees"].GetDouble("update_rate", m_update_ms); - } - catch (Exception) - { - m_log.Debug("[TREES]: ini failure for update_rate - using default"); - } + if(!m_enabled) + return; + + m_copses = new List(); + mylock = new object(); InstallCommands(); - m_log.Debug("[TREES]: Initialised tree module"); + m_log.Debug("[TREES]: Initialised tree populator module"); } public void AddRegion(Scene scene) { + if(!m_enabled) + return; m_scene = scene; m_scene.RegisterModuleCommander(m_commander); m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; - + m_scene.EventManager.OnPrimsLoaded += EventManager_OnPrimsLoaded; } public void RemoveRegion(Scene scene) { - } + if(!m_enabled) + return; + if(m_active_trees && CalculateTrees != null) + { + CalculateTrees.Dispose(); + CalculateTrees = null; + } + m_scene.EventManager.OnPluginConsole -= EventManager_OnPluginConsole; + m_scene.EventManager.OnPrimsLoaded -= EventManager_OnPrimsLoaded; + } public void RegionLoaded(Scene scene) { - ReloadCopse(); - if (m_copse.Count > 0) - m_log.Info("[TREES]: Copse load complete"); - - if (m_active_trees) - activeizeTreeze(true); } public void Close() @@ -240,6 +245,16 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator //-------------------------------------------------------------- + private void EventManager_OnPrimsLoaded(Scene s) + { + ReloadCopse(); + if (m_copses.Count > 0) + m_log.Info("[TREES]: Copses loaded" ); + + if (m_active_trees) + activeizeTreeze(true); + } + #region ICommandableModule Members private void HandleTreeActive(Object[] args) @@ -267,22 +282,51 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator string copsename = ((string)args[0]).Trim(); Boolean freezeState = (Boolean) args[1]; - foreach (Copse cp in m_copse) + foreach (Copse cp in m_copses) { - if (cp.m_name == copsename && (!cp.m_frozen && freezeState || cp.m_frozen && !freezeState)) + if (cp.m_name == copsename) + continue; + + if(!cp.m_frozen && freezeState || cp.m_frozen && !freezeState) { cp.m_frozen = freezeState; + List losttrees = new List(); foreach (UUID tree in cp.m_trees) { - SceneObjectPart sop = ((SceneObjectGroup)m_scene.Entities[tree]).RootPart; - sop.Name = (freezeState ? sop.Name.Replace("ATPM", "FTPM") : sop.Name.Replace("FTPM", "ATPM")); - sop.ParentGroup.HasGroupChanged = true; + SceneObjectGroup sog = m_scene.GetSceneObjectGroup(tree); + if(sog != null && !sog.IsDeleted) + { + SceneObjectPart sop = sog.RootPart; + string name = sop.Name; + if(freezeState) + { + if(name.StartsWith("FTPM")) + continue; + if(!name.StartsWith("ATPM")) + continue; + sop.Name = sop.Name.Replace("ATPM", "FTPM"); + } + else + { + if(name.StartsWith("ATPM")) + continue; + if(!name.StartsWith("FTPM")) + continue; + sop.Name = sop.Name.Replace("FTPM", "ATPM"); + } + sop.ParentGroup.HasGroupChanged = true; + sog.ScheduleGroupForFullUpdate(); + } + else + losttrees.Add(tree); } + foreach (UUID tree in losttrees) + cp.m_trees.Remove(tree); m_log.InfoFormat("[TREES]: Activity for copse {0} is frozen {1}", copsename, freezeState); return; } - else if (cp.m_name == copsename && (cp.m_frozen && freezeState || !cp.m_frozen && !freezeState)) + else { m_log.InfoFormat("[TREES]: Copse {0} is already in the requested freeze state", copsename); return; @@ -297,17 +341,21 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator m_log.InfoFormat("[TREES]: Loading copse definition...."); - copse = new Copse(((string)args[0]), false); - foreach (Copse cp in m_copse) + lock(mylock) { - if (cp.m_name == copse.m_name) + copse = new Copse(((string)args[0]), false); { - m_log.InfoFormat("[TREES]: Copse: {0} is already defined - command failed", copse.m_name); - return; + foreach (Copse cp in m_copses) + { + if (cp.m_name == copse.m_name) + { + m_log.InfoFormat("[TREES]: Copse: {0} is already defined - command failed", copse.m_name); + return; + } + } } + m_copses.Add(copse); } - - m_copse.Add(copse); m_log.InfoFormat("[TREES]: Loaded copse: {0}", copse.ToString()); } @@ -318,20 +366,23 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator m_log.InfoFormat("[TREES]: New tree planting for copse {0}", copsename); UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; - foreach (Copse copse in m_copse) + lock(mylock) { - if (copse.m_name == copsename) + foreach (Copse copse in m_copses) { - if (!copse.m_planted) - { - // The first tree for a copse is created here - CreateTree(uuid, copse, copse.m_seed_point); - copse.m_planted = true; - return; - } - else + if (copse.m_name == copsename) { - m_log.InfoFormat("[TREES]: Copse {0} has already been planted", copsename); + if (!copse.m_planted) + { + // The first tree for a copse is created here + CreateTree(uuid, copse, copse.m_seed_point, true); + copse.m_planted = true; + return; + } + else + { + m_log.InfoFormat("[TREES]: Copse {0} has already been planted", copsename); + } } } } @@ -376,43 +427,46 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator string copsename = ((string)args[0]).Trim(); Copse copseIdentity = null; - foreach (Copse cp in m_copse) + lock(mylock) { - if (cp.m_name == copsename) + foreach (Copse cp in m_copses) { - copseIdentity = cp; + if (cp.m_name == copsename) + { + copseIdentity = cp; + } } - } - if (copseIdentity != null) - { - foreach (UUID tree in copseIdentity.m_trees) + if (copseIdentity != null) { - if (m_scene.Entities.ContainsKey(tree)) - { - SceneObjectPart selectedTree = ((SceneObjectGroup)m_scene.Entities[tree]).RootPart; - // Delete tree and alert clients (not silent) - m_scene.DeleteSceneObject(selectedTree.ParentGroup, false); - } - else + foreach (UUID tree in copseIdentity.m_trees) { - m_log.DebugFormat("[TREES]: Tree not in scene {0}", tree); + if (m_scene.Entities.ContainsKey(tree)) + { + SceneObjectPart selectedTree = ((SceneObjectGroup)m_scene.Entities[tree]).RootPart; + // Delete tree and alert clients (not silent) + m_scene.DeleteSceneObject(selectedTree.ParentGroup, false); + } + else + { + m_log.DebugFormat("[TREES]: Tree not in scene {0}", tree); + } } + copseIdentity.m_trees = null; + m_copses.Remove(copseIdentity); + m_log.InfoFormat("[TREES]: Copse {0} has been removed", copsename); + } + else + { + m_log.InfoFormat("[TREES]: Copse {0} was not found - command failed", copsename); } - copseIdentity.m_trees = new List(); - m_copse.Remove(copseIdentity); - m_log.InfoFormat("[TREES]: Copse {0} has been removed", copsename); - } - else - { - m_log.InfoFormat("[TREES]: Copse {0} was not found - command failed", copsename); } } private void HandleTreeStatistics(Object[] args) { m_log.InfoFormat("[TREES]: Activity State: {0}; Update Rate: {1}", m_active_trees, m_update_ms); - foreach (Copse cp in m_copse) + foreach (Copse cp in m_copses) { m_log.InfoFormat("[TREES]: Copse {0}; {1} trees; frozen {2}", cp.m_name, cp.m_trees.Count, cp.m_frozen); } @@ -442,7 +496,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator treeRateCommand.AddArgument("updateRate", "The required update rate (minimum 1000.0)", "Double"); Command treeReloadCommand = - new Command("reload", CommandIntentions.COMMAND_HAZARDOUS, HandleTreeReload, "Reload copse definitions from the in-scene trees"); + new Command("reload", CommandIntentions.COMMAND_HAZARDOUS, HandleTreeReload, "Reload copses from the in-scene trees"); Command treeRemoveCommand = new Command("remove", CommandIntentions.COMMAND_HAZARDOUS, HandleTreeRemove, "Remove a copse definition and all its in-scene trees"); @@ -499,34 +553,17 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator treeShape.Scale = scale; treeShape.State = (byte)treeType; - return m_scene.AddNewPrim(uuid, groupID, position, rotation, treeShape); - } - - #endregion - - #region IEntityCreator Members - - protected static readonly PCode[] creationCapabilities = new PCode[] { PCode.NewTree, PCode.Tree }; - public PCode[] CreationCapabilities { get { return creationCapabilities; } } - - public SceneObjectGroup CreateEntity( - UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape) - { - if (Array.IndexOf(creationCapabilities, (PCode)shape.PCode) < 0) - { - m_log.DebugFormat("[VEGETATION]: PCode {0} not handled by {1}", shape.PCode, Name); - return null; - } - - SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape); - SceneObjectPart rootPart = sceneObject.GetPart(sceneObject.UUID); + SceneObjectGroup sog = new SceneObjectGroup(uuid, position, rotation, treeShape); + SceneObjectPart rootPart = sog.RootPart; rootPart.AddFlag(PrimFlags.Phantom); - sceneObject.SetGroup(groupID, null); - m_scene.AddNewSceneObject(sceneObject, true); - sceneObject.InvalidateEffectivePerms(); - return sceneObject; + sog.SetGroup(groupID, null); + m_scene.AddNewSceneObject(sog, true, false); + sog.IsSelected = false; + rootPart.IsSelected = false; + sog.InvalidateEffectivePerms(); + return sog; } #endregion @@ -569,26 +606,27 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator private void ReloadCopse() { - m_copse = new List(); + m_copses = new List(); - EntityBase[] objs = m_scene.GetEntities(); - foreach (EntityBase obj in objs) + List grps = m_scene.GetSceneObjectGroups(); + foreach (SceneObjectGroup grp in grps) { - if (obj is SceneObjectGroup) - { - SceneObjectGroup grp = (SceneObjectGroup)obj; + if(grp.RootPart.Shape.PCode != (byte)PCode.NewTree && grp.RootPart.Shape.PCode != (byte)PCode.Tree) + continue; - if (grp.Name.Length > 5 && (grp.Name.Substring(0, 5) == "ATPM:" || grp.Name.Substring(0, 5) == "FTPM:")) + if (grp.Name.Length > 5 && (grp.Name.Substring(0, 5) == "ATPM:" || grp.Name.Substring(0, 5) == "FTPM:")) + { + // Create a new copse definition or add uuid to an existing definition + try { - // Create a new copse definition or add uuid to an existing definition - try - { - Boolean copsefound = false; - Copse copse = new Copse(grp.Name); + Boolean copsefound = false; + Copse grpcopse = new Copse(grp.Name); - foreach (Copse cp in m_copse) + lock(mylock) + { + foreach (Copse cp in m_copses) { - if (cp.m_name == copse.m_name) + if (cp.m_name == grpcopse.m_name) { copsefound = true; cp.m_trees.Add(grp.UUID); @@ -598,15 +636,15 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator if (!copsefound) { - m_log.InfoFormat("[TREES]: Found copse {0}", grp.Name); - m_copse.Add(copse); - copse.m_trees.Add(grp.UUID); + m_log.InfoFormat("[TREES]: adding copse {0}", grpcopse.m_name); + grpcopse.m_trees.Add(grp.UUID); + m_copses.Add(grpcopse); } } - catch - { - m_log.InfoFormat("[TREES]: Ill formed copse definition {0} - ignoring", grp.Name); - } + } + catch + { + m_log.InfoFormat("[TREES]: Ill formed copse definition {0} - ignoring", grp.Name); } } } @@ -617,8 +655,10 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator { if (activeYN) { - CalculateTrees = new Timer(m_update_ms); + if(CalculateTrees == null) + CalculateTrees = new Timer(m_update_ms); CalculateTrees.Elapsed += CalculateTrees_Elapsed; + CalculateTrees.AutoReset = false; CalculateTrees.Start(); } else @@ -629,154 +669,253 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator private void growTrees() { - foreach (Copse copse in m_copse) + if(!m_allowGrow) + return; + + foreach (Copse copse in m_copses) { - if (!copse.m_frozen) + if (copse.m_frozen) + continue; + + if(copse.m_trees.Count == 0) + continue; + + float maxscale = copse.m_maximum_scale.Z; + float ratescale = 1.0f; + List losttrees = new List(); + foreach (UUID tree in copse.m_trees) { - foreach (UUID tree in copse.m_trees) - { - if (m_scene.Entities.ContainsKey(tree)) - { - SceneObjectPart s_tree = ((SceneObjectGroup)m_scene.Entities[tree]).RootPart; + SceneObjectGroup sog = m_scene.GetSceneObjectGroup(tree); - if (s_tree.Scale.X < copse.m_maximum_scale.X && s_tree.Scale.Y < copse.m_maximum_scale.Y && s_tree.Scale.Z < copse.m_maximum_scale.Z) - { - s_tree.Scale += copse.m_rate; - s_tree.ParentGroup.HasGroupChanged = true; - s_tree.ScheduleFullUpdate(); - } - } - else + if (sog != null && !sog.IsDeleted) + { + SceneObjectPart s_tree = sog.RootPart; + if (s_tree.Scale.Z < maxscale) { - m_log.DebugFormat("[TREES]: Tree not in scene {0}", tree); + ratescale = (float)Util.RandomClass.NextDouble(); + if(ratescale < 0.2f) + ratescale = 0.2f; + s_tree.Scale += copse.m_rate * ratescale; + sog.HasGroupChanged = true; + s_tree.ScheduleFullUpdate(); } } + else + losttrees.Add(tree); } + + foreach (UUID tree in losttrees) + copse.m_trees.Remove(tree); } } private void seedTrees() { - foreach (Copse copse in m_copse) + foreach (Copse copse in m_copses) { - if (!copse.m_frozen) + if (copse.m_frozen) + continue; + + if(copse.m_trees.Count == 0) + return; + + bool low = copse.m_trees.Count < (int)(copse.m_tree_quantity * 0.8f); + + if (!low && Util.RandomClass.NextDouble() < 0.75) + return; + + int maxbirths = (int)(copse.m_tree_quantity) - copse.m_trees.Count; + if(maxbirths <= 1) + return; + + if(maxbirths > 20) + maxbirths = 20; + + float minscale = 0; + if(!low && m_allowGrow) + minscale = copse.m_maximum_scale.Z * 0.75f;; + + int i = 0; + UUID[] current = copse.m_trees.ToArray(); + while(--maxbirths > 0) { - foreach (UUID tree in copse.m_trees) + if(current.Length > 1) + i = Util.RandomClass.Next(current.Length -1); + + UUID tree = current[i]; + SceneObjectGroup sog = m_scene.GetSceneObjectGroup(tree); + + if (sog != null && !sog.IsDeleted) { - if (m_scene.Entities.ContainsKey(tree)) - { - SceneObjectPart s_tree = ((SceneObjectGroup)m_scene.Entities[tree]).RootPart; + SceneObjectPart s_tree = sog.RootPart; - if (copse.m_trees.Count < copse.m_tree_quantity) - { - // Tree has grown enough to seed if it has grown by at least 25% of seeded to full grown height - if (s_tree.Scale.Z > copse.m_initial_scale.Z + (copse.m_maximum_scale.Z - copse.m_initial_scale.Z) / 4.0) - { - if (Util.RandomClass.NextDouble() > 0.75) - { - SpawnChild(copse, s_tree); - } - } - } - } - else - { - m_log.DebugFormat("[TREES]: Tree not in scene {0}", tree); - } + // Tree has grown enough to seed if it has grown by at least 25% of seeded to full grown height + if (s_tree.Scale.Z > minscale) + SpawnChild(copse, s_tree, true); } - } + else if(copse.m_trees.Contains(tree)) + copse.m_trees.Remove(tree); + } } } private void killTrees() { - foreach (Copse copse in m_copse) + foreach (Copse copse in m_copses) { - if (!copse.m_frozen && copse.m_trees.Count >= copse.m_tree_quantity) - { - foreach (UUID tree in copse.m_trees) - { - double killLikelyhood = 0.0; + if (copse.m_frozen) + continue; - if (m_scene.Entities.ContainsKey(tree)) - { - SceneObjectPart selectedTree = ((SceneObjectGroup)m_scene.Entities[tree]).RootPart; - double selectedTreeScale = Math.Sqrt(Math.Pow(selectedTree.Scale.X, 2) + - Math.Pow(selectedTree.Scale.Y, 2) + - Math.Pow(selectedTree.Scale.Z, 2)); - - foreach (UUID picktree in copse.m_trees) - { - if (picktree != tree) - { - SceneObjectPart pickedTree = ((SceneObjectGroup)m_scene.Entities[picktree]).RootPart; - - double pickedTreeScale = Math.Sqrt(Math.Pow(pickedTree.Scale.X, 2) + - Math.Pow(pickedTree.Scale.Y, 2) + - Math.Pow(pickedTree.Scale.Z, 2)); + if (Util.RandomClass.NextDouble() < 0.25) + return; - double pickedTreeDistance = Vector3.Distance(pickedTree.AbsolutePosition, selectedTree.AbsolutePosition); + int maxbdeaths = copse.m_trees.Count - (int)(copse.m_tree_quantity * .98f) ; + if(maxbdeaths < 1) + return; - killLikelyhood += (selectedTreeScale / (pickedTreeScale * pickedTreeDistance)) * 0.1; - } - } + float odds; + float scale = 1.0f / copse.m_maximum_scale.Z; - if (Util.RandomClass.NextDouble() < killLikelyhood) - { - // Delete tree and alert clients (not silent) - m_scene.DeleteSceneObject(selectedTree.ParentGroup, false); - copse.m_trees.Remove(selectedTree.ParentGroup.UUID); - break; - } + int ntries = maxbdeaths * 4; + while(ntries-- > 0 ) + { + int next = 0; + if (copse.m_trees.Count > 1) + next = Util.RandomClass.Next(copse.m_trees.Count - 1); + UUID tree = copse.m_trees[next]; + SceneObjectGroup sog = m_scene.GetSceneObjectGroup(tree); + if (sog != null && !sog.IsDeleted) + { + if(m_allowGrow) + { + odds = sog.RootPart.Scale.Z * scale; + odds = odds * odds * odds; + odds *= (float)Util.RandomClass.NextDouble(); } else { - m_log.DebugFormat("[TREES]: Tree not in scene {0}", tree); + odds = (float)Util.RandomClass.NextDouble(); + odds = odds * odds * odds; } + + if(odds > 0.9f) + { + m_scene.DeleteSceneObject(sog, false); + if(maxbdeaths <= 0) + break; + } + } + else + { + copse.m_trees.Remove(tree); + if(copse.m_trees.Count - (int)(copse.m_tree_quantity * .98f) <= 0 ) + break; } } } } - private void SpawnChild(Copse copse, SceneObjectPart s_tree) + private void SpawnChild(Copse copse, SceneObjectPart s_tree, bool low) { Vector3 position = new Vector3(); - - double randX = ((Util.RandomClass.NextDouble() * 2.0) - 1.0) * (s_tree.Scale.X * 3); - double randY = ((Util.RandomClass.NextDouble() * 2.0) - 1.0) * (s_tree.Scale.X * 3); - + + float randX = copse.m_maximum_scale.X * 1.25f; + float randY = copse.m_maximum_scale.Y * 1.25f; + + float r = (float)Util.RandomClass.NextDouble(); + randX *= 2.0f * r - 1.0f; position.X = s_tree.AbsolutePosition.X + (float)randX; + + r = (float)Util.RandomClass.NextDouble(); + randY *= 2.0f * r - 1.0f; position.Y = s_tree.AbsolutePosition.Y + (float)randY; - if (position.X <= (m_scene.RegionInfo.RegionSizeX - 1) && position.X >= 0 && - position.Y <= (m_scene.RegionInfo.RegionSizeY - 1) && position.Y >= 0 && - Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range) - { - UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; + if (position.X > (m_scene.RegionInfo.RegionSizeX - 1) || position.X <= 0 || + position.Y > (m_scene.RegionInfo.RegionSizeY - 1) || position.Y <= 0) + return; - CreateTree(uuid, copse, position); - } + randX = position.X - copse.m_seed_point.X; + randX *= randX; + randY = position.Y - copse.m_seed_point.Y; + randY *= randY; + randX += randY; + + if(randX > copse.m_range * copse.m_range) + return; + + UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; + CreateTree(uuid, copse, position, low); } - private void CreateTree(UUID uuid, Copse copse, Vector3 position) + private void CreateTree(UUID uuid, Copse copse, Vector3 position, bool randomScale) { - position.Z = (float)m_scene.Heightmap[(int)position.X, (int)position.Y]; - if (position.Z >= copse.m_treeline_low && position.Z <= copse.m_treeline_high) - { - SceneObjectGroup tree = AddTree(uuid, UUID.Zero, copse.m_initial_scale, Quaternion.Identity, position, copse.m_tree_type, false); + if (position.Z < copse.m_treeline_low || position.Z > copse.m_treeline_high) + return; - tree.Name = copse.ToString(); - copse.m_trees.Add(tree.UUID); - tree.SendGroupFullUpdate(); + Vector3 scale = copse.m_initial_scale; + if(randomScale) + { + try + { + float t; + float r = (float)Util.RandomClass.NextDouble(); + r *= (float)Util.RandomClass.NextDouble(); + r *= (float)Util.RandomClass.NextDouble(); + + t = copse.m_maximum_scale.X / copse.m_initial_scale.X; + if(t < 1.0) + t = 1 / t; + t = t * r + 1.0f; + scale.X *= t; + + t = copse.m_maximum_scale.Y / copse.m_initial_scale.Y; + if(t < 1.0) + t = 1 / t; + t = t * r + 1.0f; + scale.Y *= t; + + t = copse.m_maximum_scale.Z / copse.m_initial_scale.Z; + if(t < 1.0) + t = 1 / t; + t = t * r + 1.0f; + scale.Z *= t; + } + catch + { + scale = copse.m_initial_scale; + } } + + SceneObjectGroup tree = AddTree(uuid, UUID.Zero, scale, Quaternion.Identity, position, copse.m_tree_type, false); + tree.Name = copse.ToString(); + copse.m_trees.Add(tree.UUID); + tree.RootPart.ScheduleFullUpdate(); } private void CalculateTrees_Elapsed(object sender, ElapsedEventArgs e) { - growTrees(); - seedTrees(); - killTrees(); + if(!m_scene.IsRunning) + return; + + if(Monitor.TryEnter(mylock)) + { + try + { + if(m_scene.LoginsEnabled ) + { + growTrees(); + seedTrees(); + killTrees(); + } + } + catch(Exception ex) + { + } + if(CalculateTrees != null) + CalculateTrees.Start(); + Monitor.Exit(mylock); + } } } } diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index fcbc1c5..a7b9213 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -1450,13 +1450,21 @@ [Trees] - ; Enable this to allow the tree module to manage your sim trees, including growing, reproducing and dying - ; default is false + ; enable the trees module. default true + enabled = true + + ; active_trees allows module to change its trees in time. + ; some will be deleted, others created and rest may grow + ; default is false. You can change it with console comand tree active true | false later active_trees = false - - ; Density of tree population - tree_density = 1000.0 - + ; the trees change execution time rate (in ms) + update_rate = 1000 + + ; allow the trees to grow. + ; DANGER + ; this option causes high network use on the order of + ; NumberOfTrees * NumberAvatars * 1000 / update_rate udp packets per second + allowGrow = false [VectorRender] ; the font to use for rendering text (default: Arial) -- cgit v1.1 From ad46a29d9e2d409dcdafe311f4a9151bcb33d7b9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 15 Jul 2017 20:59:16 +0100 Subject: Ooopsss --- .../World/TreePopulator/TreePopulatorModule.cs | 91 +++++++++++----------- 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index bdd875a..6e1f8bb 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs @@ -282,54 +282,57 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator string copsename = ((string)args[0]).Trim(); Boolean freezeState = (Boolean) args[1]; - foreach (Copse cp in m_copses) + lock(mylock) { - if (cp.m_name == copsename) - continue; - - if(!cp.m_frozen && freezeState || cp.m_frozen && !freezeState) + foreach (Copse cp in m_copses) { - cp.m_frozen = freezeState; - List losttrees = new List(); - foreach (UUID tree in cp.m_trees) + if (cp.m_name != copsename) + continue; + + if(!cp.m_frozen && freezeState || cp.m_frozen && !freezeState) { - SceneObjectGroup sog = m_scene.GetSceneObjectGroup(tree); - if(sog != null && !sog.IsDeleted) + cp.m_frozen = freezeState; + List losttrees = new List(); + foreach (UUID tree in cp.m_trees) { - SceneObjectPart sop = sog.RootPart; - string name = sop.Name; - if(freezeState) + SceneObjectGroup sog = m_scene.GetSceneObjectGroup(tree); + if(sog != null && !sog.IsDeleted) { - if(name.StartsWith("FTPM")) - continue; - if(!name.StartsWith("ATPM")) - continue; - sop.Name = sop.Name.Replace("ATPM", "FTPM"); + SceneObjectPart sop = sog.RootPart; + string name = sop.Name; + if(freezeState) + { + if(name.StartsWith("FTPM")) + continue; + if(!name.StartsWith("ATPM")) + continue; + sop.Name = sop.Name.Replace("ATPM", "FTPM"); + } + else + { + if(name.StartsWith("ATPM")) + continue; + if(!name.StartsWith("FTPM")) + continue; + sop.Name = sop.Name.Replace("FTPM", "ATPM"); + } + sop.ParentGroup.HasGroupChanged = true; + sog.ScheduleGroupForFullUpdate(); } else - { - if(name.StartsWith("ATPM")) - continue; - if(!name.StartsWith("FTPM")) - continue; - sop.Name = sop.Name.Replace("FTPM", "ATPM"); - } - sop.ParentGroup.HasGroupChanged = true; - sog.ScheduleGroupForFullUpdate(); + losttrees.Add(tree); } - else - losttrees.Add(tree); - } - foreach (UUID tree in losttrees) - cp.m_trees.Remove(tree); + foreach (UUID tree in losttrees) + cp.m_trees.Remove(tree); - m_log.InfoFormat("[TREES]: Activity for copse {0} is frozen {1}", copsename, freezeState); - return; - } - else - { - m_log.InfoFormat("[TREES]: Copse {0} is already in the requested freeze state", copsename); - return; + m_log.InfoFormat("[TREES]: Activity for copse {0} is frozen {1}", copsename, freezeState); + return; + } + else + { + m_log.InfoFormat("[TREES]: Copse {0} is already in the requested freeze state", copsename); + return; + } } } m_log.InfoFormat("[TREES]: Copse {0} was not found - command failed", copsename); @@ -382,6 +385,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator else { m_log.InfoFormat("[TREES]: Copse {0} has already been planted", copsename); + return; } } } @@ -465,10 +469,11 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator private void HandleTreeStatistics(Object[] args) { - m_log.InfoFormat("[TREES]: Activity State: {0}; Update Rate: {1}", m_active_trees, m_update_ms); + m_log.InfoFormat("[TREES]: region {0}:", m_scene.Name); + m_log.InfoFormat("[TREES]: Activity State: {0}; Update Rate: {1}", m_active_trees, m_update_ms); foreach (Copse cp in m_copses) { - m_log.InfoFormat("[TREES]: Copse {0}; {1} trees; frozen {2}", cp.m_name, cp.m_trees.Count, cp.m_frozen); + m_log.InfoFormat("[TREES]: Copse {0}; {1} trees; frozen {2}", cp.m_name, cp.m_trees.Count, cp.m_frozen); } } @@ -909,9 +914,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator killTrees(); } } - catch(Exception ex) - { - } + catch { } if(CalculateTrees != null) CalculateTrees.Start(); Monitor.Exit(mylock); -- cgit v1.1 From 101413ddd9e8a2a0d82f4e789ccd8f3bb1832666 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 16 Jul 2017 00:48:04 +0100 Subject: make KFM use scheduled terse updates. This may increase some rubber band, but is needed, and should work better with recent changes on sop terseupdates control --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 26 ++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index d81d8a2..60f5791 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -483,8 +483,8 @@ namespace OpenSim.Region.Framework.Scenes m_group.RootPart.Velocity = Vector3.Zero; m_group.RootPart.AngularVelocity = Vector3.Zero; - m_group.SendGroupRootTerseUpdate(); -// m_group.RootPart.ScheduleTerseUpdate(); +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); m_frames.Clear(); } @@ -496,8 +496,8 @@ namespace OpenSim.Region.Framework.Scenes m_group.RootPart.Velocity = Vector3.Zero; m_group.RootPart.AngularVelocity = Vector3.Zero; m_skippedUpdates = 1000; - m_group.SendGroupRootTerseUpdate(); -// m_group.RootPart.ScheduleTerseUpdate(); +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); } public void Suspend() @@ -644,8 +644,8 @@ namespace OpenSim.Region.Framework.Scenes m_group.RootPart.Velocity = Vector3.Zero; m_group.RootPart.AngularVelocity = Vector3.Zero; - m_group.SendGroupRootTerseUpdate(); - +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); m_frames.Clear(); } @@ -673,7 +673,8 @@ namespace OpenSim.Region.Framework.Scenes { m_group.RootPart.Velocity = Vector3.Zero; m_skippedUpdates = 1000; - m_group.SendGroupRootTerseUpdate(); +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); } return; } @@ -797,7 +798,8 @@ namespace OpenSim.Region.Framework.Scenes m_lastPosUpdate = m_nextPosition; m_lastRotationUpdate = m_group.GroupRotation; m_skippedUpdates = 0; - m_group.SendGroupRootTerseUpdate(); +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); } } @@ -842,8 +844,8 @@ namespace OpenSim.Region.Framework.Scenes { m_group.RootPart.Velocity = Vector3.Zero; m_skippedUpdates = 1000; - m_group.SendGroupRootTerseUpdate(); -// m_group.RootPart.ScheduleTerseUpdate(); +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); } } @@ -855,8 +857,8 @@ namespace OpenSim.Region.Framework.Scenes { m_group.RootPart.Velocity = Vector3.Zero; m_skippedUpdates = 1000; - m_group.SendGroupRootTerseUpdate(); -// m_group.RootPart.ScheduleTerseUpdate(); +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); if (m_running) { -- cgit v1.1 From 4ef64d4425479667c5f7a0b8239efe0215045235 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 16 Jul 2017 01:10:27 +0100 Subject: trigger moving_end also KFM stop and pause --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index 60f5791..110805c 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -486,6 +486,7 @@ namespace OpenSim.Region.Framework.Scenes // m_group.SendGroupRootTerseUpdate(); m_group.RootPart.ScheduleTerseUpdate(); m_frames.Clear(); + m_group.Scene.EventManager.TriggerMovingEndEvent(m_group.RootPart.LocalId); } public void Pause() @@ -498,6 +499,7 @@ namespace OpenSim.Region.Framework.Scenes m_skippedUpdates = 1000; // m_group.SendGroupRootTerseUpdate(); m_group.RootPart.ScheduleTerseUpdate(); + m_group.Scene.EventManager.TriggerMovingEndEvent(m_group.RootPart.LocalId); } public void Suspend() -- cgit v1.1 From cd15de628df3af968e3445a7cf22e741a23dc41f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 16 Jul 2017 01:31:37 +0100 Subject: don't start moving KFM things on region start that where stopped on last shutdown --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index 110805c..712ae01 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -326,8 +326,8 @@ namespace OpenSim.Region.Framework.Scenes newMotion.m_selected = true; } - newMotion.m_timerStopped = false; - newMotion.m_running = true; +// newMotion.m_timerStopped = false; +// newMotion.m_running = true; newMotion.m_isCrossing = false; newMotion.m_waitingCrossing = false; } -- cgit v1.1 From 04b97be71e6e33214491ee9f6fcf94d3978f45f7 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 16 Jul 2017 02:55:39 +0100 Subject: ode does not like null refs --- OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs index 44e722c..76ef88b 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs @@ -1043,7 +1043,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde d.BodySetLinearVel(Body, 0, 0, 0); // stop it d.BodySetAngularVel(Body, 0, 0, 0); } - d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); + if(prim_geom != IntPtr.Zero) + d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); disableBodySoft(); // stop collisions UnSubscribeEvents(); } -- cgit v1.1 From 9ae26fc5afc96c793186b79e80ac8f1a8a040d5b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 16 Jul 2017 05:19:27 +0100 Subject: store kfm on inventory. this may still be a bit confusing on rez --- .../InventoryAccess/InventoryAccessModule.cs | 13 +++++++----- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 11 ++++++----- OpenSim/Region/Framework/Scenes/Scene.cs | 3 ++- .../Region/Framework/Scenes/SceneObjectGroup.cs | 3 +++ .../Scenes/Serialization/SceneObjectSerializer.cs | 23 ++++++++++++++++++++++ 5 files changed, 42 insertions(+), 11 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 3f3245c..f1409bb 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -412,7 +412,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess Dictionary originalPositions = new Dictionary(); Dictionary originalRotations = new Dictionary(); // this possible is not needed if keyframes are saved - Dictionary originalKeyframes = new Dictionary(); +// Dictionary originalKeyframes = new Dictionary(); foreach (SceneObjectGroup objectGroup in objlist) { @@ -423,8 +423,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess objectGroup.RootPart.SetForce(Vector3.Zero); objectGroup.RootPart.SetAngularImpulse(Vector3.Zero, false); - originalKeyframes[objectGroup.UUID] = objectGroup.RootPart.KeyframeMotion; - objectGroup.RootPart.KeyframeMotion = null; +// originalKeyframes[objectGroup.UUID] = objectGroup.RootPart.KeyframeMotion; +// objectGroup.RootPart.KeyframeMotion = null; Vector3 inventoryStoredPosition = objectGroup.AbsolutePosition; originalPositions[objectGroup.UUID] = inventoryStoredPosition; @@ -476,7 +476,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess { objectGroup.AbsolutePosition = originalPositions[objectGroup.UUID]; objectGroup.RootPart.RotationOffset = originalRotations[objectGroup.UUID]; - objectGroup.RootPart.KeyframeMotion = originalKeyframes[objectGroup.UUID]; +// objectGroup.RootPart.KeyframeMotion = originalKeyframes[objectGroup.UUID]; if (objectGroup.RootPart.KeyframeMotion != null) objectGroup.RootPart.KeyframeMotion.Resume(); } @@ -989,11 +989,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess // one full update during the attachment // process causes some clients to fail to display the // attachment properly. - m_Scene.AddNewSceneObject(group, true, false); if (!attachment) { group.AbsolutePosition = pos + veclist[i]; + m_Scene.AddNewSceneObject(group, true, false); // Fire on_rez group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 1); @@ -1001,6 +1001,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess group.ScheduleGroupForFullUpdate(); } + else + m_Scene.AddNewSceneObject(group, true, false); + // m_log.DebugFormat( // "[INVENTORY ACCESS MODULE]: Rezzed {0} {1} {2} ownermask={3:X} nextownermask={4:X} groupmask={5:X} everyonemask={6:X} for {7}", diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index 712ae01..c64a0f8 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -755,7 +755,8 @@ namespace OpenSim.Region.Framework.Scenes } else { - bool lastSteps = remainingSteps < 4; +// bool lastSteps = remainingSteps < 4; + Vector3 currentPosition = m_group.AbsolutePosition; Vector3 motionThisFrame = (Vector3)m_currentFrame.Position - currentPosition; motionThisFrame /= (float)remainingSteps; @@ -776,13 +777,13 @@ namespace OpenSim.Region.Framework.Scenes } m_group.AbsolutePosition = m_nextPosition; - if(lastSteps) - m_group.RootPart.Velocity = Vector3.Zero; - else +// if(lastSteps) +// m_group.RootPart.Velocity = Vector3.Zero; +// else m_group.RootPart.Velocity = m_currentVel; if(!update && ( - lastSteps || +// lastSteps || m_skippedUpdates * tickDuration > 0.5 || Math.Abs(m_nextPosition.X - currentPosition.X) > 5f || Math.Abs(m_nextPosition.Y - currentPosition.Y) > 5f || diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 5e8487d..c06b3dd 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1651,10 +1651,11 @@ namespace OpenSim.Region.Framework.Scenes physicsMS2 = (float)(tmpMS2 - tmpMS); tmpMS = tmpMS2; +/* // Apply any pending avatar force input to the avatar's velocity if (Frame % m_update_entitymovement == 0) m_sceneGraph.UpdateScenePresenceMovement(); - +*/ if (Frame % (m_update_coarse_locations) == 0 && !m_sendingCoarseLocations) { m_sendingCoarseLocations = true; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 6f46a92..19449b1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -657,6 +657,9 @@ namespace OpenSim.Region.Framework.Scenes } } + if(!m_scene.IsRunning) + return sog; + if (root.KeyframeMotion != null) root.KeyframeMotion.StartCrossingCheck(); diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 3d867a4..cdf275b 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -112,9 +112,22 @@ namespace OpenSim.Region.Framework.Scenes.Serialization while (reader.ReadToNextSibling("Part")); } + reader.ReadEndElement(); + + if (reader.Name == "KeyframeMotion" && reader.NodeType == XmlNodeType.Element) + { + + string innerkeytxt = reader.ReadElementContentAsString(); + sceneObject.RootPart.KeyframeMotion = + KeyframeMotion.FromData(sceneObject, Convert.FromBase64String(innerkeytxt)); + } + else + sceneObject.RootPart.KeyframeMotion = null; + // Script state may, or may not, exist. Not having any, is NOT // ever a problem. sceneObject.LoadScriptState(reader); + sceneObject.InvalidateDeepEffectivePerms(); return sceneObject; } @@ -211,9 +224,19 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteEndElement(); // OtherParts + if (sceneObject.RootPart.KeyframeMotion != null) + { + Byte[] data = sceneObject.RootPart.KeyframeMotion.Serialize(); + + writer.WriteStartElement(String.Empty, "KeyframeMotion", String.Empty); + writer.WriteBase64(data, 0, data.Length); + writer.WriteEndElement(); + } + if (doScriptStates) sceneObject.SaveScriptedState(writer); + if (!noRootElement) writer.WriteEndElement(); // SceneObjectGroup -- cgit v1.1 From 2f9222bec315a6077e5c5156b5b1496a43e73320 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 16 Jul 2017 05:52:01 +0100 Subject: test scenes do not set IsRunning --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 19449b1..6f46a92 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -657,9 +657,6 @@ namespace OpenSim.Region.Framework.Scenes } } - if(!m_scene.IsRunning) - return sog; - if (root.KeyframeMotion != null) root.KeyframeMotion.StartCrossingCheck(); -- cgit v1.1 From 59de8fbba037fbab6e7b49170229d90d77fbb1bf Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 16 Jul 2017 06:10:24 +0100 Subject: fix placement of xml ReadEndElement() --- OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index cdf275b..82bbe6f 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -110,9 +110,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization } } while (reader.ReadToNextSibling("Part")); - } - reader.ReadEndElement(); + } if (reader.Name == "KeyframeMotion" && reader.NodeType == XmlNodeType.Element) { -- cgit v1.1 From f921ad005f85fd05fa0a88df0268336f60e22d8d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 17 Jul 2017 00:58:35 +0100 Subject: KFM: changes on update method implies other changes. Still not that good. Note: objects motion timing can't be done using timers. On windows at least, those can have jitter of tens of ms --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 38 +++++++++++++++-------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index c64a0f8..80ee510 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -295,6 +295,7 @@ namespace OpenSim.Region.Framework.Scenes lock (m_frames) { KeyframeTimer.Add(this); + m_lasttickMS = Util.GetTimeStampMS(); m_timerStopped = false; } } @@ -651,10 +652,11 @@ namespace OpenSim.Region.Framework.Scenes m_frames.Clear(); } - Vector3 m_lastPosUpdate; - Quaternion m_lastRotationUpdate; - Vector3 m_currentVel; - int m_skippedUpdates; + [NonSerialized()] Vector3 m_lastPosUpdate; + [NonSerialized()] Quaternion m_lastRotationUpdate; + [NonSerialized()] Vector3 m_currentVel; + [NonSerialized()] int m_skippedUpdates; + [NonSerialized()] double m_lasttickMS; private void DoOnTimer(double tickDuration) { @@ -699,6 +701,8 @@ namespace OpenSim.Region.Framework.Scenes return; } + double nowMS = Util.GetTimeStampMS(); + if (m_frames.Count == 0) { lock (m_frames) @@ -719,10 +723,16 @@ namespace OpenSim.Region.Framework.Scenes m_currentVel /= (m_currentFrame.TimeMS * 0.001f); m_currentFrame.TimeMS += (int)tickDuration; + m_lasttickMS = nowMS - 50f; update = true; } - m_currentFrame.TimeMS -= (int)tickDuration; + int elapsed = (int)(nowMS - m_lasttickMS); + if( elapsed > 3 * tickDuration) + elapsed = (int)tickDuration; + + m_currentFrame.TimeMS -= elapsed; + m_lasttickMS = nowMS; // Do the frame processing double remainingSteps = (double)m_currentFrame.TimeMS / tickDuration; @@ -770,10 +780,12 @@ namespace OpenSim.Region.Framework.Scenes Quaternion step = Quaternion.Slerp(m_currentFrame.StartRotation, (Quaternion)m_currentFrame.Rotation, completed); step.Normalize(); m_group.RootPart.RotationOffset = step; +/* if (Math.Abs(step.X - m_lastRotationUpdate.X) > 0.001f || Math.Abs(step.Y - m_lastRotationUpdate.Y) > 0.001f || Math.Abs(step.Z - m_lastRotationUpdate.Z) > 0.001f) update = true; +*/ } m_group.AbsolutePosition = m_nextPosition; @@ -781,7 +793,7 @@ namespace OpenSim.Region.Framework.Scenes // m_group.RootPart.Velocity = Vector3.Zero; // else m_group.RootPart.Velocity = m_currentVel; - +/* if(!update && ( // lastSteps || m_skippedUpdates * tickDuration > 0.5 || @@ -794,16 +806,16 @@ namespace OpenSim.Region.Framework.Scenes } else m_skippedUpdates++; - +*/ } - if(update) - { - m_lastPosUpdate = m_nextPosition; - m_lastRotationUpdate = m_group.GroupRotation; - m_skippedUpdates = 0; +// if(update) +// { +// m_lastPosUpdate = m_nextPosition; +// m_lastRotationUpdate = m_group.GroupRotation; +// m_skippedUpdates = 0; // m_group.SendGroupRootTerseUpdate(); m_group.RootPart.ScheduleTerseUpdate(); - } +// } } public Byte[] Serialize() -- cgit v1.1 From 4293b2cb3cb308b7fcce29ba5fba24d2c41c6ffa Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 18 Jul 2017 14:09:30 +0100 Subject: fix object updates throttle for scripts doing motion by direct change of position. Most this scripts are bad, making no use of viewers interpolators. Tanks lotek. --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 31 ++++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 2384143..f0a3fab 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -810,7 +810,7 @@ namespace OpenSim.Region.Framework.Scenes { // If this is a linkset, we don't want the physics engine mucking up our group position here. PhysicsActor actor = PhysActor; - if (ParentID == 0) + if (_parentID == 0) { if (actor != null) m_groupPosition = actor.Position; @@ -839,7 +839,7 @@ namespace OpenSim.Region.Framework.Scenes try { // Root prim actually goes at Position - if (ParentID == 0) + if (_parentID == 0) { actor.Position = value; } @@ -881,7 +881,7 @@ namespace OpenSim.Region.Framework.Scenes ParentGroup.InvalidBoundsRadius(); PhysicsActor actor = PhysActor; - if (ParentID != 0 && actor != null) + if (_parentID != 0 && actor != null) { actor.Position = GetWorldPosition(); actor.Orientation = GetWorldRotation(); @@ -941,7 +941,7 @@ namespace OpenSim.Region.Framework.Scenes PhysicsActor actor = PhysActor; // If this is a root of a linkset, the real rotation is what the physics engine thinks. // If not a root prim, the offset rotation is computed by SOG and is relative to the root. - if (ParentID == 0 && (Shape.PCode != 9 || Shape.State == 0) && actor != null) + if (_parentID == 0 && (Shape.PCode != 9 || Shape.State == 0) && actor != null) m_rotationOffset = actor.Orientation; return m_rotationOffset; @@ -958,7 +958,7 @@ namespace OpenSim.Region.Framework.Scenes try { // Root prim gets value directly - if (ParentID == 0) + if (_parentID == 0) { actor.Orientation = value; //m_log.Info("[PART]: RO1:" + actor.Orientation.ToString()); @@ -1259,6 +1259,9 @@ namespace OpenSim.Region.Framework.Scenes { get { + if (_parentID == 0) + return GroupPosition; + return GroupPosition + (m_offsetPosition * ParentGroup.RootPart.RotationOffset); } } @@ -2424,7 +2427,7 @@ namespace OpenSim.Region.Framework.Scenes PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; PhysActor.OnOutOfBounds += PhysicsOutOfBounds; - if (ParentID != 0 && ParentID != LocalId) + if (_parentID != 0 && _parentID != LocalId) { PhysicsActor parentPa = ParentGroup.RootPart.PhysActor; @@ -3075,7 +3078,7 @@ namespace OpenSim.Region.Framework.Scenes //ParentGroup.RootPart.m_groupPosition = newpos; } /* - if (pa != null && ParentID != 0 && ParentGroup != null) + if (pa != null && _parentID != 0 && ParentGroup != null) { // Special case where a child object is requesting property updates. // This happens when linksets are modified to use flexible links rather than @@ -3359,7 +3362,7 @@ namespace OpenSim.Region.Framework.Scenes return; // Update the "last" values - m_lastPosition = OffsetPosition; + m_lastPosition = AbsolutePosition; m_lastRotation = RotationOffset; m_lastVelocity = Velocity; m_lastAcceleration = Acceleration; @@ -3378,7 +3381,7 @@ namespace OpenSim.Region.Framework.Scenes return; // Update the "last" values - m_lastPosition = OffsetPosition; + m_lastPosition = AbsolutePosition; m_lastRotation = RotationOffset; m_lastVelocity = Velocity; m_lastAcceleration = Acceleration; @@ -3488,7 +3491,7 @@ namespace OpenSim.Region.Framework.Scenes vz < VELOCITY_TOLERANCE ) { - if(!OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) + if(!AbsolutePosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) break; if (vx < 1e-4 && @@ -3534,7 +3537,7 @@ namespace OpenSim.Region.Framework.Scenes { // Update the "last" values - m_lastPosition = OffsetPosition; + m_lastPosition = AbsolutePosition; m_lastRotation = RotationOffset; m_lastVelocity = curvel; m_lastAcceleration = curacc; @@ -3567,7 +3570,7 @@ namespace OpenSim.Region.Framework.Scenes ClearUpdateSchedule(); // Update the "last" values - m_lastPosition = OffsetPosition; + m_lastPosition = AbsolutePosition; m_lastRotation = RotationOffset; m_lastVelocity = Velocity; m_lastAcceleration = Acceleration; @@ -3588,7 +3591,7 @@ namespace OpenSim.Region.Framework.Scenes ClearUpdateSchedule(); // Update the "last" values - m_lastPosition = OffsetPosition; + m_lastPosition = AbsolutePosition; m_lastRotation = RotationOffset; m_lastVelocity = Velocity; m_lastAcceleration = Acceleration; @@ -4910,7 +4913,7 @@ namespace OpenSim.Region.Framework.Scenes pa.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; pa.OnOutOfBounds += PhysicsOutOfBounds; - if (ParentID != 0 && ParentID != LocalId) + if (_parentID != 0 && _parentID != LocalId) { PhysicsActor parentPa = ParentGroup.RootPart.PhysActor; -- cgit v1.1