diff options
Hopefully texturing prims should now work correctly.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Capabilities/Caps.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.API.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Primitive.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 1 |
5 files changed, 33 insertions, 7 deletions
diff --git a/OpenSim/Region/Capabilities/Caps.cs b/OpenSim/Region/Capabilities/Caps.cs index db8df9b..6373f6e 100644 --- a/OpenSim/Region/Capabilities/Caps.cs +++ b/OpenSim/Region/Capabilities/Caps.cs | |||
@@ -75,10 +75,10 @@ namespace OpenSim.Region.Capabilities | |||
75 | string capsBase = "/CAPS/" + m_capsObjectPath; | 75 | string capsBase = "/CAPS/" + m_capsObjectPath; |
76 | 76 | ||
77 | 77 | ||
78 | //AddLegacyCapsHandler( httpListener, m_mapLayerPath, MapLayer); | 78 | AddLegacyCapsHandler( httpListener, m_mapLayerPath, MapLayer); |
79 | 79 | ||
80 | httpListener.AddStreamHandler( | 80 | // httpListener.AddStreamHandler( |
81 | new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", capsBase + m_mapLayerPath, this.GetMapLayer )); | 81 | // new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", capsBase + m_mapLayerPath, this.GetMapLayer )); |
82 | 82 | ||
83 | AddLegacyCapsHandler(httpListener, m_requestPath, CapsRequest); | 83 | AddLegacyCapsHandler(httpListener, m_requestPath, CapsRequest); |
84 | AddLegacyCapsHandler(httpListener, m_newInventory, NewAgentInventory); | 84 | AddLegacyCapsHandler(httpListener, m_newInventory, NewAgentInventory); |
@@ -133,6 +133,7 @@ namespace OpenSim.Region.Capabilities | |||
133 | /// <returns></returns> | 133 | /// <returns></returns> |
134 | public string MapLayer(string request, string path, string param) | 134 | public string MapLayer(string request, string path, string param) |
135 | { | 135 | { |
136 | Console.WriteLine("map request: " + request); | ||
136 | Encoding _enc = Encoding.UTF8; | 137 | Encoding _enc = Encoding.UTF8; |
137 | Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(_enc.GetBytes(request)); | 138 | Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(_enc.GetBytes(request)); |
138 | LLSDMapRequest mapReq = new LLSDMapRequest(); | 139 | LLSDMapRequest mapReq = new LLSDMapRequest(); |
@@ -147,6 +148,7 @@ namespace OpenSim.Region.Capabilities | |||
147 | 148 | ||
148 | public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq) | 149 | public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq) |
149 | { | 150 | { |
151 | Console.WriteLine("Map request " + mapReq.Flags); | ||
150 | LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); | 152 | LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); |
151 | mapResponse.LayerData.Array.Add(this.BuildLLSDMapLayerResponse()); | 153 | mapResponse.LayerData.Array.Add(this.BuildLLSDMapLayerResponse()); |
152 | return mapResponse; | 154 | return mapResponse; |
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index d5b6b52..b9eba3a 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -1042,8 +1042,8 @@ namespace OpenSim.Region.ClientStack | |||
1042 | 1042 | ||
1043 | protected void SetPrimPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData, PrimitiveBaseShape primData, LLUUID textureID) | 1043 | protected void SetPrimPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData, PrimitiveBaseShape primData, LLUUID textureID) |
1044 | { | 1044 | { |
1045 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(textureID); | 1045 | |
1046 | objectData.TextureEntry = ntex.ToBytes(); | 1046 | objectData.TextureEntry = primData.TextureEntry; |
1047 | objectData.PCode = primData.PCode; | 1047 | objectData.PCode = primData.PCode; |
1048 | objectData.PathBegin = primData.PathBegin; | 1048 | objectData.PathBegin = primData.PathBegin; |
1049 | objectData.PathEnd = primData.PathEnd; | 1049 | objectData.PathEnd = primData.PathEnd; |
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs index d23a569..d28e480 100644 --- a/OpenSim/Region/Environment/Scenes/Primitive.cs +++ b/OpenSim/Region/Environment/Scenes/Primitive.cs | |||
@@ -242,7 +242,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
242 | pShape.PathTaperY = addPacket.ObjectData.PathTaperY; | 242 | pShape.PathTaperY = addPacket.ObjectData.PathTaperY; |
243 | pShape.PathTwist = addPacket.ObjectData.PathTwist; | 243 | pShape.PathTwist = addPacket.ObjectData.PathTwist; |
244 | pShape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; | 244 | pShape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; |
245 | 245 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); | |
246 | pShape.TextureEntry = ntex.ToBytes(); | ||
246 | this.updateFlag = 1; | 247 | this.updateFlag = 1; |
247 | } | 248 | } |
248 | #endregion | 249 | #endregion |
@@ -501,6 +502,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
501 | } | 502 | } |
502 | #endregion | 503 | #endregion |
503 | 504 | ||
505 | #region Texture | ||
506 | /// <summary> | ||
507 | /// | ||
508 | /// </summary> | ||
509 | /// <param name="textureEntry"></param> | ||
510 | public void UpdateTextureEntry(byte[] textureEntry) | ||
511 | { | ||
512 | this.m_Shape.TextureEntry = textureEntry; | ||
513 | this.updateFlag = 1; | ||
514 | } | ||
515 | #endregion | ||
504 | #region Client Update Methods | 516 | #region Client Update Methods |
505 | 517 | ||
506 | /// <summary> | 518 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 69eaa75..1753772 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -421,7 +421,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
421 | /// <param name="remoteClient"></param> | 421 | /// <param name="remoteClient"></param> |
422 | public void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) | 422 | public void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) |
423 | { | 423 | { |
424 | 424 | Primitive prim = null; | |
425 | foreach (EntityBase ent in Entities.Values) | ||
426 | { | ||
427 | if (ent is SceneObject) | ||
428 | { | ||
429 | prim = ((SceneObject)ent).HasChildPrim(localID); | ||
430 | if (prim != null) | ||
431 | { | ||
432 | prim.UpdateTextureEntry(texture); | ||
433 | } | ||
434 | } | ||
435 | } | ||
425 | } | 436 | } |
426 | 437 | ||
427 | /// <summary> | 438 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index d1f6038..80c61e1 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -477,6 +477,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
477 | client.OnUpdatePrimScale += this.UpdatePrimScale; | 477 | client.OnUpdatePrimScale += this.UpdatePrimScale; |
478 | client.OnUpdatePrimShape += this.UpdatePrimShape; | 478 | client.OnUpdatePrimShape += this.UpdatePrimShape; |
479 | client.OnRequestMapBlocks += this.RequestMapBlocks; | 479 | client.OnRequestMapBlocks += this.RequestMapBlocks; |
480 | client.OnUpdatePrimTexture += this.UpdatePrimTexture; | ||
480 | client.OnTeleportLocationRequest += this.RequestTeleportLocation; | 481 | client.OnTeleportLocationRequest += this.RequestTeleportLocation; |
481 | client.OnObjectSelect += this.SelectPrim; | 482 | client.OnObjectSelect += this.SelectPrim; |
482 | client.OnGrapUpdate += this.MoveObject; | 483 | client.OnGrapUpdate += this.MoveObject; |