Merge branch 'avination' of careminster:/var/git/careminster into teravuswork

This commit is contained in:
teravus
2012-12-19 11:53:26 -05:00
27 changed files with 1311 additions and 710 deletions

View File

@@ -377,7 +377,7 @@ namespace OpenSim.Region.ClientStack.Linden
protocol = "https";
}
caps.RegisterHandler("GetMesh", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl));
m_pollservices.Add(agentID, args);
m_pollservices[agentID] = args;
m_capsDict[agentID] = capUrl;

View File

@@ -333,7 +333,7 @@ namespace OpenSim.Region.ClientStack.Linden
protocol = "https";
}
caps.RegisterHandler("GetTexture", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl));
m_pollservices.Add(agentID, args);
m_pollservices[agentID] = args;
m_capsDict[agentID] = capUrl;
}

View File

@@ -331,6 +331,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private Prioritizer m_prioritizer;
private bool m_disableFacelights = false;
private bool m_VelocityInterpolate = false;
private const uint MaxTransferBytesPerPacket = 600;
@@ -4987,7 +4988,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// in that direction, even though we don't model this on the server. Implementing this in the future
// may improve movement smoothness.
// acceleration = new Vector3(1, 0, 0);
angularVelocity = Vector3.Zero;
if (sendTexture)
@@ -5137,7 +5138,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
update.PCode = (byte)PCode.Avatar;
update.ProfileCurve = 1;
update.PSBlock = Utils.EmptyBytes;
update.Scale = new Vector3(0.45f, 0.6f, 1.9f);
update.Scale = data.Appearance.AvatarSize;
// update.Scale.Z -= 0.2f;
update.Text = Utils.EmptyBytes;
update.TextColor = new byte[4];
@@ -5325,8 +5328,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// If AgentUpdate is ever handled asynchronously, then we will also need to construct a new AgentUpdateArgs
// for each AgentUpdate packet.
AddLocalPacketHandler(PacketType.AgentUpdate, HandleAgentUpdate, false);
AddLocalPacketHandler(PacketType.ViewerEffect, HandleViewerEffect, false);
AddLocalPacketHandler(PacketType.VelocityInterpolateOff, HandleVelocityInterpolateOff, false);
AddLocalPacketHandler(PacketType.VelocityInterpolateOn, HandleVelocityInterpolateOn, false);
AddLocalPacketHandler(PacketType.AgentCachedTexture, HandleAgentTextureCached, false);
AddLocalPacketHandler(PacketType.MultipleObjectUpdate, HandleMultipleObjUpdate, false);
AddLocalPacketHandler(PacketType.MoneyTransferRequest, HandleMoneyTransferRequest, false);
@@ -5844,6 +5849,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return true;
}
private bool HandleVelocityInterpolateOff(IClientAPI sender, Packet Pack)
{
VelocityInterpolateOffPacket p = (VelocityInterpolateOffPacket)Pack;
if (p.AgentData.SessionID != SessionId ||
p.AgentData.AgentID != AgentId)
return true;
m_VelocityInterpolate = false;
return true;
}
private bool HandleVelocityInterpolateOn(IClientAPI sender, Packet Pack)
{
VelocityInterpolateOnPacket p = (VelocityInterpolateOnPacket)Pack;
if (p.AgentData.SessionID != SessionId ||
p.AgentData.AgentID != AgentId)
return true;
m_VelocityInterpolate = true;
return true;
}
private bool HandleAvatarPropertiesRequest(IClientAPI sender, Packet Pack)
{
AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
@@ -6264,6 +6292,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Temporarily protect ourselves from the mantis #951 failure.
// However, we could do this for several other handlers where a failure isn't terminal
// for the client session anyway, in order to protect ourselves against bad code in plugins
Vector3 avSize = appear.AgentData.Size;
try
{
byte[] visualparams = new byte[appear.VisualParam.Length];
@@ -6274,7 +6303,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (appear.ObjectData.TextureEntry.Length > 1)
te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length);
handlerSetAppearance(sender, te, visualparams);
handlerSetAppearance(sender, te, visualparams,avSize);
}
catch (Exception e)
{
@@ -11684,14 +11713,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP
cachedresp.WearableData =
new AgentCachedTextureResponsePacket.WearableDataBlock[cachedtex.WearableData.Length];
for (int i = 0; i < cachedtex.WearableData.Length; i++)
IImprovedAssetCache cache = m_scene.RequestModuleInterface<IImprovedAssetCache>();
if (cache == null)
{
cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex;
cachedresp.WearableData[i].TextureID = UUID.Zero;
cachedresp.WearableData[i].HostName = new byte[0];
for (int i = 0; i < cachedtex.WearableData.Length; i++)
{
cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex;
cachedresp.WearableData[i].TextureID = UUID.Zero;
cachedresp.WearableData[i].HostName = new byte[0];
}
}
else
{
for (int i = 0; i < cachedtex.WearableData.Length; i++)
{
cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex;
if(cache.Check(cachedtex.WearableData[i].ID.ToString()))
cachedresp.WearableData[i].TextureID = UUID.Zero;
else
cachedresp.WearableData[i].TextureID = UUID.Zero;
cachedresp.WearableData[i].HostName = new byte[0];
}
}
cachedresp.Header.Zerocoded = true;
OutPacket(cachedresp, ThrottleOutPacketType.Task);