still testing

avinationmerge
UbitUmarov 2014-08-26 02:22:25 +01:00
parent 3ee6144d0c
commit dde2ac2544
1 changed files with 30 additions and 30 deletions

View File

@ -1887,29 +1887,26 @@ 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); sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
SendAttachmentFullUpdateToAgentNF(sog, this); sog.ResumeScripts();
}
if (!sog.HasPrivateAttachmentPoint) foreach (ScenePresence p in allpresences)
{
// sog.ScheduleGroupForFullUpdate();
foreach(ScenePresence p in allpresences)
{ {
if (p == this) if (p == this)
{
SendTerseUpdateToAgentNF(this);
SendAttachmentsToAgentNF(this);
continue; continue;
}
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
continue; continue;
SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path SendTerseUpdateToAgentNF(p);
SendAttachmentFullUpdateToAgentNF(sog, p); SendAttachmentsToAgentNF(p);
};
}
sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
sog.ResumeScripts();
} }
} }
} }
@ -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);