From 182693628ca1b81c90f3f0296418437eda406bb5 Mon Sep 17 00:00:00 2001 From: Snowcrash Date: Mon, 19 Oct 2009 13:03:14 +0200 Subject: Fix for index error in llList2String --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e10e612..224b3cc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4660,7 +4660,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { index = src.Length + index; } - if (index >= src.Length) + if (index >= src.Length || index < 0) { return 0; } @@ -4685,7 +4685,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { index = src.Length + index; } - if (index >= src.Length) + if (index >= src.Length || index < 0) { return 0.0; } @@ -4712,7 +4712,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { index = src.Length + index; } - if (index >= src.Length) + if (index >= src.Length || index < 0) { return String.Empty; } @@ -4726,7 +4726,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { index = src.Length + index; } - if (index >= src.Length) + if (index >= src.Length || index < 0) { return ""; } @@ -4740,7 +4740,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { index = src.Length + index; } - if (index >= src.Length) + if (index >= src.Length || index < 0) { return new LSL_Vector(0, 0, 0); } @@ -4761,7 +4761,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { index = src.Length + index; } - if (index >= src.Length) + if (index >= src.Length || index < 0) { return new LSL_Rotation(0, 0, 0, 1); } -- cgit v1.1 From 26863c04a5f0fc1ed18d15b278d723468427911c Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 20 Oct 2009 14:02:11 +0100 Subject: Change "config save" to "config save ", which is mandatory. File name is enforced to NOT be OpenSim.ini --- OpenSim/Region/Application/OpenSim.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index ca6a2a3..143dd2a 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -628,8 +628,20 @@ namespace OpenSim break; case "save": - m_log.Info("Saving configuration file: " + Application.iniFilePath); - m_config.Save(Application.iniFilePath); + if (cmdparams.Length < 2) + { + m_log.Error("SYNTAX: " + n + " SAVE FILE"); + return; + } + + if (Application.iniFilePath == cmdparams[1]) + { + m_log.Error("FILE can not be "+Application.iniFilePath); + return; + } + + m_log.Info("Saving configuration file: " + cmdparams[1]); + m_config.Save(cmdparams[1]); break; } } -- cgit v1.1 From 9bc303d2937ab2f62e146f7fdde6444ed8cb50c9 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 20 Oct 2009 16:57:22 +0100 Subject: Add MainServer.GetHttpServer(port) method for using multiple listener ports in region modules --- OpenSim/Framework/MainServer.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs index b5f947e..21033b3 100644 --- a/OpenSim/Framework/MainServer.cs +++ b/OpenSim/Framework/MainServer.cs @@ -26,17 +26,34 @@ */ using OpenSim.Framework.Servers.HttpServer; +using System.Collections.Generic; namespace OpenSim.Framework { public class MainServer { private static BaseHttpServer instance; + private static Dictionary m_Servers = + new Dictionary(); public static BaseHttpServer Instance { get { return instance; } set { instance = value; } } + + public IHttpServer GetHttpServer(uint port) + { + if (port == Instance.Port) + return Instance; + + if (m_Servers.ContainsKey(port)) + return m_Servers[port]; + + m_Servers[port] = new BaseHttpServer(port); + m_Servers[port].Start(); + + return m_Servers[port]; + } } } -- cgit v1.1 From f568982e6928d54858d09aff6c474ff73abf6e88 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 20 Oct 2009 19:38:35 +0100 Subject: Cleanup and comment the region module loader. Add support for configuring a server port to use for modules in a generic way and also add support for disabling modules that don't support proper disabling. Add support for selective loading by class name (advanced users only) --- .../RegionModulesControllerPlugin.cs | 199 ++++++++++++++++++--- 1 file changed, 173 insertions(+), 26 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index f30a18b..13cb34c 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs @@ -30,24 +30,36 @@ using System.Collections.Generic; using System.Reflection; using log4net; using Mono.Addins; +using Nini.Config; using OpenSim; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; namespace OpenSim.ApplicationPlugins.RegionModulesController { - public class RegionModulesControllerPlugin : IRegionModulesController, IApplicationPlugin + public class RegionModulesControllerPlugin : IRegionModulesController, + IApplicationPlugin { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + // Logger + private static readonly ILog m_log = + LogManager.GetLogger( + MethodBase.GetCurrentMethod().DeclaringType); - private OpenSimBase m_openSim; // for getting the config + // Config access + private OpenSimBase m_openSim; + // Our name private string m_name; - private List m_nonSharedModules = new List(); - private List m_sharedModules = new List(); + // Internal lists to collect information about modules present + private List m_nonSharedModules = + new List(); + private List m_sharedModules = + new List(); - private List m_sharedInstances = new List(); + // List of shared module instances, for adding to Scenes + private List m_sharedInstances = + new List(); #region IApplicationPlugin implementation @@ -57,40 +69,111 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController m_openSim = openSim; openSim.ApplicationRegistry.RegisterInterface(this); + // Who we are string id = AddinManager.CurrentAddin.Id; - int pos = id.LastIndexOf("."); - if (pos == -1) m_name = id; - else m_name = id.Substring(pos + 1); - //ExtensionNodeList list = AddinManager.GetExtensionNodes("/OpenSim/RegionModules"); - // load all the (new) region-module classes - foreach (TypeExtensionNode node in AddinManager.GetExtensionNodes("/OpenSim/RegionModules")) + // Make friendly name + int pos = id.LastIndexOf("."); + if (pos == -1) + m_name = id; + else + m_name = id.Substring(pos + 1); + + // The [Modules] section in the ini file + IConfig modulesConfig = + openSim.ConfigSource.Source.Configs["Modules"]; + if (modulesConfig == null) + modulesConfig = openSim.ConfigSource.Source.AddConfig("Modules"); + + // Scan modules and load all that aren't disabled + foreach (TypeExtensionNode node in + AddinManager.GetExtensionNodes("/OpenSim/RegionModules")) { - // TODO why does node.Type.isSubclassOf(typeof(ISharedRegionModule)) not work? if (node.Type.GetInterface(typeof(ISharedRegionModule).ToString()) != null) { + // Get the config string + string moduleString = + modulesConfig.GetString(node.Id, String.Empty); + + // We have a selector + if (moduleString != String.Empty) + { + // Allow disabling modules even if they don't have + // support for it + if (moduleString == "disabled") + continue; + + // Split off port, if present + string[] moduleParts = moduleString.Split(new char[] {'/'}, 2); + // Format is [port/][class] + string className = moduleParts[0]; + if (moduleParts.Length > 1) + className = moduleParts[1]; + + // Match the class name if given + if (className != String.Empty && + node.Type.ToString() != className) + continue; + } + m_log.DebugFormat("[REGIONMODULES]: Found shared region module {0}, class {1}", node.Id, node.Type); - m_sharedModules.Add(node.Type); + m_sharedModules.Add(node); } else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null) { m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type); - m_nonSharedModules.Add(node.Type); + m_nonSharedModules.Add(node); } else m_log.DebugFormat("[REGIONMODULES]: Found unknown type of module {0}, class {1}", node.Id, node.Type); } - // now we've got all the region-module classes loaded, create one instance of every ISharedRegionModule, - // initialize and postinitialize it. This Initialise we are in is called before LoadRegion.PostInitialise - // is called (which loads the regions), so we don't have any regions in the server yet. - foreach (Type type in m_sharedModules) + // Load and init the module. We try a constructor with a port + // if a port was given, fall back to one without if there is + // no port or the more specific constructor fails. + // This will be removed, so that any module capable of using a port + // must provide a constructor with a port in the future. + // For now, we do this so migration is easy. + // + foreach (TypeExtensionNode node in m_sharedModules) { - ISharedRegionModule module = (ISharedRegionModule)Activator.CreateInstance(type); + Object[] ctorArgs = new Object[] {0}; + + // Read the config again + string moduleString = + modulesConfig.GetString(node.Id, String.Empty); + + // Get the port number, if there is one + if (moduleString != String.Empty) + { + // Get the port number from the string + string[] moduleParts = moduleString.Split(new char[] {'/'}, + 2); + if (moduleParts.Length > 1) + ctorArgs[0] = Convert.ToUInt32(moduleParts[0]); + } + + // Try loading and initilaizing the module, using the + // port if appropriate + ISharedRegionModule module = null; + + try + { + module = (ISharedRegionModule)Activator.CreateInstance( + node.Type, ctorArgs); + } + catch + { + module = (ISharedRegionModule)Activator.CreateInstance( + node.Type); + } + + // OK, we're up and running m_sharedInstances.Add(module); module.Initialise(openSim.ConfigSource.Source); } + // Immediately run PostInitialise on shared modules foreach (ISharedRegionModule module in m_sharedInstances) { module.PostInitialise(); @@ -105,6 +188,8 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController #region IPlugin implementation + // We don't do that here + // public void Initialise () { throw new System.NotImplementedException(); @@ -114,9 +199,11 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController #region IDisposable implementation + // Cleanup + // public void Dispose () { - // we expect that all regions have been removed already + // We expect that all regions have been removed already while (m_sharedInstances.Count > 0) { m_sharedInstances[0].Close(); @@ -147,6 +234,11 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController #region IRegionModulesController implementation + // The root of all evil. + // This is where we handle adding the modules to scenes when they + // load. This means that here we deal with replaceable interfaces, + // nonshared modules, etc. + // public void AddRegionToModules (Scene scene) { Dictionary deferredSharedModules = @@ -154,12 +246,26 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController Dictionary deferredNonSharedModules = new Dictionary(); + // We need this to see if a module has already been loaded and + // has defined a replaceable interface. It's a generic call, + // so this can't be used directly. It will be used later Type s = scene.GetType(); MethodInfo mi = s.GetMethod("RequestModuleInterface"); - List sharedlist = new List(); + // This will hold the shared modules we actually load + List sharedlist = + new List(); + + // Iterate over the shared modules that have been loaded + // Add them to the new Scene foreach (ISharedRegionModule module in m_sharedInstances) { + // Here is where we check if a replaceable interface + // is defined. If it is, the module is checked against + // the interfaces already defined. If the interface is + // defined, we simply skip the module. Else, if the module + // defines a replaceable interface, we add it to the deferred + // list. Type replaceableInterface = module.ReplaceableInterface; if (replaceableInterface != null) { @@ -185,11 +291,41 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController sharedlist.Add(module); } + IConfig modulesConfig = + m_openSim.ConfigSource.Source.Configs["Modules"]; + + // Scan for, and load, nonshared modules List list = new List(); - foreach (Type type in m_nonSharedModules) + foreach (TypeExtensionNode node in m_nonSharedModules) { - INonSharedRegionModule module = (INonSharedRegionModule)Activator.CreateInstance(type); + Object[] ctorArgs = new Object[] {0}; + + // Read the config + string moduleString = + modulesConfig.GetString(node.Id, String.Empty); + + // Get the port number, if there is one + if (moduleString != String.Empty) + { + // Get the port number from the string + string[] moduleParts = moduleString.Split(new char[] {'/'}, + 2); + if (moduleParts.Length > 1) + ctorArgs[0] = Convert.ToUInt32(moduleParts[0]); + } + // Actually load it + INonSharedRegionModule module = null; + try + { + module = (INonSharedRegionModule)Activator.CreateInstance(node.Type, ctorArgs); + } + catch + { + module = (INonSharedRegionModule)Activator.CreateInstance(node.Type); + } + + // Check for replaceable interfaces Type replaceableInterface = module.ReplaceableInterface; if (replaceableInterface != null) { @@ -209,11 +345,16 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController m_log.DebugFormat("[REGIONMODULE]: Adding scene {0} to non-shared module {1}", scene.RegionInfo.RegionName, module.Name); + // Initialise the module module.Initialise(m_openSim.ConfigSource.Source); list.Add(module); } + // Now add the modules that we found to the scene. If a module + // wishes to override a replaceable interface, it needs to + // register it in Initialise, so that the deferred module + // won't load. foreach (INonSharedRegionModule module in list) { module.AddRegion(scene); @@ -223,9 +364,9 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController // Now all modules without a replaceable base interface are loaded // Replaceable modules have either been skipped, or omitted. // Now scan the deferred modules here - foreach (ISharedRegionModule module in deferredSharedModules.Values) { + // Determine if the interface has been replaced Type replaceableInterface = module.ReplaceableInterface; MethodInfo mii = mi.MakeGenericMethod(replaceableInterface); @@ -238,15 +379,20 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController m_log.DebugFormat("[REGIONMODULE]: Adding scene {0} to shared module {1} (deferred)", scene.RegionInfo.RegionName, module.Name); + // Not replaced, load the module module.AddRegion(scene); scene.AddRegionModule(module.Name, module); sharedlist.Add(module); } - List deferredlist = new List(); + // Same thing for nonshared modules, load them unless overridden + List deferredlist = + new List(); + foreach (INonSharedRegionModule module in deferredNonSharedModules.Values) { + // Check interface override Type replaceableInterface = module.ReplaceableInterface; if (replaceableInterface != null) { @@ -268,6 +414,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController deferredlist.Add(module); } + // Finally, load valid deferred modules foreach (INonSharedRegionModule module in deferredlist) { module.AddRegion(scene); -- cgit v1.1 From 2a886fd76c9df972fa3096d19b37047f7eda672f Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 21 Oct 2009 02:19:45 +0100 Subject: Really make module port selection work. Implement port setting in LLProxyLoginModule. --- .../RegionModulesControllerPlugin.cs | 33 +++++++++++++++++++--- OpenSim/Client/Linden/LLProxyLoginModule.cs | 12 ++++++-- OpenSim/Framework/MainServer.cs | 4 ++- 3 files changed, 42 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index 13cb34c..ddc37ed 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs @@ -93,7 +93,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController { // Get the config string string moduleString = - modulesConfig.GetString(node.Id, String.Empty); + modulesConfig.GetString("Setup_" + node.Id, String.Empty); // We have a selector if (moduleString != String.Empty) @@ -121,6 +121,31 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController } else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null) { + // Get the config string + string moduleString = + modulesConfig.GetString("Setup_" + node.Id, String.Empty); + + // We have a selector + if (moduleString != String.Empty) + { + // Allow disabling modules even if they don't have + // support for it + if (moduleString == "disabled") + continue; + + // Split off port, if present + string[] moduleParts = moduleString.Split(new char[] {'/'}, 2); + // Format is [port/][class] + string className = moduleParts[0]; + if (moduleParts.Length > 1) + className = moduleParts[1]; + + // Match the class name if given + if (className != String.Empty && + node.Type.ToString() != className) + continue; + } + m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type); m_nonSharedModules.Add(node); } @@ -137,11 +162,11 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController // foreach (TypeExtensionNode node in m_sharedModules) { - Object[] ctorArgs = new Object[] {0}; + Object[] ctorArgs = new Object[] {(uint)0}; // Read the config again string moduleString = - modulesConfig.GetString(node.Id, String.Empty); + modulesConfig.GetString("Setup_" + node.Id, String.Empty); // Get the port number, if there is one if (moduleString != String.Empty) @@ -302,7 +327,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController // Read the config string moduleString = - modulesConfig.GetString(node.Id, String.Empty); + modulesConfig.GetString("Setup_" + node.Id, String.Empty); // Get the port number, if there is one if (moduleString != String.Empty) diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs index 2da774f..ad67c44 100644 --- a/OpenSim/Client/Linden/LLProxyLoginModule.cs +++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs @@ -50,8 +50,16 @@ namespace OpenSim.Client.Linden /// public class LLProxyLoginModule : ISharedRegionModule { + private uint m_port = 0; + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + public LLProxyLoginModule(uint port) + { + m_log.DebugFormat("[CLIENT]: LLProxyLoginModule port {0}", port); + m_port = port; + } + protected bool RegionLoginsEnabled { get @@ -148,8 +156,8 @@ namespace OpenSim.Client.Linden protected void AddHttpHandlers() { //we will add our handlers to the first scene we received, as all scenes share a http server. But will this ever change? - MainServer.Instance.AddXmlRPCHandler("expect_user", ExpectUser, false); - MainServer.Instance.AddXmlRPCHandler("logoff_user", LogOffUser, false); + MainServer.GetHttpServer(m_port).AddXmlRPCHandler("expect_user", ExpectUser, false); + MainServer.GetHttpServer(m_port).AddXmlRPCHandler("logoff_user", LogOffUser, false); } protected void AddScene(Scene scene) diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs index 21033b3..7da4893 100644 --- a/OpenSim/Framework/MainServer.cs +++ b/OpenSim/Framework/MainServer.cs @@ -42,8 +42,10 @@ namespace OpenSim.Framework set { instance = value; } } - public IHttpServer GetHttpServer(uint port) + public static IHttpServer GetHttpServer(uint port) { + if (port == 0) + return Instance; if (port == Instance.Port) return Instance; -- cgit v1.1 From 93b24b5207356cfbc37d766a01f5f2e3f3a34bae Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 21 Oct 2009 03:44:40 +0100 Subject: Fix web map retrieval for regions configured via .ini --- OpenSim/Framework/RegionInfo.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index a7315f5..c566544 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -978,11 +978,12 @@ namespace OpenSim.Framework public void SaveLastMapUUID(UUID mapUUID) { - if (null == configMember) return; - lastMapUUID = mapUUID; lastMapRefresh = Util.UnixTimeSinceEpoch().ToString(); + if (configMember == null) + return; + configMember.forceSetConfigurationOption("lastmap_uuid", mapUUID.ToString()); configMember.forceSetConfigurationOption("lastmap_refresh", lastMapRefresh); } -- cgit v1.1 From 8dd15fd5a590e059038d6438a305264cad3918b7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 21 Oct 2009 18:45:37 +0100 Subject: Patch by mcortez: Remove lock from scene presence updating in groups module --- .../OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index b209199..b2544fa 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -1244,18 +1244,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Updating scene title for {0} with title: {1}", AgentID, Title); ScenePresence presence = null; - lock (m_sceneList) + + foreach (Scene scene in m_sceneList) { - foreach (Scene scene in m_sceneList) + presence = scene.GetScenePresence(AgentID); + if (presence != null) { - presence = scene.GetScenePresence(AgentID); - if (presence != null) - { - presence.Grouptitle = Title; + presence.Grouptitle = Title; - // FixMe: Ter suggests a "Schedule" method that I can't find. - presence.SendFullUpdateToAllClients(); - } + // FixMe: Ter suggests a "Schedule" method that I can't find. + presence.SendFullUpdateToAllClients(); } } } -- cgit v1.1 From d88bb83136752fadb1c2e3b64641acc2b3b6dd30 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 21 Oct 2009 20:47:24 +0100 Subject: Fix llParticleSystem to accept LSL variables and LSL constants in place of the named constants for the rule selector. Information provided by Snowcrash --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 224b3cc..9a70890 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5844,7 +5844,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api for (int i = 0; i < rules.Length; i += 2) { - switch ((int)rules.Data[i]) + switch (Convert.ToInt32(rules.Data[i])) { case (int)ScriptBaseClass.PSYS_PART_FLAGS: prules.PartDataFlags = (Primitive.ParticleSystem.ParticleDataFlags)(uint)rules.GetLSLIntegerItem(i + 1); -- cgit v1.1