still testing
parent
3ee6144d0c
commit
dde2ac2544
|
@ -1887,30 +1887,27 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
|
"[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
|
||||||
|
|
||||||
// Resume scripts this possible should also be moved down after sending the avatar to viewer ?
|
foreach(SceneObjectGroup sog in m_attachments)
|
||||||
foreach (SceneObjectGroup sog in m_attachments)
|
|
||||||
{
|
{
|
||||||
SendFullUpdateToClient(ControllingClient);
|
|
||||||
SendAttachmentFullUpdateToAgentNF(sog, this);
|
|
||||||
|
|
||||||
if (!sog.HasPrivateAttachmentPoint)
|
|
||||||
{
|
|
||||||
// sog.ScheduleGroupForFullUpdate();
|
|
||||||
foreach(ScenePresence p in allpresences)
|
|
||||||
{
|
|
||||||
if (p == this)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
|
|
||||||
SendAttachmentFullUpdateToAgentNF(sog, p);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
|
sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
|
||||||
sog.ResumeScripts();
|
sog.ResumeScripts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (ScenePresence p in allpresences)
|
||||||
|
{
|
||||||
|
if (p == this)
|
||||||
|
{
|
||||||
|
SendTerseUpdateToAgentNF(this);
|
||||||
|
SendAttachmentsToAgentNF(this);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
SendTerseUpdateToAgentNF(p);
|
||||||
|
SendAttachmentsToAgentNF(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3428,7 +3425,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (remoteClient.IsActive)
|
if (remoteClient.IsActive)
|
||||||
{
|
{
|
||||||
//m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity);
|
//m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity);
|
||||||
remoteClient.SendEntityUpdate(this, PrimUpdateFlags.FullUpdate);
|
remoteClient.SendEntityUpdate(this,
|
||||||
|
PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
|
||||||
|
| PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
|
||||||
m_scene.StatsReporter.AddAgentUpdates(1);
|
m_scene.StatsReporter.AddAgentUpdates(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4761,8 +4760,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
|
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
SendTerseUpdateToAgentNF(p);
|
||||||
SendAttachmentFullUpdateToAgentNF(sog, p);
|
SendAttachmentFullUpdateToAgentNF(sog, p);
|
||||||
SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4772,13 +4771,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// for now they are checked in several places down the line...
|
// for now they are checked in several places down the line...
|
||||||
public void SendAttachmentsToAgentNF(ScenePresence p)
|
public void SendAttachmentsToAgentNF(ScenePresence p)
|
||||||
{
|
{
|
||||||
|
SendTerseUpdateToAgentNF(p);
|
||||||
lock (m_attachments)
|
lock (m_attachments)
|
||||||
{
|
{
|
||||||
foreach (SceneObjectGroup sog in m_attachments)
|
foreach (SceneObjectGroup sog in m_attachments)
|
||||||
{
|
{
|
||||||
SendAttachmentFullUpdateToAgentNF(sog, p);
|
SendAttachmentFullUpdateToAgentNF(sog, p);
|
||||||
}
|
}
|
||||||
SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5966,7 +5965,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public void HasMovedAway()
|
public void HasMovedAway()
|
||||||
{
|
{
|
||||||
List<ScenePresence> allpresences = m_scene.GetScenePresences();
|
List<ScenePresence> allpresences = m_scene.GetScenePresences();
|
||||||
/* foreach (ScenePresence p in allpresences)
|
foreach (ScenePresence p in allpresences)
|
||||||
{
|
{
|
||||||
if (p == this)
|
if (p == this)
|
||||||
continue;
|
continue;
|
||||||
|
@ -5974,19 +5973,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (!p.IsChildAgent)
|
if (!p.IsChildAgent)
|
||||||
p.SendKillTo(this);
|
p.SendKillTo(this);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
if (Scene.AttachmentsModule != null)
|
if (Scene.AttachmentsModule != null)
|
||||||
Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true);
|
Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// kill with attachs root kills
|
// kill with attachs root kills
|
||||||
public void SendKillTo(ScenePresence p)
|
public void SendKillTo(ScenePresence p)
|
||||||
{
|
{
|
||||||
List<uint> ids = new List<uint>(m_attachments.Count + 1);
|
List<uint> ids = new List<uint>(m_attachments.Count + 1);
|
||||||
// foreach (SceneObjectGroup sog in m_attachments)
|
foreach (SceneObjectGroup sog in m_attachments)
|
||||||
// {
|
{
|
||||||
// ids.Add(sog.RootPart.LocalId);
|
ids.Add(sog.RootPart.LocalId);
|
||||||
// }
|
}
|
||||||
|
|
||||||
ids.Add(LocalId);
|
ids.Add(LocalId);
|
||||||
p.ControllingClient.SendKillObject(ids);
|
p.ControllingClient.SendKillObject(ids);
|
||||||
|
|
Loading…
Reference in New Issue