Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
commit
9b9e2a8c71
|
@ -1,8 +1,59 @@
|
||||||
<!-- -*- xml -*- -->
|
<!-- -*- xml -*- -->
|
||||||
<!-- please leave the top comment for us emacs folks -->
|
<!-- please leave the top comment for us emacs folks -->
|
||||||
<property name="projectdir" value="opensim-0.5.5" />
|
|
||||||
<property name="nunitcmd" value="nunit-console" />
|
<property name="nunitcmd" value="nunit-console" />
|
||||||
|
|
||||||
|
<!-- For safety/laziness sake, we're going to take the approach of deleting known extraneous files here rather than
|
||||||
|
trying to copy across only the essential ones -->
|
||||||
|
<property name="distbindir" value="distbin" />
|
||||||
|
<target name="distbin">
|
||||||
|
<copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/>
|
||||||
|
<delete dir="${distbindir}"/>
|
||||||
|
<!-- <copy file="*" todir="${distbindir}"/> -->
|
||||||
|
<copy todir="${distbindir}">
|
||||||
|
<fileset>
|
||||||
|
<include name="**"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<delete dir="${distbindir}/OpenSim"/>
|
||||||
|
<delete dir="${distbindir}/Prebuild"/>
|
||||||
|
<delete dir="${distbindir}/%temp%"/>
|
||||||
|
<delete dir="${distbindir}/.nant"/>
|
||||||
|
<delete>
|
||||||
|
<fileset basedir="${distbindir}">
|
||||||
|
<include name="Makefile"/>
|
||||||
|
<include name="nant-color"/>
|
||||||
|
<include name="OpenSim.*"/>
|
||||||
|
<include name="prebuild.xml"/>
|
||||||
|
<include name="runprebuild*"/>
|
||||||
|
<include name="TESTING.txt"/>
|
||||||
|
<include name="TestResult.xml"/>
|
||||||
|
<include name="bin/OpenSim.Server.ini"/>
|
||||||
|
<include name="bin/Regions/*"/>
|
||||||
|
<include name="bin/*.db"/>
|
||||||
|
<include name="**/.git/**"/>
|
||||||
|
<include name=".gitignore"/>
|
||||||
|
<include name=".hgignore"/>
|
||||||
|
</fileset>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- I don't think these targets are being actively used. But just in case, we'll just comment them out for now - justincc -->
|
||||||
|
<!--
|
||||||
|
<property name="projectdir" value="opensim-0.6.9" />
|
||||||
|
<target name="dist" depends="distdir">
|
||||||
|
<zip zipfile="${projectdir}.zip">
|
||||||
|
<fileset basedir=".">
|
||||||
|
<include name="${projectdir}/**" />
|
||||||
|
</fileset>
|
||||||
|
</zip>
|
||||||
|
<tar destfile="${projectdir}.tar.gz" compression="GZip">
|
||||||
|
<fileset basedir=".">
|
||||||
|
<include name="${projectdir}/**" />
|
||||||
|
</fileset>
|
||||||
|
</tar>
|
||||||
|
</target>
|
||||||
|
|
||||||
<target name="distdir">
|
<target name="distdir">
|
||||||
<delete dir="${projectdir}" />
|
<delete dir="${projectdir}" />
|
||||||
<copy todir="${projectdir}">
|
<copy todir="${projectdir}">
|
||||||
|
@ -21,14 +72,14 @@
|
||||||
<include name="bin/assets/**" />
|
<include name="bin/assets/**" />
|
||||||
<include name="bin/data/**" />
|
<include name="bin/data/**" />
|
||||||
<include name="bin/OpenSim*xml" />
|
<include name="bin/OpenSim*xml" />
|
||||||
<!-- the next is to exclude built libs -->
|
|
||||||
<exclude name="bin/OpenSim.*dll" />
|
|
||||||
<include name="bin/OpenSim.ini" />
|
<include name="bin/OpenSim.ini" />
|
||||||
<include name="bin/defaultstripe.png" />
|
<include name="bin/defaultstripe.png" />
|
||||||
|
<exclude name="bin/OpenSim.*dll" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<touch file="${projectdir}/bin/startup_commands.txt" />
|
<touch file="${projectdir}/bin/startup_commands.txt" />
|
||||||
</target>
|
</target>
|
||||||
|
-->
|
||||||
|
|
||||||
<target name="test" depends="build, find-nunit">
|
<target name="test" depends="build, find-nunit">
|
||||||
<setenv name="MONO_THREADS_PER_CPU" value="100" />
|
<setenv name="MONO_THREADS_PER_CPU" value="100" />
|
||||||
|
@ -317,17 +368,3 @@
|
||||||
<target name="doxygen">
|
<target name="doxygen">
|
||||||
<exec program="doxygen" workingdir="doc" commandline="doxygen.conf" />
|
<exec program="doxygen" workingdir="doc" commandline="doxygen.conf" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="dist" depends="distdir">
|
|
||||||
<zip zipfile="${projectdir}.zip">
|
|
||||||
<fileset basedir=".">
|
|
||||||
<include name="${projectdir}/**" />
|
|
||||||
</fileset>
|
|
||||||
</zip>
|
|
||||||
<tar destfile="${projectdir}.tar.gz" compression="GZip">
|
|
||||||
<fileset basedir=".">
|
|
||||||
<include name="${projectdir}/**" />
|
|
||||||
</fileset>
|
|
||||||
</tar>
|
|
||||||
</target>
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
private const string VERSION_NUMBER = "0.6.8CM";
|
private const string VERSION_NUMBER = "0.6.8CM";
|
||||||
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
|
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
|
||||||
|
|
||||||
public enum Flavour
|
public enum Flavour
|
||||||
{
|
{
|
||||||
Unknown,
|
Unknown,
|
||||||
|
|
|
@ -390,7 +390,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT)
|
if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT)
|
||||||
{
|
{
|
||||||
if (parcelAvatarIsEntering.IsBannedFromLand(avatar.UUID))
|
if (parcelAvatarIsEntering.IsEitherBannedOrRestricted(avatar.UUID))
|
||||||
{
|
{
|
||||||
MoveUserOutOfParcel(avatar);
|
MoveUserOutOfParcel(avatar);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2349,9 +2349,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
EventManager.TriggerOnAttach(localID, itemID, avatarID);
|
EventManager.TriggerOnAttach(localID, itemID, avatarID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID RezSingleAttachment(IClientAPI remoteClient, UUID itemID,
|
/// <summary>
|
||||||
uint AttachmentPt)
|
/// Called when the client receives a request to rez a single attachment on to the avatar from inventory
|
||||||
|
/// (RezSingleAttachmentFromInv packet).
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="remoteClient"></param>
|
||||||
|
/// <param name="itemID"></param>
|
||||||
|
/// <param name="AttachmentPt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public UUID RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
|
||||||
{
|
{
|
||||||
|
m_log.DebugFormat("[USER INVENTORY]: Rezzing single attachment from item {0} for {1}", itemID, remoteClient.Name);
|
||||||
|
|
||||||
SceneObjectGroup att = m_sceneGraph.RezSingleAttachment(remoteClient, itemID, AttachmentPt);
|
SceneObjectGroup att = m_sceneGraph.RezSingleAttachment(remoteClient, itemID, AttachmentPt);
|
||||||
|
|
||||||
if (att == null)
|
if (att == null)
|
||||||
|
@ -2363,9 +2372,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return RezSingleAttachment(att, remoteClient, itemID, AttachmentPt);
|
return RezSingleAttachment(att, remoteClient, itemID, AttachmentPt);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID RezSingleAttachment(SceneObjectGroup att,
|
/// <summary>
|
||||||
IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
|
/// Update the user inventory to reflect an attachment
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="att"></param>
|
||||||
|
/// <param name="remoteClient"></param>
|
||||||
|
/// <param name="itemID"></param>
|
||||||
|
/// <param name="AttachmentPt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public UUID RezSingleAttachment(SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
|
||||||
{
|
{
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[USER INVENTORY]: Updating inventory of {0} to show attachment of {1} (item ID {2})",
|
||||||
|
remoteClient.Name, att.Name, itemID);
|
||||||
|
|
||||||
if (!att.IsDeleted)
|
if (!att.IsDeleted)
|
||||||
AttachmentPt = att.RootPart.AttachmentPoint;
|
AttachmentPt = att.RootPart.AttachmentPoint;
|
||||||
|
|
||||||
|
@ -2404,8 +2424,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return m_sceneGraph.AttachObject(controllingClient, localID, attachPoint, rot, pos, silent);
|
return m_sceneGraph.AttachObject(controllingClient, localID, attachPoint, rot, pos, silent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This registers the item as attached in a user's inventory
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="remoteClient"></param>
|
||||||
|
/// <param name="AttachmentPt"></param>
|
||||||
|
/// <param name="itemID"></param>
|
||||||
|
/// <param name="att"></param>
|
||||||
public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
|
public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}",
|
||||||
|
// att.Name, remoteClient.Name, AttachmentPt, itemID);
|
||||||
|
|
||||||
if (UUID.Zero == itemID)
|
if (UUID.Zero == itemID)
|
||||||
{
|
{
|
||||||
m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error inventory item ID.");
|
m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error inventory item ID.");
|
||||||
|
@ -2433,10 +2464,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
|
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
|
||||||
|
|
||||||
if (m_AvatarFactory != null)
|
if (m_AvatarFactory != null)
|
||||||
{
|
|
||||||
m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
|
m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2519,6 +2547,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
sog.SetOwnerId(ownerID);
|
sog.SetOwnerId(ownerID);
|
||||||
sog.SetGroup(groupID, remoteClient);
|
sog.SetGroup(groupID, remoteClient);
|
||||||
|
sog.ScheduleGroupForFullUpdate();
|
||||||
|
|
||||||
foreach (SceneObjectPart child in sog.Children.Values)
|
foreach (SceneObjectPart child in sog.Children.Values)
|
||||||
child.Inventory.ChangeInventoryOwner(ownerID);
|
child.Inventory.ChangeInventoryOwner(ownerID);
|
||||||
|
@ -2540,6 +2569,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
sog.SetOwnerId(groupID);
|
sog.SetOwnerId(groupID);
|
||||||
sog.ApplyNextOwnerPermissions();
|
sog.ApplyNextOwnerPermissions();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (uint localID in localIDs)
|
foreach (uint localID in localIDs)
|
||||||
|
|
|
@ -1840,14 +1840,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
//m_log.DebugFormat(
|
//m_log.DebugFormat(
|
||||||
// "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName);
|
// "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName);
|
||||||
|
|
||||||
|
SceneObjectGroup sceneObject = null;
|
||||||
|
|
||||||
// If an entity creator has been registered for this prim type then use that
|
// If an entity creator has been registered for this prim type then use that
|
||||||
if (m_entityCreators.ContainsKey((PCode)shape.PCode))
|
if (m_entityCreators.ContainsKey((PCode)shape.PCode))
|
||||||
return m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape);
|
{
|
||||||
|
sceneObject = m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Otherwise, use this default creation code;
|
||||||
|
sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
|
||||||
|
AddNewSceneObject(sceneObject, true);
|
||||||
|
sceneObject.SetGroup(groupID, null);
|
||||||
|
}
|
||||||
|
|
||||||
// Otherwise, use this default creation code;
|
sceneObject.ScheduleGroupForFullUpdate();
|
||||||
SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
|
|
||||||
AddNewSceneObject(sceneObject, true);
|
|
||||||
sceneObject.SetGroup(groupID, null);
|
|
||||||
|
|
||||||
return sceneObject;
|
return sceneObject;
|
||||||
}
|
}
|
||||||
|
@ -1875,7 +1883,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add a newly created object to the scene
|
/// Add a newly created object to the scene. Updates are also sent to viewers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sceneObject"></param>
|
/// <param name="sceneObject"></param>
|
||||||
/// <param name="attachToBackup">
|
/// <param name="attachToBackup">
|
||||||
|
@ -1884,8 +1892,25 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </param>
|
/// </param>
|
||||||
public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
|
public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
|
||||||
{
|
{
|
||||||
return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup);
|
return AddNewSceneObject(sceneObject, attachToBackup, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add a newly created object to the scene
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sceneObject"></param>
|
||||||
|
/// <param name="attachToBackup">
|
||||||
|
/// If true, the object is made persistent into the scene.
|
||||||
|
/// If false, the object will not persist over server restarts
|
||||||
|
/// </param>
|
||||||
|
/// <param name="sendClientUpdates">
|
||||||
|
/// If true, updates for the new scene object are sent to all viewers in range.
|
||||||
|
/// If false, it is left to the caller to schedule the update
|
||||||
|
/// </param>
|
||||||
|
public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
|
||||||
|
{
|
||||||
|
return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete every object from the scene
|
/// Delete every object from the scene
|
||||||
|
@ -3349,7 +3374,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_log.Debug("[SCENE]: Unable to register with InterregionCommsIn");
|
m_log.Debug("[SCENE]: Unable to register with InterregionCommsIn");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -252,7 +252,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
sceneObject.HasGroupChanged = true;
|
sceneObject.HasGroupChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return AddSceneObject(sceneObject, attachToBackup);
|
return AddSceneObject(sceneObject, attachToBackup, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -267,12 +267,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// true if the object was added, false if an object with the same uuid was already in the scene
|
/// true if the object was added, false if an object with the same uuid was already in the scene
|
||||||
/// </returns>
|
/// </returns>
|
||||||
protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
|
protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
|
||||||
{
|
{
|
||||||
// Ensure that we persist this new scene object
|
// Ensure that we persist this new scene object
|
||||||
sceneObject.HasGroupChanged = true;
|
sceneObject.HasGroupChanged = true;
|
||||||
|
|
||||||
return AddSceneObject(sceneObject, attachToBackup);
|
return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -284,12 +284,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// If true, the object is made persistent into the scene.
|
/// If true, the object is made persistent into the scene.
|
||||||
/// If false, the object will not persist over server restarts
|
/// If false, the object will not persist over server restarts
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>true if the object was added, false if an object with the same uuid was already in the scene
|
/// <param name="sendClientUpdates">
|
||||||
|
/// If true, updates for the new scene object are sent to all viewers in range.
|
||||||
|
/// If false, it is left to the caller to schedule the update
|
||||||
|
/// </param>
|
||||||
|
/// <returns>
|
||||||
|
/// true if the object was added, false if an object with the same uuid was already in the scene
|
||||||
/// </returns>
|
/// </returns>
|
||||||
protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
|
protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
|
||||||
{
|
{
|
||||||
if (sceneObject == null || sceneObject.RootPart == null || sceneObject.RootPart.UUID == UUID.Zero)
|
if (sceneObject == null || sceneObject.RootPart == null || sceneObject.RootPart.UUID == UUID.Zero)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
bool alreadyExisted = false;
|
||||||
|
|
||||||
if (m_parentScene.m_clampPrimSize)
|
if (m_parentScene.m_clampPrimSize)
|
||||||
{
|
{
|
||||||
|
@ -310,6 +317,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
sceneObject.AttachToScene(m_parentScene);
|
sceneObject.AttachToScene(m_parentScene);
|
||||||
|
|
||||||
|
if (sendClientUpdates)
|
||||||
|
sceneObject.ScheduleGroupForFullUpdate();
|
||||||
|
|
||||||
lock (sceneObject)
|
lock (sceneObject)
|
||||||
{
|
{
|
||||||
if (!Entities.ContainsKey(sceneObject.UUID))
|
if (!Entities.ContainsKey(sceneObject.UUID))
|
||||||
|
@ -333,12 +343,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectGroupsByLocalID[part.LocalId] = sceneObject;
|
SceneObjectGroupsByLocalID[part.LocalId] = sceneObject;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
else
|
||||||
|
{
|
||||||
|
alreadyExisted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return alreadyExisted;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -545,26 +557,34 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
|
itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
|
||||||
false, false, remoteClient.AgentId, true);
|
false, false, remoteClient.AgentId, true);
|
||||||
|
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}",
|
||||||
|
// objatt.Name, remoteClient.Name, AttachmentPt);
|
||||||
|
|
||||||
if (objatt != null)
|
if (objatt != null)
|
||||||
{
|
{
|
||||||
bool tainted = false;
|
bool tainted = false;
|
||||||
if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint())
|
if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint())
|
||||||
tainted = true;
|
tainted = true;
|
||||||
|
|
||||||
if (AttachObject(
|
AttachObject(remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false);
|
||||||
remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false))
|
//objatt.ScheduleGroupForFullUpdate();
|
||||||
{
|
|
||||||
objatt.ScheduleGroupForFullUpdate();
|
|
||||||
if (tainted)
|
|
||||||
objatt.HasGroupChanged = true;
|
|
||||||
|
|
||||||
// Fire after attach, so we don't get messy perms dialogs
|
|
||||||
// 3 == AttachedRez
|
|
||||||
objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3);
|
|
||||||
|
|
||||||
// Do this last so that event listeners have access to all the effects of the attachment
|
if (tainted)
|
||||||
m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId);
|
objatt.HasGroupChanged = true;
|
||||||
}
|
|
||||||
|
// Fire after attach, so we don't get messy perms dialogs
|
||||||
|
// 3 == AttachedRez
|
||||||
|
objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3);
|
||||||
|
|
||||||
|
// Do this last so that event listeners have access to all the effects of the attachment
|
||||||
|
m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.WarnFormat(
|
||||||
|
"[SCENE GRAPH]: Could not retrieve item {0} for attaching to avatar {1} at point {2}",
|
||||||
|
itemID, remoteClient.Name, AttachmentPt);
|
||||||
}
|
}
|
||||||
|
|
||||||
return objatt;
|
return objatt;
|
||||||
|
|
|
@ -642,8 +642,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplyPhysics(m_scene.m_physicalPrim);
|
ApplyPhysics(m_scene.m_physicalPrim);
|
||||||
|
|
||||||
ScheduleGroupForFullUpdate();
|
// Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
|
||||||
|
// for the same object with very different properties. The caller must schedule the update.
|
||||||
|
//ScheduleGroupForFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3 GroupScale()
|
public Vector3 GroupScale()
|
||||||
|
@ -1045,10 +1047,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// don't attach attachments to child agents
|
// don't attach attachments to child agents
|
||||||
if (avatar.IsChildAgent) return;
|
if (avatar.IsChildAgent) return;
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[SOG]: Adding attachment {0} to avatar {1}", Name, avatar.Name);
|
||||||
|
|
||||||
DetachFromBackup();
|
DetachFromBackup();
|
||||||
|
|
||||||
// Remove from database and parcel prim count
|
// Remove from database and parcel prim count
|
||||||
//
|
|
||||||
m_scene.DeleteFromStorage(UUID);
|
m_scene.DeleteFromStorage(UUID);
|
||||||
m_scene.EventManager.TriggerParcelPrimCountTainted();
|
m_scene.EventManager.TriggerParcelPrimCountTainted();
|
||||||
|
|
||||||
|
@ -1074,7 +1077,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SetAttachmentPoint(Convert.ToByte(attachmentpoint));
|
SetAttachmentPoint(Convert.ToByte(attachmentpoint));
|
||||||
|
|
||||||
avatar.AddAttachment(this);
|
avatar.AddAttachment(this);
|
||||||
m_log.Debug("[SOG]: Added attachment " + UUID + " to avatar " + avatar.UUID);
|
|
||||||
|
|
||||||
if (!silent)
|
if (!silent)
|
||||||
{
|
{
|
||||||
|
@ -1091,6 +1093,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ScheduleGroupForFullUpdate();
|
ScheduleGroupForFullUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.WarnFormat(
|
||||||
|
"[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present",
|
||||||
|
UUID, agentID, Scene.RegionInfo.RegionName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte GetAttachmentPoint()
|
public byte GetAttachmentPoint()
|
||||||
|
@ -2136,6 +2144,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void ScheduleFullUpdateToAvatar(ScenePresence presence)
|
public void ScheduleFullUpdateToAvatar(ScenePresence presence)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1} just to avatar {2}", Name, UUID, presence.Name);
|
||||||
|
|
||||||
RootPart.AddFullUpdateToAvatar(presence);
|
RootPart.AddFullUpdateToAvatar(presence);
|
||||||
|
|
||||||
lockPartsForRead(true);
|
lockPartsForRead(true);
|
||||||
|
@ -2170,6 +2180,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ScheduleGroupForFullUpdate()
|
public void ScheduleGroupForFullUpdate()
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, UUID);
|
||||||
|
|
||||||
checkAtTargets();
|
checkAtTargets();
|
||||||
RootPart.ScheduleFullUpdate();
|
RootPart.ScheduleFullUpdate();
|
||||||
|
|
||||||
|
@ -2191,7 +2203,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ScheduleGroupForTerseUpdate()
|
public void ScheduleGroupForTerseUpdate()
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD:OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
|
||||||
lockPartsForRead(true);
|
lockPartsForRead(true);
|
||||||
|
=======
|
||||||
|
// m_log.DebugFormat("[SOG]: Scheduling terse update for {0} {1}", Name, UUID);
|
||||||
|
|
||||||
|
lock (m_parts)
|
||||||
|
>>>>>>> 0.6.9-post-fixes:OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
foreach (SceneObjectPart part in m_parts.Values)
|
||||||
{
|
{
|
||||||
|
@ -2207,9 +2225,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Immediately send a full update for this scene object.
|
/// Immediately send a full update for this scene object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendGroupFullUpdate()
|
public void SendGroupFullUpdate()
|
||||||
{
|
{
|
||||||
if (IsDeleted)
|
if (IsDeleted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[SOG]: Sending immediate full group update for {0} {1}", Name, UUID);
|
||||||
|
|
||||||
RootPart.SendFullUpdateToAllClients();
|
RootPart.SendFullUpdateToAllClients();
|
||||||
|
|
||||||
|
@ -2229,7 +2249,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Immediately send an update for this scene object's root prim only.
|
/// Immediately send an update for this scene object's root prim only.
|
||||||
/// This is for updates regarding the object as a whole, and none of its parts in particular.
|
/// This is for updates regarding the object as a whole, and none of its parts in particular.
|
||||||
/// Note: this may not be cused by opensim (it probably should) but it's used by
|
/// Note: this may not be used by opensim (it probably should) but it's used by
|
||||||
/// external modules.
|
/// external modules.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendGroupRootTerseUpdate()
|
public void SendGroupRootTerseUpdate()
|
||||||
|
@ -2244,6 +2264,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (m_scene == null) // Need to check here as it's null during object creation
|
if (m_scene == null) // Need to check here as it's null during object creation
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_scene.SceneGraph.AddToUpdateList(this);
|
m_scene.SceneGraph.AddToUpdateList(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3744,8 +3765,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
HasGroupChanged = true;
|
HasGroupChanged = true;
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD:OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
|
||||||
lockPartsForRead(false);
|
lockPartsForRead(false);
|
||||||
ScheduleGroupForFullUpdate();
|
ScheduleGroupForFullUpdate();
|
||||||
|
=======
|
||||||
|
|
||||||
|
// Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
|
||||||
|
// for the same object with very different properties. The caller must schedule the update.
|
||||||
|
//ScheduleGroupForFullUpdate();
|
||||||
|
>>>>>>> 0.6.9-post-fixes:OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TriggerScriptChangedEvent(Changed val)
|
public void TriggerScriptChangedEvent(Changed val)
|
||||||
|
|
Loading…
Reference in New Issue