* Optimized sending of terrain data
* Send terrain data in a spiral pattern instead of a typewriter pattern (placeholder until terrain data becomes part of the interest list management) * Added a debug line when resent packets are being sentprioritization
parent
fdce1be3db
commit
0a6ea33ac8
|
@ -45,7 +45,7 @@ using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Framework.Scenes.Hypergrid;
|
using OpenSim.Region.Framework.Scenes.Hypergrid;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using Timer=System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
using AssetLandmark = OpenSim.Framework.AssetLandmark;
|
using AssetLandmark = OpenSim.Framework.AssetLandmark;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
protected UUID m_activeGroupID;
|
protected UUID m_activeGroupID;
|
||||||
protected string m_activeGroupName = String.Empty;
|
protected string m_activeGroupName = String.Empty;
|
||||||
protected ulong m_activeGroupPowers;
|
protected ulong m_activeGroupPowers;
|
||||||
protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>();
|
protected Dictionary<UUID, ulong> m_groupPowers = new Dictionary<UUID, ulong>();
|
||||||
protected int m_terrainCheckerCount;
|
protected int m_terrainCheckerCount;
|
||||||
protected uint m_agentFOVCounter;
|
protected uint m_agentFOVCounter;
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sound
|
// Sound
|
||||||
public void SoundTrigger(UUID soundId, UUID owerid, UUID Objectid,UUID ParentId,float Gain, Vector3 Position,UInt64 Handle)
|
public void SoundTrigger(UUID soundId, UUID owerid, UUID Objectid, UUID ParentId, float Gain, Vector3 Position, UInt64 Handle)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -658,7 +658,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
handshake.RegionInfo.CacheID = UUID.Random(); //I guess this is for the client to remember an old setting?
|
handshake.RegionInfo.CacheID = UUID.Random(); //I guess this is for the client to remember an old setting?
|
||||||
handshake.RegionInfo2 = new RegionHandshakePacket.RegionInfo2Block();
|
handshake.RegionInfo2 = new RegionHandshakePacket.RegionInfo2Block();
|
||||||
handshake.RegionInfo2.RegionID = regionInfo.RegionID;
|
handshake.RegionInfo2.RegionID = regionInfo.RegionID;
|
||||||
|
|
||||||
handshake.RegionInfo3 = new RegionHandshakePacket.RegionInfo3Block();
|
handshake.RegionInfo3 = new RegionHandshakePacket.RegionInfo3Block();
|
||||||
handshake.RegionInfo3.CPUClassID = 9;
|
handshake.RegionInfo3.CPUClassID = 9;
|
||||||
handshake.RegionInfo3.CPURatio = 1;
|
handshake.RegionInfo3.CPURatio = 1;
|
||||||
|
@ -800,32 +800,55 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// <param name="o"></param>
|
/// <param name="o"></param>
|
||||||
private void DoSendLayerData(object o)
|
private void DoSendLayerData(object o)
|
||||||
{
|
{
|
||||||
float[] map = (float[])o;
|
float[] map = LLHeightFieldMoronize((float[])o);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
for (int y = 0; y < 16; y++)
|
//for (int y = 0; y < 16; y++)
|
||||||
{
|
//{
|
||||||
// For some terrains, sending more than one terrain patch at once results in a libsecondlife exception
|
// for (int x = 0; x < 16; x++)
|
||||||
// see http://opensimulator.org/mantis/view.php?id=1662
|
// {
|
||||||
//for (int x = 0; x < 16; x += 4)
|
// SendLayerData(x, y, map);
|
||||||
//{
|
// }
|
||||||
// SendLayerPacket(map, y, x);
|
//}
|
||||||
// Thread.Sleep(150);
|
|
||||||
//}
|
// Send LayerData in a spiral pattern. Fun!
|
||||||
for (int x = 0; x < 16; x++)
|
SendLayerTopRight(map, 0, 0, 15, 15);
|
||||||
{
|
|
||||||
SendLayerData(x, y, LLHeightFieldMoronize(map));
|
|
||||||
Thread.Sleep(35);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.Warn("[CLIENT]: ClientView.API.cs: SendLayerData() - Failed with exception " + e);
|
m_log.Error("[CLIENT]: SendLayerData() Failed with exception: " + e.Message, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SendLayerTopRight(float[] map, int x1, int y1, int x2, int y2)
|
||||||
|
{
|
||||||
|
// Row
|
||||||
|
for (int i = x1; i <= x2; i++)
|
||||||
|
SendLayerData(i, y1, map);
|
||||||
|
|
||||||
|
// Column
|
||||||
|
for (int j = y1 + 1; j <= y2; j++)
|
||||||
|
SendLayerData(x2, j, map);
|
||||||
|
|
||||||
|
if (x2 - x1 > 0)
|
||||||
|
SendLayerBottomLeft(map, x1, y1 + 1, x2 - 1, y2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SendLayerBottomLeft(float[] map, int x1, int y1, int x2, int y2)
|
||||||
|
{
|
||||||
|
// Row in reverse
|
||||||
|
for (int i = x2; i >= x1; i--)
|
||||||
|
SendLayerData(i, y2, map);
|
||||||
|
|
||||||
|
// Column in reverse
|
||||||
|
for (int j = y2 - 1; j >= y1; j--)
|
||||||
|
SendLayerData(x1, j, map);
|
||||||
|
|
||||||
|
if (x2 - x1 > 0)
|
||||||
|
SendLayerTopRight(map, x1 + 1, y1, x2, y2 - 1);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sends a set of four patches (x, x+1, ..., x+3) to the client
|
/// Sends a set of four patches (x, x+1, ..., x+3) to the client
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -854,22 +877,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int[] patches = new int[1];
|
int[] patches = new int[] { py * 16 + px };
|
||||||
int patchx, patchy;
|
float[] heightmap = (map.Length == 65536) ?
|
||||||
patchx = px;
|
map :
|
||||||
patchy = py;
|
LLHeightFieldMoronize(map);
|
||||||
|
|
||||||
patches[0] = patchx + 0 + patchy * 16;
|
LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(heightmap, patches);
|
||||||
|
layerpack.Header.Reliable = true;
|
||||||
LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(((map.Length==65536)? map : LLHeightFieldMoronize(map)), patches);
|
|
||||||
layerpack.Header.Zerocoded = true;
|
|
||||||
|
|
||||||
OutPacket(layerpack, ThrottleOutPacketType.Land);
|
OutPacket(layerpack, ThrottleOutPacketType.Land);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.Warn("[client]: ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString());
|
m_log.Error("[CLIENT]: SendLayerData() Failed with exception: " + e.Message, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -898,7 +918,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
Array.Copy(map, i * (int)Constants.RegionSize, returnmap, i * 256, 256);
|
Array.Copy(map, i * (int)Constants.RegionSize, returnmap, i * 256, 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Array.Copy(map,0,returnmap,0,(map.Length < 65536)? map.Length : 65536);
|
//Array.Copy(map,0,returnmap,0,(map.Length < 65536)? map.Length : 65536);
|
||||||
|
|
||||||
return returnmap;
|
return returnmap;
|
||||||
|
@ -1010,14 +1029,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
agentData.child = false;
|
agentData.child = false;
|
||||||
agentData.firstname = m_firstName;
|
agentData.firstname = m_firstName;
|
||||||
agentData.lastname = m_lastName;
|
agentData.lastname = m_lastName;
|
||||||
|
|
||||||
ICapabilitiesModule capsModule = m_scene.RequestModuleInterface<ICapabilitiesModule>();
|
ICapabilitiesModule capsModule = m_scene.RequestModuleInterface<ICapabilitiesModule>();
|
||||||
|
|
||||||
if (capsModule == null) // can happen when shutting down.
|
if (capsModule == null) // can happen when shutting down.
|
||||||
return agentData;
|
return agentData;
|
||||||
|
|
||||||
agentData.CapsPath = capsModule.GetCapsPath(m_agentId);
|
agentData.CapsPath = capsModule.GetCapsPath(m_agentId);
|
||||||
agentData.ChildrenCapSeeds = new Dictionary<ulong,string>(capsModule.GetChildrenSeeds(m_agentId));
|
agentData.ChildrenCapSeeds = new Dictionary<ulong, string>(capsModule.GetChildrenSeeds(m_agentId));
|
||||||
|
|
||||||
return agentData;
|
return agentData;
|
||||||
}
|
}
|
||||||
|
@ -1213,7 +1232,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
pc.PingID.PingID = seq;
|
pc.PingID.PingID = seq;
|
||||||
pc.PingID.OldestUnacked = (oldestPacket != null) ? oldestPacket.SequenceNumber : 0;
|
pc.PingID.OldestUnacked = (oldestPacket != null) ? oldestPacket.SequenceNumber : 0;
|
||||||
|
|
||||||
OutPacket(pc, ThrottleOutPacketType.Unknown);
|
OutPacket(pc, ThrottleOutPacketType.Unknown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1519,7 +1538,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
inventoryReply.Header.Zerocoded = true;
|
inventoryReply.Header.Zerocoded = true;
|
||||||
OutPacket(inventoryReply, ThrottleOutPacketType.Asset);
|
OutPacket(inventoryReply, ThrottleOutPacketType.Asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase)
|
protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase)
|
||||||
{
|
{
|
||||||
// We will use the same transaction id for all the separate packets to be sent out in this update.
|
// We will use the same transaction id for all the separate packets to be sent out in this update.
|
||||||
|
@ -1543,7 +1562,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
bulkUpdate.FolderData = folderDataBlocks.ToArray();
|
bulkUpdate.FolderData = folderDataBlocks.ToArray();
|
||||||
List<BulkUpdateInventoryPacket.ItemDataBlock> foo = new List<BulkUpdateInventoryPacket.ItemDataBlock>();
|
List<BulkUpdateInventoryPacket.ItemDataBlock> foo = new List<BulkUpdateInventoryPacket.ItemDataBlock>();
|
||||||
bulkUpdate.ItemData = foo.ToArray();
|
bulkUpdate.ItemData = foo.ToArray();
|
||||||
|
|
||||||
//m_log.Debug("SendBulkUpdateInventory :" + bulkUpdate);
|
//m_log.Debug("SendBulkUpdateInventory :" + bulkUpdate);
|
||||||
OutPacket(bulkUpdate, ThrottleOutPacketType.Asset);
|
OutPacket(bulkUpdate, ThrottleOutPacketType.Asset);
|
||||||
}
|
}
|
||||||
|
@ -1666,7 +1685,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
return itemBlock;
|
return itemBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendBulkUpdateInventory(InventoryNodeBase node)
|
public void SendBulkUpdateInventory(InventoryNodeBase node)
|
||||||
{
|
{
|
||||||
if (node is InventoryItemBase)
|
if (node is InventoryItemBase)
|
||||||
|
@ -1676,7 +1695,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
else
|
else
|
||||||
m_log.ErrorFormat("[CLIENT]: Client for {0} sent unknown inventory node named {1}", Name, node.Name);
|
m_log.ErrorFormat("[CLIENT]: Client for {0} sent unknown inventory node named {1}", Name, node.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void SendBulkUpdateInventoryItem(InventoryItemBase item)
|
protected void SendBulkUpdateInventoryItem(InventoryItemBase item)
|
||||||
{
|
{
|
||||||
const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All;
|
const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All;
|
||||||
|
@ -3100,9 +3119,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
awb.ItemID = wearables[i].ItemID;
|
awb.ItemID = wearables[i].ItemID;
|
||||||
aw.WearableData[i] = awb;
|
aw.WearableData[i] = awb;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
|
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
|
||||||
// awb.ItemID, awb.AssetID, i, Name);
|
// awb.ItemID, awb.AssetID, i, Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
OutPacket(aw, ThrottleOutPacketType.Task);
|
OutPacket(aw, ThrottleOutPacketType.Task);
|
||||||
|
@ -3270,7 +3289,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
objupdate.RegionData.RegionHandle = data.RegionHandle;
|
objupdate.RegionData.RegionHandle = data.RegionHandle;
|
||||||
objupdate.RegionData.TimeDilation = ushort.MaxValue;
|
objupdate.RegionData.TimeDilation = ushort.MaxValue;
|
||||||
|
|
||||||
objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
|
objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
|
||||||
objupdate.ObjectData[0] = CreateAvatarUpdateBlock(data);
|
objupdate.ObjectData[0] = CreateAvatarUpdateBlock(data);
|
||||||
|
|
||||||
|
@ -3343,7 +3362,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
CoarseLocationUpdatePacket.LocationBlock lb =
|
CoarseLocationUpdatePacket.LocationBlock lb =
|
||||||
new CoarseLocationUpdatePacket.LocationBlock();
|
new CoarseLocationUpdatePacket.LocationBlock();
|
||||||
|
|
||||||
lb.X = (byte)CoarseLocations[i].X;
|
lb.X = (byte)CoarseLocations[i].X;
|
||||||
lb.Y = (byte)CoarseLocations[i].Y;
|
lb.Y = (byte)CoarseLocations[i].Y;
|
||||||
|
|
||||||
|
@ -3620,7 +3639,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
newPack.Header.Zerocoded = true;
|
newPack.Header.Zerocoded = true;
|
||||||
OutPacket(newPack, ThrottleOutPacketType.Asset);
|
OutPacket(newPack, ThrottleOutPacketType.Asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendInitiateDownload(string simFileName, string clientFileName)
|
public void SendInitiateDownload(string simFileName, string clientFileName)
|
||||||
{
|
{
|
||||||
InitiateDownloadPacket newPack = new InitiateDownloadPacket();
|
InitiateDownloadPacket newPack = new InitiateDownloadPacket();
|
||||||
|
@ -3629,7 +3648,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
newPack.FileData.ViewerFilename = Utils.StringToBytes(clientFileName);
|
newPack.FileData.ViewerFilename = Utils.StringToBytes(clientFileName);
|
||||||
OutPacket(newPack, ThrottleOutPacketType.Asset);
|
OutPacket(newPack, ThrottleOutPacketType.Asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendImageFirstPart(
|
public void SendImageFirstPart(
|
||||||
ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
|
ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
|
||||||
{
|
{
|
||||||
|
@ -3817,7 +3836,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID)
|
public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID)
|
||||||
{
|
{
|
||||||
List<UUID>BannedUsers = new List<UUID>();
|
List<UUID> BannedUsers = new List<UUID>();
|
||||||
|
|
||||||
for (int i = 0; i < bl.Length; i++)
|
for (int i = 0; i < bl.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -3881,7 +3900,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
rinfoblk.UseEstateSun = args.useEstateSun;
|
rinfoblk.UseEstateSun = args.useEstateSun;
|
||||||
rinfoblk.WaterHeight = args.waterHeight;
|
rinfoblk.WaterHeight = args.waterHeight;
|
||||||
rinfoblk.SimName = Utils.StringToBytes(args.simName);
|
rinfoblk.SimName = Utils.StringToBytes(args.simName);
|
||||||
|
|
||||||
rinfopack.RegionInfo2 = new RegionInfoPacket.RegionInfo2Block();
|
rinfopack.RegionInfo2 = new RegionInfoPacket.RegionInfo2Block();
|
||||||
rinfopack.RegionInfo2.HardMaxAgents = uint.MaxValue;
|
rinfopack.RegionInfo2.HardMaxAgents = uint.MaxValue;
|
||||||
rinfopack.RegionInfo2.HardMaxObjects = uint.MaxValue;
|
rinfopack.RegionInfo2.HardMaxObjects = uint.MaxValue;
|
||||||
|
@ -4128,7 +4147,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount)
|
public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
int notifyCount = ownersAndCount.Count;
|
int notifyCount = ownersAndCount.Count;
|
||||||
ParcelObjectOwnersReplyPacket pack = (ParcelObjectOwnersReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelObjectOwnersReply);
|
ParcelObjectOwnersReplyPacket pack = (ParcelObjectOwnersReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelObjectOwnersReply);
|
||||||
|
@ -4208,7 +4227,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (collisionPlane == Vector4.Zero)
|
if (collisionPlane == Vector4.Zero)
|
||||||
collisionPlane = Vector4.UnitW;
|
collisionPlane = Vector4.UnitW;
|
||||||
|
|
||||||
collisionPlane.ToBytes(data, pos);
|
collisionPlane.ToBytes(data, pos);
|
||||||
pos += 16;
|
pos += 16;
|
||||||
}
|
}
|
||||||
|
@ -4297,7 +4316,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
update.TextureAnim = Utils.EmptyBytes;
|
update.TextureAnim = Utils.EmptyBytes;
|
||||||
update.TextureEntry = data.TextureEntry ?? Utils.EmptyBytes;
|
update.TextureEntry = data.TextureEntry ?? Utils.EmptyBytes;
|
||||||
update.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24); // TODO: Replace these numbers with PrimFlags
|
update.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24); // TODO: Replace these numbers with PrimFlags
|
||||||
|
|
||||||
return update;
|
return update;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4448,7 +4467,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
private bool HandleMoneyTransferRequest(IClientAPI sender, Packet Pack)
|
private bool HandleMoneyTransferRequest(IClientAPI sender, Packet Pack)
|
||||||
{
|
{
|
||||||
MoneyTransferRequestPacket money = (MoneyTransferRequestPacket) Pack;
|
MoneyTransferRequestPacket money = (MoneyTransferRequestPacket)Pack;
|
||||||
// validate the agent owns the agentID and sessionID
|
// validate the agent owns the agentID and sessionID
|
||||||
if (money.MoneyData.SourceID == sender.AgentId && money.AgentData.AgentID == sender.AgentId &&
|
if (money.MoneyData.SourceID == sender.AgentId && money.AgentData.AgentID == sender.AgentId &&
|
||||||
money.AgentData.SessionID == sender.SessionId)
|
money.AgentData.SessionID == sender.SessionId)
|
||||||
|
@ -4469,7 +4488,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack)
|
private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack)
|
||||||
{
|
{
|
||||||
ParcelBuyPacket parcel = (ParcelBuyPacket) Pack;
|
ParcelBuyPacket parcel = (ParcelBuyPacket)Pack;
|
||||||
if (parcel.AgentData.AgentID == AgentId && parcel.AgentData.SessionID == SessionId)
|
if (parcel.AgentData.AgentID == AgentId && parcel.AgentData.SessionID == SessionId)
|
||||||
{
|
{
|
||||||
ParcelBuy handlerParcelBuy = OnParcelBuy;
|
ParcelBuy handlerParcelBuy = OnParcelBuy;
|
||||||
|
@ -4489,7 +4508,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
private bool HandleUUIDGroupNameRequest(IClientAPI sender, Packet Pack)
|
private bool HandleUUIDGroupNameRequest(IClientAPI sender, Packet Pack)
|
||||||
{
|
{
|
||||||
UUIDGroupNameRequestPacket upack = (UUIDGroupNameRequestPacket)Pack;
|
UUIDGroupNameRequestPacket upack = (UUIDGroupNameRequestPacket)Pack;
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < upack.UUIDNameBlock.Length; i++)
|
for (int i = 0; i < upack.UUIDNameBlock.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -4505,7 +4524,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public bool HandleGenericMessage(IClientAPI sender, Packet pack)
|
public bool HandleGenericMessage(IClientAPI sender, Packet pack)
|
||||||
{
|
{
|
||||||
GenericMessagePacket gmpack = (GenericMessagePacket) pack;
|
GenericMessagePacket gmpack = (GenericMessagePacket)pack;
|
||||||
if (m_genericPacketHandlers.Count == 0) return false;
|
if (m_genericPacketHandlers.Count == 0) return false;
|
||||||
if (gmpack.AgentData.SessionID != SessionId) return false;
|
if (gmpack.AgentData.SessionID != SessionId) return false;
|
||||||
|
|
||||||
|
@ -4642,7 +4661,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
if (((LogoutRequestPacket)packet).AgentData.SessionID != SessionId) return false;
|
if (((LogoutRequestPacket)packet).AgentData.SessionID != SessionId) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Logout(client);
|
return Logout(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4700,7 +4719,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
cachedresp.Header.Zerocoded = true;
|
cachedresp.Header.Zerocoded = true;
|
||||||
OutPacket(cachedresp, ThrottleOutPacketType.Task);
|
OutPacket(cachedresp, ThrottleOutPacketType.Task);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4750,7 +4769,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
UpdatePrimSingleRotation handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation;
|
UpdatePrimSingleRotation handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation;
|
||||||
if (handlerUpdatePrimSingleRotation != null)
|
if (handlerUpdatePrimSingleRotation != null)
|
||||||
{
|
{
|
||||||
// m_log.Info("new tab rotation is " + rot1.X + " , " + rot1.Y + " , " + rot1.Z + " , " + rot1.W);
|
// m_log.Info("new tab rotation is " + rot1.X + " , " + rot1.Y + " , " + rot1.Z + " , " + rot1.W);
|
||||||
handlerUpdatePrimSingleRotation(localId, rot1, this);
|
handlerUpdatePrimSingleRotation(localId, rot1, this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4761,8 +4780,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
UpdatePrimSingleRotationPosition handlerUpdatePrimSingleRotationPosition = OnUpdatePrimSingleRotationPosition;
|
UpdatePrimSingleRotationPosition handlerUpdatePrimSingleRotationPosition = OnUpdatePrimSingleRotationPosition;
|
||||||
if (handlerUpdatePrimSingleRotationPosition != null)
|
if (handlerUpdatePrimSingleRotationPosition != null)
|
||||||
{
|
{
|
||||||
// m_log.Debug("new mouse rotation position is " + rotPos.X + " , " + rotPos.Y + " , " + rotPos.Z);
|
// m_log.Debug("new mouse rotation position is " + rotPos.X + " , " + rotPos.Y + " , " + rotPos.Z);
|
||||||
// m_log.Info("new mouse rotation is " + rot2.X + " , " + rot2.Y + " , " + rot2.Z + " , " + rot2.W);
|
// m_log.Info("new mouse rotation is " + rot2.X + " , " + rot2.Y + " , " + rot2.Z + " , " + rot2.W);
|
||||||
handlerUpdatePrimSingleRotationPosition(localId, rot2, rotPos, this);
|
handlerUpdatePrimSingleRotationPosition(localId, rot2, rotPos, this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4773,7 +4792,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
UpdateVector handlerUpdatePrimScale = OnUpdatePrimScale;
|
UpdateVector handlerUpdatePrimScale = OnUpdatePrimScale;
|
||||||
if (handlerUpdatePrimScale != null)
|
if (handlerUpdatePrimScale != null)
|
||||||
{
|
{
|
||||||
// m_log.Debug("new scale is " + scale4.X + " , " + scale4.Y + " , " + scale4.Z);
|
// m_log.Debug("new scale is " + scale4.X + " , " + scale4.Y + " , " + scale4.Z);
|
||||||
handlerUpdatePrimScale(localId, scale4, this);
|
handlerUpdatePrimScale(localId, scale4, this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4812,7 +4831,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation;
|
UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation;
|
||||||
if (handlerUpdatePrimRotation != null)
|
if (handlerUpdatePrimRotation != null)
|
||||||
{
|
{
|
||||||
// Console.WriteLine("new rotation is " + rot3.X + " , " + rot3.Y + " , " + rot3.Z + " , " + rot3.W);
|
// Console.WriteLine("new rotation is " + rot3.X + " , " + rot3.Y + " , " + rot3.Z + " , " + rot3.W);
|
||||||
handlerUpdatePrimRotation(localId, rot3, this);
|
handlerUpdatePrimRotation(localId, rot3, this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4823,8 +4842,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation;
|
handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation;
|
||||||
if (handlerUpdatePrimGroupRotation != null)
|
if (handlerUpdatePrimGroupRotation != null)
|
||||||
{
|
{
|
||||||
// m_log.Debug("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
|
// m_log.Debug("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
|
||||||
// m_log.Debug("new group mouse rotation is " + rot4.X + " , " + rot4.Y + " , " + rot4.Z + " , " + rot4.W);
|
// m_log.Debug("new group mouse rotation is " + rot4.X + " , " + rot4.Y + " , " + rot4.Z + " , " + rot4.W);
|
||||||
handlerUpdatePrimGroupRotation(localId, pos3, rot4, this);
|
handlerUpdatePrimGroupRotation(localId, pos3, rot4, this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4835,7 +4854,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
UpdateVector handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
|
UpdateVector handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
|
||||||
if (handlerUpdatePrimGroupScale != null)
|
if (handlerUpdatePrimGroupScale != null)
|
||||||
{
|
{
|
||||||
// m_log.Debug("new scale is " + scale7.X + " , " + scale7.Y + " , " + scale7.Z);
|
// m_log.Debug("new scale is " + scale7.X + " , " + scale7.Y + " , " + scale7.Z);
|
||||||
handlerUpdatePrimGroupScale(localId, scale7, this);
|
handlerUpdatePrimGroupScale(localId, scale7, this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -5067,7 +5086,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// Main packet processing conditional
|
// Main packet processing conditional
|
||||||
switch (Pack.Type)
|
switch (Pack.Type)
|
||||||
{
|
{
|
||||||
#region Scene/Avatar
|
#region Scene/Avatar
|
||||||
|
|
||||||
case PacketType.AvatarPropertiesRequest:
|
case PacketType.AvatarPropertiesRequest:
|
||||||
AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
|
AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
|
||||||
|
@ -5318,7 +5337,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.DeRezObject:
|
case PacketType.DeRezObject:
|
||||||
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) Pack;
|
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)Pack;
|
||||||
|
|
||||||
#region Packet Session and User Check
|
#region Packet Session and User Check
|
||||||
if (m_checkPackets)
|
if (m_checkPackets)
|
||||||
|
@ -5339,13 +5358,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
deRezIDs.Add(data.ObjectLocalID);
|
deRezIDs.Add(data.ObjectLocalID);
|
||||||
}
|
}
|
||||||
// It just so happens that the values on the DeRezAction enumerator match the Destination
|
// It just so happens that the values on the DeRezAction enumerator match the Destination
|
||||||
// values given by a Second Life client
|
// values given by a Second Life client
|
||||||
handlerDeRezObject(this, deRezIDs,
|
handlerDeRezObject(this, deRezIDs,
|
||||||
DeRezPacket.AgentBlock.GroupID,
|
DeRezPacket.AgentBlock.GroupID,
|
||||||
(DeRezAction)DeRezPacket.AgentBlock.Destination,
|
(DeRezAction)DeRezPacket.AgentBlock.Destination,
|
||||||
DeRezPacket.AgentBlock.DestinationID);
|
DeRezPacket.AgentBlock.DestinationID);
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -5449,7 +5468,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.AgentIsNowWearing:
|
case PacketType.AgentIsNowWearing:
|
||||||
if (OnAvatarNowWearing != null)
|
if (OnAvatarNowWearing != null)
|
||||||
{
|
{
|
||||||
|
@ -5653,7 +5672,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (lastarg != null)
|
if (lastarg != null)
|
||||||
{
|
{
|
||||||
update =
|
update =
|
||||||
(
|
(
|
||||||
(x.BodyRotation != lastarg.BodyRotation) ||
|
(x.BodyRotation != lastarg.BodyRotation) ||
|
||||||
(x.CameraAtAxis != lastarg.CameraAtAxis) ||
|
(x.CameraAtAxis != lastarg.CameraAtAxis) ||
|
||||||
|
@ -5846,7 +5865,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.UserInfoRequest:
|
case PacketType.UserInfoRequest:
|
||||||
UserInfoRequest handlerUserInfoRequest = OnUserInfoRequest;
|
UserInfoRequest handlerUserInfoRequest = OnUserInfoRequest;
|
||||||
if (handlerUserInfoRequest != null)
|
if (handlerUserInfoRequest != null)
|
||||||
|
@ -5858,7 +5877,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
SendUserInfoReply(false, true, "");
|
SendUserInfoReply(false, true, "");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.UpdateUserInfo:
|
case PacketType.UpdateUserInfo:
|
||||||
UpdateUserInfoPacket updateUserInfo = (UpdateUserInfoPacket)Pack;
|
UpdateUserInfoPacket updateUserInfo = (UpdateUserInfoPacket)Pack;
|
||||||
|
|
||||||
|
@ -5885,7 +5904,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
visible, this);
|
visible, this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.SetStartLocationRequest:
|
case PacketType.SetStartLocationRequest:
|
||||||
SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack;
|
SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack;
|
||||||
|
|
||||||
|
@ -5943,9 +5962,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Objects/m_sceneObjects
|
#region Objects/m_sceneObjects
|
||||||
|
|
||||||
case PacketType.ObjectLink:
|
case PacketType.ObjectLink:
|
||||||
ObjectLinkPacket link = (ObjectLinkPacket)Pack;
|
ObjectLinkPacket link = (ObjectLinkPacket)Pack;
|
||||||
|
@ -5976,7 +5995,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
handlerLinkObjects(this, parentprimid, childrenprims);
|
handlerLinkObjects(this, parentprimid, childrenprims);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.ObjectDelink:
|
case PacketType.ObjectDelink:
|
||||||
ObjectDelinkPacket delink = (ObjectDelinkPacket)Pack;
|
ObjectDelinkPacket delink = (ObjectDelinkPacket)Pack;
|
||||||
|
|
||||||
|
@ -6005,7 +6024,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.ObjectAdd:
|
case PacketType.ObjectAdd:
|
||||||
if (OnAddPrim != null)
|
if (OnAddPrim != null)
|
||||||
{
|
{
|
||||||
|
@ -6035,7 +6054,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
handlerAddPrim(AgentId, ActiveGroupId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection);
|
handlerAddPrim(AgentId, ActiveGroupId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.ObjectShape:
|
case PacketType.ObjectShape:
|
||||||
ObjectShapePacket shapePacket = (ObjectShapePacket)Pack;
|
ObjectShapePacket shapePacket = (ObjectShapePacket)Pack;
|
||||||
|
|
||||||
|
@ -6080,7 +6099,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.ObjectExtraParams:
|
case PacketType.ObjectExtraParams:
|
||||||
ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket)Pack;
|
ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket)Pack;
|
||||||
|
|
||||||
|
@ -6096,7 +6115,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
ObjectExtraParams handlerUpdateExtraParams = OnUpdateExtraParams;
|
ObjectExtraParams handlerUpdateExtraParams = OnUpdateExtraParams;
|
||||||
if (handlerUpdateExtraParams != null)
|
if (handlerUpdateExtraParams != null)
|
||||||
{
|
{
|
||||||
for (int i = 0 ; i < extraPar.ObjectData.Length ; i++)
|
for (int i = 0; i < extraPar.ObjectData.Length; i++)
|
||||||
{
|
{
|
||||||
handlerUpdateExtraParams(m_agentId, extraPar.ObjectData[i].ObjectLocalID,
|
handlerUpdateExtraParams(m_agentId, extraPar.ObjectData[i].ObjectLocalID,
|
||||||
extraPar.ObjectData[i].ParamType,
|
extraPar.ObjectData[i].ParamType,
|
||||||
|
@ -6497,7 +6516,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
break;
|
break;
|
||||||
case PacketType.ObjectName:
|
case PacketType.ObjectName:
|
||||||
ObjectNamePacket objName = (ObjectNamePacket)Pack;
|
ObjectNamePacket objName = (ObjectNamePacket)Pack;
|
||||||
|
|
||||||
#region Packet Session and User Check
|
#region Packet Session and User Check
|
||||||
if (m_checkPackets)
|
if (m_checkPackets)
|
||||||
{
|
{
|
||||||
|
@ -6506,7 +6525,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
GenericCall7 handlerObjectName = null;
|
GenericCall7 handlerObjectName = null;
|
||||||
for (int i = 0; i < objName.ObjectData.Length; i++)
|
for (int i = 0; i < objName.ObjectData.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -6739,14 +6758,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Inventory/Asset/Other related packets
|
#region Inventory/Asset/Other related packets
|
||||||
|
|
||||||
case PacketType.RequestImage:
|
case PacketType.RequestImage:
|
||||||
RequestImagePacket imageRequest = (RequestImagePacket)Pack;
|
RequestImagePacket imageRequest = (RequestImagePacket)Pack;
|
||||||
//m_log.Debug("image request: " + Pack.ToString());
|
//m_log.Debug("image request: " + Pack.ToString());
|
||||||
|
|
||||||
#region Packet Session and User Check
|
#region Packet Session and User Check
|
||||||
if (m_checkPackets)
|
if (m_checkPackets)
|
||||||
{
|
{
|
||||||
|
@ -6770,7 +6789,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//handlerTextureRequest = OnRequestTexture;
|
//handlerTextureRequest = OnRequestTexture;
|
||||||
|
|
||||||
//if (handlerTextureRequest != null)
|
//if (handlerTextureRequest != null)
|
||||||
//OnRequestTexture(this, args);
|
//OnRequestTexture(this, args);
|
||||||
|
|
||||||
// in the end, we null this, so we have to check if it's null
|
// in the end, we null this, so we have to check if it's null
|
||||||
if (m_imageManager != null)
|
if (m_imageManager != null)
|
||||||
|
@ -6816,7 +6835,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (ti.OwnerID != AgentId)
|
if (ti.OwnerID != AgentId)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
|
if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (ti.AssetID != requestID)
|
if (ti.AssetID != requestID)
|
||||||
|
@ -6874,7 +6893,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
case PacketType.AssetUploadRequest:
|
case PacketType.AssetUploadRequest:
|
||||||
AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
|
AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
|
||||||
|
|
||||||
|
|
||||||
// m_log.Debug("upload request " + request.ToString());
|
// m_log.Debug("upload request " + request.ToString());
|
||||||
// m_log.Debug("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
|
// m_log.Debug("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
|
||||||
UUID temp = UUID.Combine(request.AssetBlock.TransactionID, SecureSessionId);
|
UUID temp = UUID.Combine(request.AssetBlock.TransactionID, SecureSessionId);
|
||||||
|
@ -6891,7 +6910,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
break;
|
break;
|
||||||
case PacketType.RequestXfer:
|
case PacketType.RequestXfer:
|
||||||
RequestXferPacket xferReq = (RequestXferPacket)Pack;
|
RequestXferPacket xferReq = (RequestXferPacket)Pack;
|
||||||
|
|
||||||
RequestXfer handlerRequestXfer = OnRequestXfer;
|
RequestXfer handlerRequestXfer = OnRequestXfer;
|
||||||
|
|
||||||
if (handlerRequestXfer != null)
|
if (handlerRequestXfer != null)
|
||||||
|
@ -6910,7 +6929,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
break;
|
break;
|
||||||
case PacketType.ConfirmXferPacket:
|
case PacketType.ConfirmXferPacket:
|
||||||
ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack;
|
ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack;
|
||||||
|
|
||||||
ConfirmXfer handlerConfirmXfer = OnConfirmXfer;
|
ConfirmXfer handlerConfirmXfer = OnConfirmXfer;
|
||||||
if (handlerConfirmXfer != null)
|
if (handlerConfirmXfer != null)
|
||||||
{
|
{
|
||||||
|
@ -7005,7 +7024,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
break;
|
break;
|
||||||
case PacketType.CreateInventoryItem:
|
case PacketType.CreateInventoryItem:
|
||||||
CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack;
|
CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack;
|
||||||
|
|
||||||
#region Packet Session and User Check
|
#region Packet Session and User Check
|
||||||
if (m_checkPackets)
|
if (m_checkPackets)
|
||||||
{
|
{
|
||||||
|
@ -7098,7 +7117,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
break;
|
break;
|
||||||
case PacketType.UpdateInventoryItem:
|
case PacketType.UpdateInventoryItem:
|
||||||
UpdateInventoryItemPacket inventoryItemUpdate = (UpdateInventoryItemPacket)Pack;
|
UpdateInventoryItemPacket inventoryItemUpdate = (UpdateInventoryItemPacket)Pack;
|
||||||
|
|
||||||
#region Packet Session and User Check
|
#region Packet Session and User Check
|
||||||
if (m_checkPackets)
|
if (m_checkPackets)
|
||||||
{
|
{
|
||||||
|
@ -7590,7 +7609,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
case PacketType.UUIDNameRequest:
|
case PacketType.UUIDNameRequest:
|
||||||
UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
|
UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
|
||||||
|
@ -7605,7 +7624,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#region Parcel related packets
|
#region Parcel related packets
|
||||||
|
|
||||||
case PacketType.RegionHandleRequest:
|
case PacketType.RegionHandleRequest:
|
||||||
RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
|
RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
|
||||||
|
@ -7986,9 +8005,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Estate Packets
|
#region Estate Packets
|
||||||
|
|
||||||
case PacketType.EstateOwnerMessage:
|
case PacketType.EstateOwnerMessage:
|
||||||
EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
|
EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
|
||||||
|
@ -8022,21 +8041,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter));
|
convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// case "texturebase":
|
// case "texturebase":
|
||||||
// if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
// if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||||
// {
|
// {
|
||||||
// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
|
// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
|
||||||
// {
|
// {
|
||||||
// string s = Utils.BytesToString(block.Parameter);
|
// string s = Utils.BytesToString(block.Parameter);
|
||||||
// string[] splitField = s.Split(' ');
|
// string[] splitField = s.Split(' ');
|
||||||
// if (splitField.Length == 2)
|
// if (splitField.Length == 2)
|
||||||
// {
|
// {
|
||||||
// UUID tempUUID = new UUID(splitField[1]);
|
// UUID tempUUID = new UUID(splitField[1]);
|
||||||
// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
|
// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// break;
|
// break;
|
||||||
case "texturedetail":
|
case "texturedetail":
|
||||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||||
{
|
{
|
||||||
|
@ -8278,7 +8297,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_log.Error("EstateOwnerMessage: Unknown method requested\n" + messagePacket);
|
m_log.Error("EstateOwnerMessage: Unknown method requested\n" + messagePacket);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//int parcelID, uint reportType, uint requestflags, string filter
|
//int parcelID, uint reportType, uint requestflags, string filter
|
||||||
|
|
||||||
//lsrp.RequestData.ParcelLocalID;
|
//lsrp.RequestData.ParcelLocalID;
|
||||||
|
@ -8318,9 +8337,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region GodPackets
|
#region GodPackets
|
||||||
|
|
||||||
case PacketType.RequestGodlikePowers:
|
case PacketType.RequestGodlikePowers:
|
||||||
RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
|
RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
|
||||||
|
@ -8366,9 +8385,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//OutPacket(kupack, ThrottleOutPacketType.Task);
|
//OutPacket(kupack, ThrottleOutPacketType.Task);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Economy/Transaction Packets
|
#region Economy/Transaction Packets
|
||||||
|
|
||||||
case PacketType.MoneyBalanceRequest:
|
case PacketType.MoneyBalanceRequest:
|
||||||
MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack;
|
MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack;
|
||||||
|
@ -8392,7 +8411,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
break;
|
break;
|
||||||
case PacketType.EconomyDataRequest:
|
case PacketType.EconomyDataRequest:
|
||||||
|
|
||||||
|
|
||||||
EconomyDataRequest handlerEconomoyDataRequest = OnEconomyDataRequest;
|
EconomyDataRequest handlerEconomoyDataRequest = OnEconomyDataRequest;
|
||||||
if (handlerEconomoyDataRequest != null)
|
if (handlerEconomoyDataRequest != null)
|
||||||
{
|
{
|
||||||
|
@ -8468,9 +8487,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Script Packets
|
#region Script Packets
|
||||||
|
|
||||||
case PacketType.GetScriptRunning:
|
case PacketType.GetScriptRunning:
|
||||||
GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
|
GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
|
||||||
|
@ -8520,9 +8539,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Gesture Managment
|
#region Gesture Managment
|
||||||
|
|
||||||
case PacketType.ActivateGestures:
|
case PacketType.ActivateGestures:
|
||||||
ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack;
|
ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack;
|
||||||
|
@ -8589,7 +8608,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
case PacketType.AgentFOV:
|
case PacketType.AgentFOV:
|
||||||
AgentFOVPacket fovPacket = (AgentFOVPacket)Pack;
|
AgentFOVPacket fovPacket = (AgentFOVPacket)Pack;
|
||||||
|
@ -8605,7 +8624,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#region unimplemented handlers
|
#region unimplemented handlers
|
||||||
|
|
||||||
case PacketType.ViewerStats:
|
case PacketType.ViewerStats:
|
||||||
// TODO: handle this packet
|
// TODO: handle this packet
|
||||||
|
@ -8628,8 +8647,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
MapItemRequest handlerMapItemRequest = OnMapItemRequest;
|
MapItemRequest handlerMapItemRequest = OnMapItemRequest;
|
||||||
if (handlerMapItemRequest != null)
|
if (handlerMapItemRequest != null)
|
||||||
{
|
{
|
||||||
handlerMapItemRequest(this,mirpk.AgentData.Flags, mirpk.AgentData.EstateID,
|
handlerMapItemRequest(this, mirpk.AgentData.Flags, mirpk.AgentData.EstateID,
|
||||||
mirpk.AgentData.Godlike,mirpk.RequestData.ItemType,
|
mirpk.AgentData.Godlike, mirpk.RequestData.ItemType,
|
||||||
mirpk.RequestData.RegionHandle);
|
mirpk.RequestData.RegionHandle);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9037,7 +9056,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
groupMembersRequestPacket.GroupData.RequestID;
|
groupMembersRequestPacket.GroupData.RequestID;
|
||||||
groupMembersReply.GroupData.MemberCount = memberCount;
|
groupMembersReply.GroupData.MemberCount = memberCount;
|
||||||
|
|
||||||
for (int i = 0 ; i < blockCount ; i++)
|
for (int i = 0; i < blockCount; i++)
|
||||||
{
|
{
|
||||||
GroupMembersData m = members[0];
|
GroupMembersData m = members[0];
|
||||||
members.RemoveAt(0);
|
members.RemoveAt(0);
|
||||||
|
@ -9174,7 +9193,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
groupRoleMembersReply.MemberData =
|
groupRoleMembersReply.MemberData =
|
||||||
new GroupRoleMembersReplyPacket.MemberDataBlock[pairs];
|
new GroupRoleMembersReplyPacket.MemberDataBlock[pairs];
|
||||||
|
|
||||||
for (int i = 0 ; i < pairs ; i++)
|
for (int i = 0; i < pairs; i++)
|
||||||
{
|
{
|
||||||
GroupRoleMembersData d = mappings[0];
|
GroupRoleMembersData d = mappings[0];
|
||||||
mappings.RemoveAt(0);
|
mappings.RemoveAt(0);
|
||||||
|
@ -9301,7 +9320,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
ParcelDeedToGroup handlerParcelDeedToGroup = OnParcelDeedToGroup;
|
ParcelDeedToGroup handlerParcelDeedToGroup = OnParcelDeedToGroup;
|
||||||
if (handlerParcelDeedToGroup != null)
|
if (handlerParcelDeedToGroup != null)
|
||||||
{
|
{
|
||||||
handlerParcelDeedToGroup(parcelDeedToGroup.Data.LocalID, parcelDeedToGroup.Data.GroupID,this);
|
handlerParcelDeedToGroup(parcelDeedToGroup.Data.LocalID, parcelDeedToGroup.Data.GroupID, this);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9759,7 +9778,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
PickDelete handlerPickDelete = OnPickDelete;
|
PickDelete handlerPickDelete = OnPickDelete;
|
||||||
if (handlerPickDelete != null)
|
if (handlerPickDelete != null)
|
||||||
handlerPickDelete(this, pickDelete.Data.PickID);
|
handlerPickDelete(this, pickDelete.Data.PickID);
|
||||||
break;
|
break;
|
||||||
case PacketType.PickGodDelete:
|
case PacketType.PickGodDelete:
|
||||||
PickGodDeletePacket pickGodDelete =
|
PickGodDeletePacket pickGodDelete =
|
||||||
|
@ -9779,7 +9798,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
handlerPickGodDelete(this,
|
handlerPickGodDelete(this,
|
||||||
pickGodDelete.AgentData.AgentID,
|
pickGodDelete.AgentData.AgentID,
|
||||||
pickGodDelete.Data.PickID,
|
pickGodDelete.Data.PickID,
|
||||||
pickGodDelete.Data.QueryID);
|
pickGodDelete.Data.QueryID);
|
||||||
break;
|
break;
|
||||||
case PacketType.PickInfoUpdate:
|
case PacketType.PickInfoUpdate:
|
||||||
PickInfoUpdatePacket pickInfoUpdate =
|
PickInfoUpdatePacket pickInfoUpdate =
|
||||||
|
@ -9870,7 +9889,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_log.Warn("[CLIENT]: unhandled packet " + Pack);
|
m_log.Warn("[CLIENT]: unhandled packet " + Pack);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketPool.Instance.ReturnPacket(Pack);
|
PacketPool.Instance.ReturnPacket(Pack);
|
||||||
|
@ -9907,7 +9926,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//shape.Textures = ntex;
|
//shape.Textures = ntex;
|
||||||
return shape;
|
return shape;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClientInfo GetClientInfo()
|
public ClientInfo GetClientInfo()
|
||||||
{
|
{
|
||||||
ClientInfo info = m_udpClient.GetClientInfo();
|
ClientInfo info = m_udpClient.GetClientInfo();
|
||||||
|
@ -9935,7 +9954,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
ParcelMediaCommandMessagePacket commandMessagePacket = new ParcelMediaCommandMessagePacket();
|
ParcelMediaCommandMessagePacket commandMessagePacket = new ParcelMediaCommandMessagePacket();
|
||||||
commandMessagePacket.CommandBlock.Flags = flags;
|
commandMessagePacket.CommandBlock.Flags = flags;
|
||||||
commandMessagePacket.CommandBlock.Command =(uint) command;
|
commandMessagePacket.CommandBlock.Command = (uint)command;
|
||||||
commandMessagePacket.CommandBlock.Time = time;
|
commandMessagePacket.CommandBlock.Time = time;
|
||||||
|
|
||||||
OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown);
|
OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown);
|
||||||
|
@ -9963,7 +9982,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
#region Camera
|
#region Camera
|
||||||
|
|
||||||
public void SendSetFollowCamProperties (UUID objectID, SortedDictionary<int, float> parameters)
|
public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters)
|
||||||
{
|
{
|
||||||
SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties);
|
SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties);
|
||||||
packet.ObjectData.ObjectID = objectID;
|
packet.ObjectData.ObjectID = objectID;
|
||||||
|
@ -9981,7 +10000,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
OutPacket(packet, ThrottleOutPacketType.Task);
|
OutPacket(packet, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendClearFollowCamProperties (UUID objectID)
|
public void SendClearFollowCamProperties(UUID objectID)
|
||||||
{
|
{
|
||||||
ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties);
|
ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties);
|
||||||
packet.ObjectData.ObjectID = objectID;
|
packet.ObjectData.ObjectID = objectID;
|
||||||
|
@ -10083,8 +10102,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
return m_udpClient.GetStats();
|
return m_udpClient.GetStats();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string XReport(string uptime, string version)
|
public string XReport(string uptime, string version)
|
||||||
{
|
{
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
}
|
}
|
||||||
|
@ -10158,7 +10177,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
|
|
||||||
//m_log.DebugFormat("[ASSET CACHE]: Asset transfer request for asset which is {0} already known to be missing. Dropping", requestID);
|
//m_log.DebugFormat("[ASSET CACHE]: Asset transfer request for asset which is {0} already known to be missing. Dropping", requestID);
|
||||||
|
|
||||||
// FIXME: We never tell the client about assets which do not exist when requested by this transfer mechanism, which can't be right.
|
// FIXME: We never tell the client about assets which do not exist when requested by this transfer mechanism, which can't be right.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -10381,7 +10400,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region LookupItem
|
#region LookupItem
|
||||||
private struct LookupItem {
|
private struct LookupItem
|
||||||
|
{
|
||||||
internal MinHeap<MinHeapItem> Heap;
|
internal MinHeap<MinHeapItem> Heap;
|
||||||
internal IHandle Handle;
|
internal IHandle Handle;
|
||||||
}
|
}
|
||||||
|
|
|
@ -372,23 +372,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void ResendUnacked(LLUDPClient udpClient)
|
public void ResendUnacked(LLUDPClient udpClient)
|
||||||
{
|
{
|
||||||
if (udpClient.IsConnected && udpClient.NeedAcks.Count > 0)
|
if (!udpClient.IsConnected)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Disconnect an agent if no packets are received for some time
|
||||||
|
//FIXME: Make 60 an .ini setting
|
||||||
|
if (Environment.TickCount - udpClient.TickLastPacketReceived > 1000 * 60)
|
||||||
{
|
{
|
||||||
// Disconnect an agent if no packets are received for some time
|
m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID);
|
||||||
//FIXME: Make 60 an .ini setting
|
|
||||||
if (Environment.TickCount - udpClient.TickLastPacketReceived > 1000 * 60)
|
|
||||||
{
|
|
||||||
m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID);
|
|
||||||
|
|
||||||
RemoveClient(udpClient);
|
RemoveClient(udpClient);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (udpClient.NeedAcks.Count > 0)
|
||||||
|
{
|
||||||
// Get a list of all of the packets that have been sitting unacked longer than udpClient.RTO
|
// Get a list of all of the packets that have been sitting unacked longer than udpClient.RTO
|
||||||
List<OutgoingPacket> expiredPackets = udpClient.NeedAcks.GetExpiredPackets(udpClient.RTO);
|
List<OutgoingPacket> expiredPackets = udpClient.NeedAcks.GetExpiredPackets(udpClient.RTO);
|
||||||
|
|
||||||
if (expiredPackets != null)
|
if (expiredPackets != null)
|
||||||
{
|
{
|
||||||
|
m_log.Debug("[LLUDPSERVER]: Resending " + expiredPackets.Count + " packets to " + udpClient.AgentID);
|
||||||
|
|
||||||
// Resend packets
|
// Resend packets
|
||||||
for (int i = 0; i < expiredPackets.Count; i++)
|
for (int i = 0; i < expiredPackets.Count; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue