Merge branch 'master' into ubitworkmaster

avinationmerge
UbitUmarov 2014-08-13 15:50:12 +01:00
commit 3f0138c967
3 changed files with 31 additions and 20 deletions

View File

@ -4887,7 +4887,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
{ {
// m_log.DebugFormat("[LLCLIENTVIEW]: Sending land properties for {0} to {1}", lo.LandData.GlobalID, Name); // m_log.DebugFormat("[LLCLIENTVIEW]: Sending land properties for {0} to {1}", lo.LandData.GlobalID, Name);
LandData landData = lo.LandData; LandData landData = lo.LandData;
ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
@ -5525,10 +5525,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AddLocalPacketHandler(PacketType.RezObject, HandlerRezObject); AddLocalPacketHandler(PacketType.RezObject, HandlerRezObject);
AddLocalPacketHandler(PacketType.DeRezObject, HandlerDeRezObject); AddLocalPacketHandler(PacketType.DeRezObject, HandlerDeRezObject);
AddLocalPacketHandler(PacketType.ModifyLand, HandlerModifyLand); AddLocalPacketHandler(PacketType.ModifyLand, HandlerModifyLand);
AddLocalPacketHandler(PacketType.RegionHandshakeReply, HandlerRegionHandshakeReply, false);
// AddLocalPacketHandler(PacketType.RegionHandshakeReply, HandlerRegionHandshakeReply, false);
AddLocalPacketHandler(PacketType.RegionHandshakeReply, HandlerRegionHandshakeReply, true);
AddLocalPacketHandler(PacketType.AgentWearablesRequest, HandlerAgentWearablesRequest); AddLocalPacketHandler(PacketType.AgentWearablesRequest, HandlerAgentWearablesRequest);
AddLocalPacketHandler(PacketType.AgentSetAppearance, HandlerAgentSetAppearance); AddLocalPacketHandler(PacketType.AgentSetAppearance, HandlerAgentSetAppearance);
AddLocalPacketHandler(PacketType.AgentIsNowWearing, HandlerAgentIsNowWearing); AddLocalPacketHandler(PacketType.AgentIsNowWearing, HandlerAgentIsNowWearing);
@ -6494,7 +6491,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Action<IClientAPI> handlerRegionHandShakeReply = OnRegionHandShakeReply; Action<IClientAPI> handlerRegionHandShakeReply = OnRegionHandShakeReply;
if (handlerRegionHandShakeReply != null) if (handlerRegionHandShakeReply != null)
{ {
Thread.Sleep(100);
handlerRegionHandShakeReply(this); handlerRegionHandShakeReply(this);
} }

View File

@ -1878,22 +1878,29 @@ namespace OpenSim.Region.Framework.Scenes
public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim) public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim)
{ {
byte[] data = new byte[16]; if (((int)pTexAnim.Flags & 1) != 0) // ANIM_ON
int pos = 0; {
byte[] data = new byte[16];
int pos = 0;
// The flags don't like conversion from uint to byte, so we have to do // The flags don't like conversion from uint to byte, so we have to do
// it the crappy way. See the above function :( // it the crappy way. See the above function :(
data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++; data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++;
data[pos] = (byte)pTexAnim.Face; pos++; data[pos] = (byte)pTexAnim.Face; pos++;
data[pos] = (byte)pTexAnim.SizeX; pos++; data[pos] = (byte)pTexAnim.SizeX; pos++;
data[pos] = (byte)pTexAnim.SizeY; pos++; data[pos] = (byte)pTexAnim.SizeY; pos++;
Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
m_TextureAnimation = data; m_TextureAnimation = data;
}
else
{
m_TextureAnimation = Utils.EmptyBytes;
}
} }
public void AdjustSoundGain(double volume) public void AdjustSoundGain(double volume)

View File

@ -6001,17 +6001,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
for (int i = 0; i < length; i++) for (int i = 0; i < length; i++)
{ {
int needle = llGetListEntryType(test, 0).value;
int haystack = llGetListEntryType(src, i).value;
// Why this piece of insanity? This is because most script constants are C# value types (e.g. int) // Why this piece of insanity? This is because most script constants are C# value types (e.g. int)
// rather than wrapped LSL types. Such a script constant does not have int.Equal(LSL_Integer) code // rather than wrapped LSL types. Such a script constant does not have int.Equal(LSL_Integer) code
// and so the comparison fails even if the LSL_Integer conceptually has the same value. // and so the comparison fails even if the LSL_Integer conceptually has the same value.
// Therefore, here we test Equals on both the source and destination objects. // Therefore, here we test Equals on both the source and destination objects.
// However, a future better approach may be use LSL struct script constants (e.g. LSL_Integer(1)). // However, a future better approach may be use LSL struct script constants (e.g. LSL_Integer(1)).
if (src.Data[i].Equals(test.Data[0]) || test.Data[0].Equals(src.Data[i])) if ((needle == haystack) && (src.Data[i].Equals(test.Data[0]) || test.Data[0].Equals(src.Data[i])))
{ {
int j; int j;
for (j = 1; j < test.Length; j++) for (j = 1; j < test.Length; j++)
if (!(src.Data[i+j].Equals(test.Data[j]) || test.Data[j].Equals(src.Data[i+j]))) {
needle = llGetListEntryType(test, j).value;
haystack = llGetListEntryType(src, i+j).value;
if ((needle != haystack) || (!(src.Data[i+j].Equals(test.Data[j]) || test.Data[j].Equals(src.Data[i+j]))))
break; break;
}
if (j == test.Length) if (j == test.Length)
{ {