Compare commits

...

23 Commits

Author SHA1 Message Date
Justin Clark-Casey (justincc)
633d4f3e6e Correct DeleteScriptsOnRestart to DeleteScriptsOnStartup in comments in OpenSim.ini.example 2011-10-07 21:45:43 +01:00
Justin Clark-Casey (justincc)
43bbdbe760 flip rc2 to release 2011-10-07 21:29:51 +01:00
Justin Clark-Casey (justincc)
494e5867a3 Comment out [SCENE PRESENCE] SendAppearanceToAllOtherAgents: log message
As per earlier discussions with dslake
2011-10-07 21:15:37 +01:00
Justin Clark-Casey (justincc)
270f0d5ae3 Clarify explanation of DeleteScriptsOnStartup switch in [XEngine]. 2011-10-07 20:29:12 +01:00
Dan Lake
d079ee9ef1 Add execute permission to runprebuild2010.bat 2011-10-07 20:28:41 +01:00
Justin Clark-Casey (justincc)
cd46bf6fad Remove OpenSim.Region.Examples.SimpleModule
This module is more than 2 years old and at least some of the 'example' code it gives is now misleading.
Even the logs say it say some bits were broken where it was put in!
2011-10-07 20:28:23 +01:00
Justin Clark-Casey (justincc)
bb419044ef Add ability to pass in the permissions option (perm) to save oar via RemoteAdmin
Applies patch in http://opensimulator.org/mantis/view.php?id=5686
Thanks Michelle Argus!
2011-10-07 20:28:13 +01:00
Justin Clark-Casey (justincc)
549fdc8b11 copy config information on allow/disallow individual os functions into OpenSim.ini.example
I this is generally useful rather than a 'default' setting
2011-10-07 20:27:57 +01:00
Justin Clark-Casey (justincc)
550d1fea96 remove unused postgresql dll 2011-10-07 20:27:49 +01:00
Justin Clark-Casey (justincc)
94f49e859b Add en_US culture setting to the async delete to inventory thread, to avoid any issues with float serialization with machines set to non en_US locales.
Doing this to see if addresses inventory object deserialization problems in http://opensimulator.org/mantis/view.php?id=5708, though if it does I'm really surprised not to have seen it before now.
Really need to go through and systematically set the culture for every timer and change all BeginInvoke calls to FireAndForget instead.
But don't want to do something like that this close to a release.
2011-10-07 20:27:31 +01:00
Snoopy Pfeffer
c2586b0ea9 Fix for rezzing and derezzing HUDs (see Mantis #5406). From now on updates are only sent to affected clients. 2011-10-07 20:27:18 +01:00
Justin Clark-Casey (justincc)
2905288545 Remove the unimplented "clear assets" command.
This was a bizarre relic of a bygone age that had no implementations.
If you're using and want to clear the flotsam asset cache then please use the existing "fcache clear" command
2011-10-07 20:26:15 +01:00
Justin Clark-Casey (justincc)
353170589b Improve locking when access queue in EventQueueGetModule 2011-10-07 20:25:13 +01:00
Justin Clark-Casey (justincc)
ee78c4d2a8 Clarify explanation of the "DeleteScriptsOnStartup" config switch and add this to OpenSim.ini.example since it's very useful if you're not updating OpenSim from source.
On reflection, "DeleteScriptsOnStartup" isn't a great name since it suggests real script deletion rather than compiled versions.
2011-10-07 20:22:16 +01:00
Justin Clark-Casey (justincc)
084df4b7ef make distribution creating code to copy FlotsamCache.ini.example to FlotsamCache.ini 2011-10-07 20:22:08 +01:00
Justin Clark-Casey (justincc)
53ffc7ff8c bump version up to 0.7.2-rc2 2011-09-23 22:47:23 +01:00
Justin Clark-Casey (justincc)
d8d048cfa1 oops, reinstate the try catching of async_call_method but leave the logging disabled 2011-09-23 22:45:02 +01:00
Justin Clark-Casey (justincc)
a4e1d29e3c Catch but don't print out exceptions that make it to the top of the async_call_method stack.
This is not helpful for release code.
2011-09-23 22:40:34 +01:00
Justin Clark-Casey (justincc)
8c4dd6b330 Merge branch 'master' into 0.7.2-post-fixes 2011-09-23 22:36:20 +01:00
Justin Clark-Casey (justincc)
f1612997a6 Use a copy of the inventory items list to register users in the thread started by GetFolderContent(), to protect ourselves against callers modifying lists
Hopefully this addresses http://opensimulator.org/mantis/view.php?id=5681
2011-09-09 01:00:41 +01:00
Justin Clark-Casey (justincc)
c574c80011 Fix unit tests from RegionSettings commit 2011-09-09 00:47:52 +01:00
Justin Clark-Casey (justincc)
9f76bc4fff Save the default terrain texture UUIDs for a new region instead of leaving them as UUID.Zero.
Leaving them at UUID.Zero meant that when a viewer 2 logged into a region that had been freshly created, it received UUID.Zero for these textures, and hence display the land as plain white.
On a simulator restart, the problem would go away since when the database adapators loaded the new region settings, RegionSettings itself has code to use default textures instead of UUID.Zero.
This commit resolves the problem by saving the default texture UUIDs instead of Zero.
However, we currently have to do this in a roundabout way by resaving once the RegionSettings have been created by the database for the first time.  This needless complexity should be addressed.
This change will also have the effect of replacing any existing UUID.Zero terrain textures with the default ones.
However, this shouldn't have any effect since the UUID.Zeros were already being replaced in memory with those same UUIDs.
2011-09-09 00:29:59 +01:00
Justin Clark-Casey (justincc)
79f3de6ba8 change version to rc1 2011-09-08 22:16:42 +01:00
22 changed files with 97 additions and 1717 deletions

View File

@@ -8,6 +8,7 @@
<target name="distbin">
<copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/>
<copy file="bin/config-include/StandaloneCommon.ini.example" tofile="bin/config-include/StandaloneCommon.ini"/>
<copy file="bin/config-include/FlotsamCache.ini.example" tofile="bin/config-include/FlotsamCache.ini"/>
<delete dir="${distbindir}"/>
<copy todir="${distbindir}">
<fileset>

View File

@@ -2340,10 +2340,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// <description>UUID of the region</description></item>
/// <item><term>region_name</term>
/// <description>region name</description></item>
/// <item><term>profile</term>
/// <item><term>profile</term>
/// <description>profile url</description></item>
/// <item><term>noassets</term>
/// <description>true if no assets should be saved</description></item>
/// <item><term>perm</term>
/// <description>C and/or T</description></item>
/// </list>
///
/// <code>region_uuid</code> takes precedence over
@@ -2418,6 +2420,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
options["noassets"] = (string)requestData["noassets"] ;
}
if (requestData.Contains("perm"))
{
options["checkPermissions"] = (string)requestData["perm"];
}
IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
if (archiver != null)

View File

@@ -30,7 +30,7 @@ namespace OpenSim
public class VersionInfo
{
private const string VERSION_NUMBER = "0.7.2";
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
private const Flavour VERSION_FLAVOUR = Flavour.Release;
public enum Flavour
{

View File

@@ -1556,9 +1556,9 @@ namespace OpenSim.Framework
}
catch (Exception e)
{
m_log.ErrorFormat(
"[UTIL]: Continuing after async_call_method thread terminated with exception {0}{1}",
e.Message, e.StackTrace);
// m_log.ErrorFormat(
// "[UTIL]: Continuing after async_call_method thread terminated with exception {0}{1}",
// e.Message, e.StackTrace);
}
};

View File

@@ -210,10 +210,6 @@ namespace OpenSim
/// </summary>
private void RegisterConsoleCommands()
{
m_console.Commands.AddCommand("region", false, "clear assets",
"clear assets",
"Clear the asset cache", HandleClearAssets);
m_console.Commands.AddCommand("region", false, "force update",
"force update",
"Force the update of all objects on clients",
@@ -509,11 +505,6 @@ namespace OpenSim
}
}
private void HandleClearAssets(string module, string[] args)
{
MainConsole.Instance.Output("Not implemented.");
}
/// <summary>
/// Force resending of all updates to all clients in active region(s)
/// </summary>

View File

@@ -179,9 +179,10 @@ namespace OpenSim.Region.ClientStack.Linden
{
Queue<OSD> queue = GetQueue(avatarID);
if (queue != null)
queue.Enqueue(ev);
lock (queue)
queue.Enqueue(ev);
}
catch(NullReferenceException e)
catch (NullReferenceException e)
{
m_log.Error("[EVENTQUEUE] Caught exception: " + e);
return false;
@@ -338,12 +339,8 @@ namespace OpenSim.Region.ClientStack.Linden
Queue<OSD> queue = GetQueue(agentID);
if (queue != null)
lock (queue)
{
if (queue.Count > 0)
return true;
else
return false;
}
return queue.Count > 0;
return false;
}
@@ -358,8 +355,6 @@ namespace OpenSim.Region.ClientStack.Linden
element = queue.Dequeue(); // 15s timeout
}
int thisID = 0;
lock (m_ids)
thisID = m_ids[pAgentId];
@@ -431,7 +426,10 @@ namespace OpenSim.Region.ClientStack.Linden
// }
Queue<OSD> queue = TryGetQueue(agentID);
OSD element = queue.Dequeue(); // 15s timeout
OSD element;
lock (queue)
element = queue.Dequeue(); // 15s timeout
Hashtable responsedata = new Hashtable();
@@ -470,10 +468,14 @@ namespace OpenSim.Region.ClientStack.Linden
else
{
array.Add(element);
while (queue.Count > 0)
lock (queue)
{
array.Add(queue.Dequeue());
thisID++;
while (queue.Count > 0)
{
array.Add(queue.Dequeue());
thisID++;
}
}
}
@@ -520,6 +522,7 @@ namespace OpenSim.Region.ClientStack.Linden
AvatarID = m_QueueUUIDAvatarMapping[capUUID];
}
}
if (AvatarID != UUID.Zero)
{
return ProcessQueue(request, AvatarID, m_scene.CapsModule.GetCapsForUser(AvatarID));

View File

@@ -1,130 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Examples.SimpleModule
{
public class ComplexObject : SceneObjectGroup
{
private readonly Quaternion m_rotationDirection;
protected override bool InSceneBackup
{
get
{
return false;
}
}
private class RotatingWheel : SceneObjectPart
{
private readonly Quaternion m_rotationDirection;
public RotatingWheel()
{
}
public RotatingWheel(
UUID ownerID, Vector3 groupPosition, Vector3 offsetPosition, Quaternion rotationDirection)
: base(ownerID, PrimitiveBaseShape.Default, groupPosition, Quaternion.Identity, offsetPosition)
{
m_rotationDirection = rotationDirection;
Flags |= PrimFlags.Touch;
}
public override void UpdateMovement()
{
UpdateRotation(RotationOffset * m_rotationDirection);
}
}
public override void UpdateMovement()
{
UpdateGroupRotationR(GroupRotation * m_rotationDirection);
base.UpdateMovement();
}
public ComplexObject()
{
}
public ComplexObject(Scene scene, ulong regionHandle, UUID ownerID, uint localID, Vector3 pos)
: base(ownerID, pos, PrimitiveBaseShape.Default)
{
m_rotationDirection = new Quaternion(0.05f, 0.1f, 0.15f);
AddPart(
new RotatingWheel(ownerID, pos, new Vector3(0, 0, 0.75f),
new Quaternion(0.05f, 0, 0)));
AddPart(
new RotatingWheel(ownerID, pos, new Vector3(0, 0, -0.75f),
new Quaternion(-0.05f, 0, 0)));
AddPart(
new RotatingWheel(ownerID, pos, new Vector3(0, 0.75f, 0),
new Quaternion(0.5f, 0, 0.05f)));
AddPart(
new RotatingWheel(ownerID, pos, new Vector3(0, -0.75f, 0),
new Quaternion(-0.5f, 0, -0.05f)));
AddPart(
new RotatingWheel(ownerID, pos, new Vector3(0.75f, 0, 0),
new Quaternion(0, 0.5f, 0.05f)));
AddPart(
new RotatingWheel(ownerID, pos, new Vector3(-0.75f, 0, 0),
new Quaternion(0, -0.5f, -0.05f)));
RootPart.Flags |= PrimFlags.Touch;
}
public override void OnGrabPart(SceneObjectPart part, Vector3 offsetPos, IClientAPI remoteClient)
{
m_parts.Remove(part.UUID);
remoteClient.SendKillObject(m_regionHandle, part.LocalId);
remoteClient.AddMoney(1);
remoteClient.SendChatMessage("Poof!", 1, AbsolutePosition, "Party Party", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
}
public override void OnGrabGroup(Vector3 offsetPos, IClientAPI remoteClient)
{
if (m_parts.Count == 1)
{
m_parts.Remove(m_rootPart.UUID);
m_scene.DeleteSceneObject(this, false);
remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalId);
remoteClient.AddMoney(50);
remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
}
}
}
}

View File

@@ -1,68 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Diagnostics;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Examples.SimpleModule
{
public class CpuCounterObject : SceneObjectGroup
{
protected override bool InSceneBackup
{
get
{
return false;
}
}
private PerformanceCounter m_counter;
public CpuCounterObject(UUID ownerID, Vector3 pos)
: base(ownerID, pos, PrimitiveBaseShape.Default)
{
String objectName = "Processor";
String counterName = "% Processor Time";
String instanceName = "_Total";
m_counter = new PerformanceCounter(objectName, counterName, instanceName);
}
public override void UpdateMovement()
{
float cpu = m_counter.NextValue()/40f;
Vector3 size = new Vector3(cpu, cpu, cpu);
RootPart.Resize(size);
base.UpdateMovement();
}
}
}

View File

@@ -1,51 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System.IO;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Examples.SimpleModule
{
public class FileSystemObject : SceneObjectGroup
{
public FileSystemObject(FileInfo fileInfo, Vector3 pos)
: base(UUID.Zero, pos, PrimitiveBaseShape.Default)
{
Text = fileInfo.Name;
}
protected override bool InSceneBackup
{
get
{
return false;
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,62 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System.Reflection;
using System.Runtime.InteropServices;
// General information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenSim.Region.Examples.SimpleModule")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("http://opensimulator.org")]
[assembly: AssemblyProduct("OpenSim.Region.Examples.SimpleModule")]
[assembly: AssemblyCopyright("Copyright (c) 2008")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f0caca77-7818-4a43-9200-0a8548009a05")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.0")]

View File

@@ -1,9 +0,0 @@
!!!IMPORTANT NOTE!!!
This code snippet provided as an example of coding functional content with region modules.
As of 13/3 2008 this module actually renders all regions within the instance unusable if enabled by dragging the dll from ./bin to global /bin.
So, use at own peril and in dedicated instance.
Peace.

View File

@@ -1,147 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System.Collections.Generic;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Examples.SimpleModule
{
/// <summary>
/// Example region module.
/// </summary>
/// <remarks>
/// This is an old and unmaintained region module which uses the old style module interface. It is not loaded into
/// OpenSim by default. If you want to try enabling it, look in the bin folder of this project.
/// Please see the README.txt in this project on the filesystem for some more information.
/// Nonetheless, it may contain some useful example code so has been left here for now.
///
/// You can see bare bones examples of the more modern region module system in OpenSim/Region/OptionalModules/Example
/// </remarks>
public class RegionModule : IRegionModule
{
#region IRegionModule Members
private Scene m_scene;
public void Initialise(Scene scene, IConfigSource source)
{
m_scene = scene;
}
public void PostInitialise()
{
// RegionInfo regionInfo = m_scene.RegionInfo;
// Vector3 pos = new Vector3(110, 129, 27);
//AddCpuCounter(regionInfo, pos);
// AddComplexObjects(regionInfo, pos);
AddAvatars();
// AddFileSystemObjects();
}
// private void AddFileSystemObjects()
// {
// DirectoryInfo dirInfo = new DirectoryInfo(".");
// float x = 0;
// float z = 0;
// foreach (FileInfo fileInfo in dirInfo.GetFiles())
// {
// Vector3 filePos = new Vector3(100 + x, 129, 27 + z);
// x = x + 2;
// if (x > 50)
// {
// x = 0;
// z = z + 2;
// }
// FileSystemObject fileObject = new FileSystemObject(m_scene, fileInfo, filePos);
// m_scene.AddNewSceneObject(fileObject, true);
// }
// }
private void AddAvatars()
{
for (int i = 0; i < 1; i++)
{
MyNpcCharacter m_character = new MyNpcCharacter(m_scene);
m_scene.AddNewClient(m_character, PresenceType.Npc);
m_scene.AgentCrossing(m_character.AgentId, Vector3.Zero, false);
}
m_scene.ForEachScenePresence(delegate(ScenePresence sp)
{
if (!sp.IsChildAgent)
sp.AbsolutePosition =
new Vector3((float)Util.RandomClass.Next(100, 200), (float)Util.RandomClass.Next(30, 200), 2);
});
}
// private void AddComplexObjects(RegionInfo regionInfo, Vector3 pos)
// {
// int objs = 3;
// for (int i = 0; i < (objs*objs*objs); i++)
// {
// Vector3 posOffset = new Vector3((i % objs) * 4, ((i % (objs*objs)) / (objs)) * 4, (i / (objs*objs)) * 4);
// ComplexObject complexObject =
// new ComplexObject(m_scene, regionInfo.RegionHandle, UUID.Zero, pos + posOffset);
// m_scene.AddNewSceneObject(complexObject, true);
// }
// }
// private void AddCpuCounter(RegionInfo regionInfo, Vector3 pos)
// {
// SceneObjectGroup sceneObject =
// new CpuCounterObject(m_scene, regionInfo.RegionHandle, UUID.Zero, pos + new Vector3(1f, 1f, 1f));
// m_scene.AddNewSceneObject(sceneObject, true);
// }
public void Close()
{
m_scene = null;
}
public string Name
{
get { return GetType().AssemblyQualifiedName; }
}
public bool IsSharedModule
{
get { return false; }
}
#endregion
}
}

View File

@@ -112,6 +112,11 @@ namespace OpenSim.Region.Framework.Scenes
private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e)
{
m_log.Debug("[ASYNC DELETER]: Starting send to inventory loop");
// We must set appearance parameters in the en_US culture in order to avoid issues where values are saved
// in a culture where decimal points are commas and then reloaded in a culture which just treats them as
// number seperators.
Culture.SetCurrentCulture();
while (InventoryDeQueueAndDelete())
{

View File

@@ -1174,7 +1174,11 @@ namespace OpenSim.Region.Framework.Scenes
{
part.UpdateFlag = 0;
if (part == m_rootPart)
avatar.ControllingClient.SendKillObject(m_regionHandle, part.LocalId);
{
if (!IsAttachment || (AttachedAvatar == avatar.ControllingClient.AgentId) ||
(AttachmentPoint < 31) || (AttachmentPoint > 38))
avatar.ControllingClient.SendKillObject(m_regionHandle, part.LocalId);
}
}
});
}

View File

@@ -2999,6 +2999,10 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup.IsDeleted)
return;
if (ParentGroup.IsAttachment && (ParentGroup.AttachedAvatar != remoteClient.AgentId) &&
(ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38))
return;
clientFlags &= ~(uint) PrimFlags.CreateSelected;
if (remoteClient.AgentId == _ownerID)
@@ -4786,7 +4790,8 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup.IsDeleted)
return;
if (ParentGroup.IsAttachment && ParentGroup.RootPart != this)
if (ParentGroup.IsAttachment && ((ParentGroup.RootPart != this) ||
((ParentGroup.AttachedAvatar != remoteClient.AgentId) && (ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38))))
return;
// Causes this thread to dig into the Client Thread Data.

View File

@@ -2635,7 +2635,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary>
public void SendAppearanceToAllOtherAgents()
{
m_log.DebugFormat("[SCENE PRESENCE] SendAppearanceToAllOtherAgents: {0} ({1})", Name, UUID);
//m_log.DebugFormat("[SCENE PRESENCE] SendAppearanceToAllOtherAgents: {0} ({1})", Name, UUID);
// only send update from root agents to other clients; children are only "listening posts"
if (IsChildAgent)
{

Binary file not shown.

View File

@@ -218,6 +218,13 @@
;; server to send mail through.
; emailmodule = DefaultEmailModule
;# {DeleteScriptsOnStartup} {} {Delete previously compiled script DLLs on startup?} (true false) true
;; Controls whether previously compiled scripts DLLs are deleted on sim restart. If you set this to false
;; then startup will be considerably faster since scripts won't need to be recompiled. However, then it becomes your responsibility to delete the
;; compiled scripts if you're recompiling OpenSim from source code and internal interfaces used
;; by scripts have changed.
; DeleteScriptsOnStartup = true
[SMTP]
;; The SMTP server enabled the email module to send email to external
@@ -588,6 +595,25 @@
;; VeryHigh, Severe
OSFunctionThreatLevel = VeryLow
; OS Functions enable/disable
; For each function, you can add one line, as shown
; The default for all functions allows them if below threat level
; true allows the use of the function unconditionally
; Allow_osSetRegionWaterHeight = true
; false disables the function completely
; Allow_osSetRegionWaterHeight = false
; Comma separated list of UUIDS allows the function for that list of UUIDS
; Allow_osSetRegionWaterHeight = 888760cb-a3cf-43ac-8ea4-8732fd3ee2bb
; You can also use script creators as the uuid
; Creators_osSetRegionWaterHeight = <uuid>, ...
; If both Allow_ and Creators_ are given, effective permissions
; are the union of the two.
;; Time a script can spend in an event handler before it is interrupted
; EventLimit = 30

View File

@@ -1124,6 +1124,25 @@
; Threat level to allow, one of None, VeryLow, Low, Moderate, High, VeryHigh, Severe
OSFunctionThreatLevel = VeryLow
; OS Functions enable/disable
; For each function, you can add one line, as shown
; The default for all functions allows them if below threat level
; true allows the use of the function unconditionally
; Allow_osSetRegionWaterHeight = true
; false disables the function completely
; Allow_osSetRegionWaterHeight = false
; Comma separated list of UUIDS allows the function for that list of UUIDS
; Allow_osSetRegionWaterHeight = 888760cb-a3cf-43ac-8ea4-8732fd3ee2bb
; You can also use script creators as the uuid
; Creators_osSetRegionWaterHeight = <uuid>, ...
; If both Allow_ and Creators_ are given, effective permissions
; are the union of the two.
; Interval (s) between background save of script states
SaveInterval = 120
@@ -1151,25 +1170,6 @@
SensorMaxRange = 96.0
SensorMaxResults = 16
; OS Functions enable/disable
; For each function, you can add one line, as shown
; The default for all functions allows them if below threat level
; true allows the use of the function unconditionally
; Allow_osSetRegionWaterHeight = true
; false disables the function completely
; Allow_osSetRegionWaterHeight = false
; Comma separated list of UUIDS allows the function for that list of UUIDS
; Allow_osSetRegionWaterHeight = 888760cb-a3cf-43ac-8ea4-8732fd3ee2bb
; You can also use script creators as the uuid
; Creators_osSetRegionWaterHeight = <uuid>, ...
; If both Allow_ and Creators_ are given, effective permissions
; are the union of the two.
; Allow for llCreateLink and llBreakLink to work without asking for permission
; only enable this in a trusted environment otherwise you may be subject to hijacking
; AutomaticLinkPermission = false
@@ -1182,11 +1182,11 @@
;; Path to script assemblies
; ScriptEnginesPath = "ScriptEngines"
; Whether to delete previously compiled scripts when the sim starts. If you disable this
; then startup will be faster. However, then it becomes your responsibility to delete the
; compiled scripts if OpenSim has changed enough that previously compiled scripts are no
; longer compatible.
DeleteScriptsOnStartup = true
; Controls whether previously compiled scripts DLLs are deleted on sim restart. If you set this to false
; then startup will be considerably faster since scripts won't need to be recompiled. However, then it becomes your responsibility to delete the
; compiled scripts if you're recompiling OpenSim from source code and internal interfaces used
; by scripts have changed.
; DeleteScriptsOnStartup = false
[OpenGridProtocol]

View File

@@ -2052,34 +2052,6 @@
</Files>
</Project>
<Project frameworkVersion="v3_5" name="OpenSim.Region.Examples.SimpleModule" path="OpenSim/Region/Examples/SimpleModule" type="Library">
<Configuration name="Debug">
<Options>
<OutputPath>bin/</OutputPath>
</Options>
</Configuration>
<Configuration name="Release">
<Options>
<OutputPath>bin/</OutputPath>
</Options>
</Configuration>
<ReferencePath>../../../../bin/</ReferencePath>
<Reference name="OpenMetaverseTypes" path="../../../../bin/"/>
<Reference name="OpenMetaverse" path="../../../../bin/"/>
<Reference name="System"/>
<Reference name="System.Core"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Region.Framework"/>
<Reference name="Nini" path="../../../../bin/"/>
<Reference name="log4net" path="../../../../bin/"/>
<Files>
<Match pattern="*.cs" recurse="true"/>
</Files>
</Project>
<!-- Data Base Modules -->
<Project frameworkVersion="v3_5" name="OpenSim.Data.MySQL" path="OpenSim/Data/MySQL" type="Library">
<Configuration name="Debug">

0
runprebuild2010.bat Normal file → Executable file
View File