Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor

avinationmerge
sacha 2010-08-07 21:05:18 +00:00
commit 4900d39b7d
10 changed files with 4745 additions and 13779 deletions

View File

@ -139,28 +139,43 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void ProcessQueues() private void ProcessQueues()
{ {
// Process all the pending adds // Process all the pending adds
OutgoingPacket pendingAdd; OutgoingPacket pendingAdd;
while (m_pendingAdds.Dequeue(out pendingAdd)) if (m_pendingAdds != null)
m_packets[pendingAdd.SequenceNumber] = pendingAdd; {
while (m_pendingAdds.Dequeue(out pendingAdd))
{
if (pendingAdd != null && m_packets != null)
{
m_packets[pendingAdd.SequenceNumber] = pendingAdd;
}
}
}
// Process all the pending removes, including updating statistics and round-trip times // Process all the pending removes, including updating statistics and round-trip times
PendingAck pendingRemove; PendingAck pendingRemove;
OutgoingPacket ackedPacket; OutgoingPacket ackedPacket;
while (m_pendingRemoves.Dequeue(out pendingRemove)) if (m_pendingRemoves != null)
{ {
if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket)) while (m_pendingRemoves.Dequeue(out pendingRemove))
{ {
m_packets.Remove(pendingRemove.SequenceNumber); if (m_pendingRemoves != null && m_packets != null)
// Update stats
System.Threading.Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
if (!pendingRemove.FromResend)
{ {
// Calculate the round-trip time for this packet and its ACK if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount; {
if (rtt > 0) m_packets.Remove(pendingRemove.SequenceNumber);
ackedPacket.Client.UpdateRoundTrip(rtt);
// Update stats
System.Threading.Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
if (!pendingRemove.FromResend)
{
// Calculate the round-trip time for this packet and its ACK
int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
if (rtt > 0)
ackedPacket.Client.UpdateRoundTrip(rtt);
}
}
} }
} }
} }

View File

@ -101,7 +101,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
{ {
m_scene.ForEachScenePresence(delegate(ScenePresence presence) m_scene.ForEachScenePresence(delegate(ScenePresence presence)
{ {
presence.ControllingClient.SendAlertMessage(message); if (!presence.IsChildAgent)
{
presence.ControllingClient.SendAlertMessage(message);
}
}); });
} }

View File

@ -476,6 +476,7 @@ namespace OpenSim.Region.Framework.Scenes
part.IgnoreUndoUpdate = false; part.IgnoreUndoUpdate = false;
part.StoreUndoState(UndoType.STATE_GROUP_POSITION); part.StoreUndoState(UndoType.STATE_GROUP_POSITION);
part.GroupPosition = val; part.GroupPosition = val;
part.TriggerScriptChangedEvent(Changed.POSITION);
} }
foreach (ScenePresence av in m_linkedAvatars) foreach (ScenePresence av in m_linkedAvatars)
@ -1734,9 +1735,9 @@ namespace OpenSim.Region.Framework.Scenes
// don't backup while it's selected or you're asking for changes mid stream. // don't backup while it's selected or you're asking for changes mid stream.
if ((isTimeToPersist()) || (forcedBackup)) if ((isTimeToPersist()) || (forcedBackup))
{ {
m_log.DebugFormat( // m_log.DebugFormat(
"[SCENE]: Storing {0}, {1} in {2}", // "[SCENE]: Storing {0}, {1} in {2}",
Name, UUID, m_scene.RegionInfo.RegionName); // Name, UUID, m_scene.RegionInfo.RegionName);
SceneObjectGroup backup_group = Copy(false); SceneObjectGroup backup_group = Copy(false);
backup_group.RootPart.Velocity = RootPart.Velocity; backup_group.RootPart.Velocity = RootPart.Velocity;

View File

@ -60,7 +60,8 @@ namespace OpenSim.Region.Framework.Scenes
TELEPORT = 512, TELEPORT = 512,
REGION_RESTART = 1024, REGION_RESTART = 1024,
MEDIA = 2048, MEDIA = 2048,
ANIMATION = 16384 ANIMATION = 16384,
POSITION = 32768
} }
// I don't really know where to put this except here. // I don't really know where to put this except here.
@ -730,6 +731,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
} }
TriggerScriptChangedEvent(Changed.POSITION);
} }
} }

View File

@ -2007,13 +2007,14 @@ namespace OpenSim.Region.Framework.Scenes
if (autopilot) if (autopilot)
{ // its not a scripted sit { // its not a scripted sit
// if (Util.GetDistanceTo(AbsolutePosition, autopilotTarget) < 4.5) // if (Util.GetDistanceTo(AbsolutePosition, autopilotTarget) < 4.5)
if( (Math.Abs(AbsolutePosition.X - autopilotTarget.X) < 2.0f) && (Math.Abs(AbsolutePosition.Y - autopilotTarget.Y) < 2.0f) ) if( (Math.Abs(AbsolutePosition.X - autopilotTarget.X) < 10.0f) && (Math.Abs(AbsolutePosition.Y - autopilotTarget.Y) < 10.0f) )
{ {
autopilot = false; // close enough autopilot = false; // close enough
m_lastWorldPosition = m_pos; /* CW - This give us a position to return the avatar to if the part is killed before standup. m_lastWorldPosition = m_pos; /* CW - This give us a position to return the avatar to if the part is killed before standup.
Not using the part's position because returning the AV to the last known standing Not using the part's position because returning the AV to the last known standing
position is likely to be more friendly, isn't it? */ position is likely to be more friendly, isn't it? */
RemoveFromPhysicalScene(); RemoveFromPhysicalScene();
Velocity = Vector3.Zero;
AbsolutePosition = autopilotTarget + new Vector3(0.0f, 0.0f, (m_sitAvatarHeight / 2.0f)); // Warp av to over sit target AbsolutePosition = autopilotTarget + new Vector3(0.0f, 0.0f, (m_sitAvatarHeight / 2.0f)); // Warp av to over sit target
} // else the autopilot will get us close } // else the autopilot will get us close
} }
@ -2023,6 +2024,7 @@ namespace OpenSim.Region.Framework.Scenes
I *am* using the part's position this time because we have no real idea how far away I *am* using the part's position this time because we have no real idea how far away
the avatar is from the sit target. */ the avatar is from the sit target. */
RemoveFromPhysicalScene(); RemoveFromPhysicalScene();
Velocity = Vector3.Zero;
} }
} }
else return; // physactor is null! else return; // physactor is null!
@ -2442,9 +2444,9 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
Velocity = Vector3.Zero; Velocity = Vector3.Zero;
RemoveFromPhysicalScene(); RemoveFromPhysicalScene();
Animator.TrySetMovementAnimation(sitAnimation); Animator.TrySetMovementAnimation(sitAnimation);
SendFullUpdateToAllClients(); SendFullUpdateToAllClients();
SendTerseUpdateToAllClients();
} }
public void SitAltitudeCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 normal) public void SitAltitudeCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 normal)

View File

@ -279,6 +279,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int CHANGED_REGION_START = 1024; //LL Changed the constant from CHANGED_REGION_RESTART public const int CHANGED_REGION_START = 1024; //LL Changed the constant from CHANGED_REGION_RESTART
public const int CHANGED_MEDIA = 2048; public const int CHANGED_MEDIA = 2048;
public const int CHANGED_ANIMATION = 16384; public const int CHANGED_ANIMATION = 16384;
public const int CHANGED_POSITION = 32768;
public const int TYPE_INVALID = 0; public const int TYPE_INVALID = 0;
public const int TYPE_INTEGER = 1; public const int TYPE_INTEGER = 1;
public const int TYPE_FLOAT = 2; public const int TYPE_FLOAT = 2;

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
<configuration>
<dllmap dll="hdfsdll" target="./hdfsdll.so" />
</configuration>

Binary file not shown.

Binary file not shown.