From 5dfd2643dfc530280e5dcd0056b59add7d49f313 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 30 Sep 2009 15:53:03 -0700 Subject: * Change the signature of the agent set appearance callback to prevent unnecessary serialization/deserialization of TextureEntry objects and allow TextureEntry to be inspected for missing bakes * Inspect incoming TextureEntry updates for bakes that do not exist on the simulator and request the missing textures * Properly handle appearance updates that do not have a TextureEntry set --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index dae525d..9788f40 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -5272,13 +5272,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP // for the client session anyway, in order to protect ourselves against bad code in plugins try { - List visualparams = new List(); - foreach (AgentSetAppearancePacket.VisualParamBlock x in appear.VisualParam) - { - visualparams.Add(x.ParamValue); - } + byte[] visualparams = new byte[appear.VisualParam.Length]; + for (int i = 0; i < appear.VisualParam.Length; i++) + visualparams[i] = appear.VisualParam[i].ParamValue; + + Primitive.TextureEntry te = null; + if (appear.ObjectData.TextureEntry.Length > 1) + te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length); - handlerSetAppearance(appear.ObjectData.TextureEntry, visualparams); + handlerSetAppearance(te, visualparams); } catch (Exception e) { -- cgit v1.1