Merge branch 'ubitworkmaster'
commit
012d0b07bc
|
@ -5393,6 +5393,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//update.JointType = 0;
|
//update.JointType = 0;
|
||||||
update.Material = data.Material;
|
update.Material = data.Material;
|
||||||
update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim
|
update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim
|
||||||
|
/*
|
||||||
if (data.ParentGroup.IsAttachment)
|
if (data.ParentGroup.IsAttachment)
|
||||||
{
|
{
|
||||||
update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.ParentGroup.FromItemID);
|
update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.ParentGroup.FromItemID);
|
||||||
|
@ -5406,6 +5407,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// case for attachments may contain conflicting values that can end up crashing the viewer.
|
// case for attachments may contain conflicting values that can end up crashing the viewer.
|
||||||
update.State = data.ParentGroup.RootPart.Shape.State;
|
update.State = data.ParentGroup.RootPart.Shape.State;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (data.ParentGroup.IsAttachment)
|
||||||
|
{
|
||||||
|
if (data.IsRoot)
|
||||||
|
{
|
||||||
|
update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.ParentGroup.FromItemID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
update.NameValue = Utils.EmptyBytes;
|
||||||
|
|
||||||
|
int st = (int)data.ParentGroup.AttachmentPoint;
|
||||||
|
update.State = (byte)(((st & 0xf0) >> 4) + ((st & 0x0f) << 4)); ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
update.NameValue = Utils.EmptyBytes;
|
||||||
|
update.State = data.Shape.State; // not sure about this
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[LLCLIENTVIEW]: Sending state {0} for {1} {2} to {3}",
|
// "[LLCLIENTVIEW]: Sending state {0} for {1} {2} to {3}",
|
||||||
|
|
|
@ -364,6 +364,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
int texture = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4;
|
int texture = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4;
|
||||||
int asset = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f);
|
int asset = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f);
|
||||||
|
|
||||||
|
int total = resend + land + wind + cloud + task + texture + asset;
|
||||||
|
total /= 128;
|
||||||
|
|
||||||
// Make sure none of the throttles are set below our packet MTU,
|
// Make sure none of the throttles are set below our packet MTU,
|
||||||
// otherwise a throttle could become permanently clogged
|
// otherwise a throttle could become permanently clogged
|
||||||
resend = Math.Max(resend, LLUDPServer.MTU);
|
resend = Math.Max(resend, LLUDPServer.MTU);
|
||||||
|
@ -380,7 +383,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
task = task + (int)(m_cannibalrate * texture);
|
task = task + (int)(m_cannibalrate * texture);
|
||||||
texture = (int)((1 - m_cannibalrate) * texture);
|
texture = (int)((1 - m_cannibalrate) * texture);
|
||||||
|
|
||||||
//int total = resend + land + wind + cloud + task + texture + asset;
|
total = resend + land + wind + cloud + task + texture + asset;
|
||||||
|
total /= 128;
|
||||||
//m_log.DebugFormat("[LLUDPCLIENT]: {0} is setting throttles. Resend={1}, Land={2}, Wind={3}, Cloud={4}, Task={5}, Texture={6}, Asset={7}, Total={8}",
|
//m_log.DebugFormat("[LLUDPCLIENT]: {0} is setting throttles. Resend={1}, Land={2}, Wind={3}, Cloud={4}, Task={5}, Texture={6}, Asset={7}, Total={8}",
|
||||||
// AgentID, resend, land, wind, cloud, task, texture, asset, total);
|
// AgentID, resend, land, wind, cloud, task, texture, asset, total);
|
||||||
|
|
||||||
|
@ -484,7 +488,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// Don't send this packet if there is already a packet waiting in the queue
|
// Don't send this packet if there is already a packet waiting in the queue
|
||||||
// even if we have the tokens to send it, tokens should go to the already
|
// even if we have the tokens to send it, tokens should go to the already
|
||||||
// queued packets
|
// queued packets
|
||||||
if (queue.Count > 0)
|
if (queue.Count > 0 || m_nextPackets[category] != null)
|
||||||
{
|
{
|
||||||
queue.Enqueue(packet, highPriority);
|
queue.Enqueue(packet, highPriority);
|
||||||
return true;
|
return true;
|
||||||
|
@ -528,7 +532,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// <returns>True if any packets were sent, otherwise false</returns>
|
/// <returns>True if any packets were sent, otherwise false</returns>
|
||||||
public bool DequeueOutgoing()
|
public bool DequeueOutgoing()
|
||||||
{
|
{
|
||||||
if (m_deliverPackets == false) return false;
|
// if (m_deliverPackets == false) return false;
|
||||||
|
|
||||||
OutgoingPacket packet = null;
|
OutgoingPacket packet = null;
|
||||||
DoubleLocklessQueue<OutgoingPacket> queue;
|
DoubleLocklessQueue<OutgoingPacket> queue;
|
||||||
|
|
|
@ -1245,7 +1245,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
int dataLength = buffer.DataLength;
|
int dataLength = buffer.DataLength;
|
||||||
|
|
||||||
// NOTE: I'm seeing problems with some viewers when ACKs are appended to zerocoded packets so I've disabled that here
|
// NOTE: I'm seeing problems with some viewers when ACKs are appended to zerocoded packets so I've disabled that here
|
||||||
if (!isZerocoded)
|
if (!isZerocoded && !isResend)
|
||||||
{
|
{
|
||||||
// Keep appending ACKs until there is no room left in the buffer or there are
|
// Keep appending ACKs until there is no room left in the buffer or there are
|
||||||
// no more ACKs to append
|
// no more ACKs to append
|
||||||
|
|
|
@ -986,7 +986,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
// Well, this is it. The agent is over there.
|
// Well, this is it. The agent is over there.
|
||||||
// KillEntity(sp.Scene, sp.LocalId);
|
// KillEntity(sp.Scene, sp.LocalId);
|
||||||
|
|
||||||
sp.HasMovedAway();
|
bool nearRegion = sp.KnownRegions.ContainsKey(destinationHandle);
|
||||||
|
sp.HasMovedAway(nearRegion);
|
||||||
|
|
||||||
// Now let's make it officially a child agent
|
// Now let's make it officially a child agent
|
||||||
sp.MakeChildAgent();
|
sp.MakeChildAgent();
|
||||||
|
@ -1141,7 +1142,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
|
m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
|
||||||
|
|
||||||
sp.HasMovedAway();
|
bool nearRegion = sp.KnownRegions.ContainsKey(destinationHandle);
|
||||||
|
sp.HasMovedAway(nearRegion);
|
||||||
|
|
||||||
// Need to signal neighbours whether child agents may need closing irrespective of whether this
|
// Need to signal neighbours whether child agents may need closing irrespective of whether this
|
||||||
// one needed closing. We also need to close child agents as quickly as possible to avoid complicated
|
// one needed closing. We also need to close child agents as quickly as possible to avoid complicated
|
||||||
|
@ -1784,9 +1786,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp);
|
m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp);
|
||||||
|
|
||||||
// this may need the attachments
|
// this may need the attachments
|
||||||
agent.parcelRegionCross();
|
|
||||||
|
|
||||||
AgentHasMovedAway(agent, true);
|
agent.HasMovedAway(true);
|
||||||
|
// agent.parcelRegionCross();
|
||||||
|
|
||||||
|
// AgentHasMovedAway(agent, true);
|
||||||
|
|
||||||
agent.MakeChildAgent();
|
agent.MakeChildAgent();
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5963,21 +5962,47 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HasMovedAway()
|
public void HasMovedAway(bool nearRegion)
|
||||||
{
|
{
|
||||||
List<ScenePresence> allpresences = m_scene.GetScenePresences();
|
|
||||||
foreach (ScenePresence p in allpresences)
|
if (nearRegion)
|
||||||
{
|
{
|
||||||
if (p == this)
|
if (Scene.AttachmentsModule != null)
|
||||||
continue;
|
Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true);
|
||||||
SendKillTo(p);
|
|
||||||
if (!p.IsChildAgent)
|
if (!ParcelHideThisAvatar || GodLevel >= 200)
|
||||||
p.SendKillTo(this);
|
return;
|
||||||
|
|
||||||
|
List<ScenePresence> allpresences = m_scene.GetScenePresences();
|
||||||
|
foreach (ScenePresence p in allpresences)
|
||||||
|
{
|
||||||
|
if (p.IsDeleted || p == this || p.IsChildAgent || p.ControllingClient == null || !p.ControllingClient.IsActive)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (p.currentParcelUUID == m_currentParcelUUID)
|
||||||
|
{
|
||||||
|
p.SendKillTo(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<ScenePresence> allpresences = m_scene.GetScenePresences();
|
||||||
|
foreach (ScenePresence p in allpresences)
|
||||||
|
{
|
||||||
|
if (p == this)
|
||||||
|
continue;
|
||||||
|
SendKillTo(p);
|
||||||
|
if (!p.IsChildAgent)
|
||||||
|
p.SendKillTo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Scene.AttachmentsModule != null)
|
||||||
|
Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true);
|
||||||
}
|
}
|
||||||
if (Scene.AttachmentsModule != null)
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue