Hopefully texturing prims should now work correctly.
parent
2ceff87a02
commit
17ddb8b493
|
@ -75,10 +75,10 @@ namespace OpenSim.Region.Capabilities
|
||||||
string capsBase = "/CAPS/" + m_capsObjectPath;
|
string capsBase = "/CAPS/" + m_capsObjectPath;
|
||||||
|
|
||||||
|
|
||||||
//AddLegacyCapsHandler( httpListener, m_mapLayerPath, MapLayer);
|
AddLegacyCapsHandler( httpListener, m_mapLayerPath, MapLayer);
|
||||||
|
|
||||||
httpListener.AddStreamHandler(
|
// httpListener.AddStreamHandler(
|
||||||
new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", capsBase + m_mapLayerPath, this.GetMapLayer ));
|
// new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", capsBase + m_mapLayerPath, this.GetMapLayer ));
|
||||||
|
|
||||||
AddLegacyCapsHandler(httpListener, m_requestPath, CapsRequest);
|
AddLegacyCapsHandler(httpListener, m_requestPath, CapsRequest);
|
||||||
AddLegacyCapsHandler(httpListener, m_newInventory, NewAgentInventory);
|
AddLegacyCapsHandler(httpListener, m_newInventory, NewAgentInventory);
|
||||||
|
@ -133,6 +133,7 @@ namespace OpenSim.Region.Capabilities
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string MapLayer(string request, string path, string param)
|
public string MapLayer(string request, string path, string param)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("map request: " + request);
|
||||||
Encoding _enc = Encoding.UTF8;
|
Encoding _enc = Encoding.UTF8;
|
||||||
Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(_enc.GetBytes(request));
|
Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(_enc.GetBytes(request));
|
||||||
LLSDMapRequest mapReq = new LLSDMapRequest();
|
LLSDMapRequest mapReq = new LLSDMapRequest();
|
||||||
|
@ -147,6 +148,7 @@ namespace OpenSim.Region.Capabilities
|
||||||
|
|
||||||
public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq)
|
public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("Map request " + mapReq.Flags);
|
||||||
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
|
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
|
||||||
mapResponse.LayerData.Array.Add(this.BuildLLSDMapLayerResponse());
|
mapResponse.LayerData.Array.Add(this.BuildLLSDMapLayerResponse());
|
||||||
return mapResponse;
|
return mapResponse;
|
||||||
|
|
|
@ -1042,8 +1042,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
protected void SetPrimPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData, PrimitiveBaseShape primData, LLUUID textureID)
|
protected void SetPrimPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData, PrimitiveBaseShape primData, LLUUID textureID)
|
||||||
{
|
{
|
||||||
LLObject.TextureEntry ntex = new LLObject.TextureEntry(textureID);
|
|
||||||
objectData.TextureEntry = ntex.ToBytes();
|
objectData.TextureEntry = primData.TextureEntry;
|
||||||
objectData.PCode = primData.PCode;
|
objectData.PCode = primData.PCode;
|
||||||
objectData.PathBegin = primData.PathBegin;
|
objectData.PathBegin = primData.PathBegin;
|
||||||
objectData.PathEnd = primData.PathEnd;
|
objectData.PathEnd = primData.PathEnd;
|
||||||
|
|
|
@ -242,7 +242,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
pShape.PathTaperY = addPacket.ObjectData.PathTaperY;
|
pShape.PathTaperY = addPacket.ObjectData.PathTaperY;
|
||||||
pShape.PathTwist = addPacket.ObjectData.PathTwist;
|
pShape.PathTwist = addPacket.ObjectData.PathTwist;
|
||||||
pShape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
|
pShape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
|
||||||
|
LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005"));
|
||||||
|
pShape.TextureEntry = ntex.ToBytes();
|
||||||
this.updateFlag = 1;
|
this.updateFlag = 1;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -501,6 +502,17 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Texture
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="textureEntry"></param>
|
||||||
|
public void UpdateTextureEntry(byte[] textureEntry)
|
||||||
|
{
|
||||||
|
this.m_Shape.TextureEntry = textureEntry;
|
||||||
|
this.updateFlag = 1;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
#region Client Update Methods
|
#region Client Update Methods
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -421,7 +421,18 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
public void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient)
|
public void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
|
Primitive prim = null;
|
||||||
|
foreach (EntityBase ent in Entities.Values)
|
||||||
|
{
|
||||||
|
if (ent is SceneObject)
|
||||||
|
{
|
||||||
|
prim = ((SceneObject)ent).HasChildPrim(localID);
|
||||||
|
if (prim != null)
|
||||||
|
{
|
||||||
|
prim.UpdateTextureEntry(texture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -477,6 +477,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
client.OnUpdatePrimScale += this.UpdatePrimScale;
|
client.OnUpdatePrimScale += this.UpdatePrimScale;
|
||||||
client.OnUpdatePrimShape += this.UpdatePrimShape;
|
client.OnUpdatePrimShape += this.UpdatePrimShape;
|
||||||
client.OnRequestMapBlocks += this.RequestMapBlocks;
|
client.OnRequestMapBlocks += this.RequestMapBlocks;
|
||||||
|
client.OnUpdatePrimTexture += this.UpdatePrimTexture;
|
||||||
client.OnTeleportLocationRequest += this.RequestTeleportLocation;
|
client.OnTeleportLocationRequest += this.RequestTeleportLocation;
|
||||||
client.OnObjectSelect += this.SelectPrim;
|
client.OnObjectSelect += this.SelectPrim;
|
||||||
client.OnGrapUpdate += this.MoveObject;
|
client.OnGrapUpdate += this.MoveObject;
|
||||||
|
|
Loading…
Reference in New Issue