From 93bede4e6aa0838e14f39f5e641b028267d2683c Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Fri, 7 Dec 2012 21:26:58 +0000
Subject: revert the use of avatar skeleton and use avatar size provided by
viewers, since at least for now seems good enought
---
.../Region/ClientStack/Linden/UDP/LLClientView.cs | 3 ++-
.../Avatar/AvatarFactory/AvatarFactoryModule.cs | 31 ++++++++++++++++------
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 +--
.../Server/IRCClientView.cs | 2 +-
4 files changed, 28 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 8e0b72f..2efaa79 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -6248,6 +6248,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];
@@ -6258,7 +6259,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)
{
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index d557a28..4c42397 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -145,6 +145,21 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
SetAppearance(sp, appearance.Texture, appearance.VisualParams);
}
+
+ public void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize)
+ {
+ float oldoff = sp.Appearance.AvatarFeetOffset;
+ Vector3 oldbox = sp.Appearance.AvatarBoxSize;
+
+ SetAppearance(sp, textureEntry, visualParams);
+ sp.Appearance.SetSize(avSize);
+
+ float off = sp.Appearance.AvatarFeetOffset;
+ Vector3 box = sp.Appearance.AvatarBoxSize;
+ if (oldoff != off || oldbox != box)
+ ((ScenePresence)sp).SetSize(box, off);
+ }
+
///
/// Set appearance data (texture asset IDs and slider settings)
///
@@ -181,13 +196,13 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
if (sp.Appearance.AvatarHeight != oldHeight && sp.Appearance.AvatarHeight > 0)
((ScenePresence)sp).SetHeight(sp.Appearance.AvatarHeight);
*/
- float oldoff = sp.Appearance.AvatarFeetOffset;
- Vector3 oldbox = sp.Appearance.AvatarBoxSize;
+// float oldoff = sp.Appearance.AvatarFeetOffset;
+// Vector3 oldbox = sp.Appearance.AvatarBoxSize;
changed = sp.Appearance.SetVisualParams(visualParams);
- float off = sp.Appearance.AvatarFeetOffset;
- Vector3 box = sp.Appearance.AvatarBoxSize;
- if(oldoff != off || oldbox != box)
- ((ScenePresence)sp).SetSize(box,off);
+// float off = sp.Appearance.AvatarFeetOffset;
+// Vector3 box = sp.Appearance.AvatarBoxSize;
+// if(oldoff != off || oldbox != box)
+// ((ScenePresence)sp).SetSize(box,off);
}
@@ -620,12 +635,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
///
///
///
- private void Client_OnSetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams)
+ private void Client_OnSetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize)
{
// m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance called for {0} ({1})", client.Name, client.AgentId);
ScenePresence sp = m_scene.GetScenePresence(client.AgentId);
if (sp != null)
- SetAppearance(sp, textureEntry, visualParams);
+ SetAppearance(sp, textureEntry, visualParams,avSize);
else
m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance unable to find presence for {0}", client.AgentId);
}
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 7602d6b..9dfccca 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3443,8 +3443,8 @@ namespace OpenSim.Region.Framework.Scenes
Name, Scene.RegionInfo.RegionName);
}
- if (Appearance.AvatarHeight == 0)
- Appearance.SetHeight();
+// if (Appearance.AvatarHeight == 0)
+// Appearance.SetHeight();
PhysicsScene scene = m_scene.PhysicsScene;
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index a31ccac..1b4ed1e 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -911,7 +911,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
// Mimicking LLClientView which gets always set appearance from client.
AvatarAppearance appearance;
m_scene.GetAvatarAppearance(this, out appearance);
- OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone());
+ OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone(),appearance.AvatarSize);
}
public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
--
cgit v1.1