diff options
author | UbitUmarov | 2012-12-07 21:26:58 +0000 |
---|---|---|
committer | UbitUmarov | 2012-12-07 21:26:58 +0000 |
commit | 93bede4e6aa0838e14f39f5e641b028267d2683c (patch) | |
tree | 2b19bb7e14edb0529ad0a038db819690b1397a25 /OpenSim/Region | |
parent | create a new ode character also with the new information (diff) | |
download | opensim-SC-93bede4e6aa0838e14f39f5e641b028267d2683c.zip opensim-SC-93bede4e6aa0838e14f39f5e641b028267d2683c.tar.gz opensim-SC-93bede4e6aa0838e14f39f5e641b028267d2683c.tar.bz2 opensim-SC-93bede4e6aa0838e14f39f5e641b028267d2683c.tar.xz |
revert the use of avatar skeleton and use avatar size provided by viewers,
since at least for now seems good enought
Diffstat (limited to 'OpenSim/Region')
4 files changed, 28 insertions, 12 deletions
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 | |||
6248 | // Temporarily protect ourselves from the mantis #951 failure. | 6248 | // Temporarily protect ourselves from the mantis #951 failure. |
6249 | // However, we could do this for several other handlers where a failure isn't terminal | 6249 | // However, we could do this for several other handlers where a failure isn't terminal |
6250 | // for the client session anyway, in order to protect ourselves against bad code in plugins | 6250 | // for the client session anyway, in order to protect ourselves against bad code in plugins |
6251 | Vector3 avSize = appear.AgentData.Size; | ||
6251 | try | 6252 | try |
6252 | { | 6253 | { |
6253 | byte[] visualparams = new byte[appear.VisualParam.Length]; | 6254 | byte[] visualparams = new byte[appear.VisualParam.Length]; |
@@ -6258,7 +6259,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6258 | if (appear.ObjectData.TextureEntry.Length > 1) | 6259 | if (appear.ObjectData.TextureEntry.Length > 1) |
6259 | te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length); | 6260 | te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length); |
6260 | 6261 | ||
6261 | handlerSetAppearance(sender, te, visualparams); | 6262 | handlerSetAppearance(sender, te, visualparams,avSize); |
6262 | } | 6263 | } |
6263 | catch (Exception e) | 6264 | catch (Exception e) |
6264 | { | 6265 | { |
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 | |||
145 | SetAppearance(sp, appearance.Texture, appearance.VisualParams); | 145 | SetAppearance(sp, appearance.Texture, appearance.VisualParams); |
146 | } | 146 | } |
147 | 147 | ||
148 | |||
149 | public void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize) | ||
150 | { | ||
151 | float oldoff = sp.Appearance.AvatarFeetOffset; | ||
152 | Vector3 oldbox = sp.Appearance.AvatarBoxSize; | ||
153 | |||
154 | SetAppearance(sp, textureEntry, visualParams); | ||
155 | sp.Appearance.SetSize(avSize); | ||
156 | |||
157 | float off = sp.Appearance.AvatarFeetOffset; | ||
158 | Vector3 box = sp.Appearance.AvatarBoxSize; | ||
159 | if (oldoff != off || oldbox != box) | ||
160 | ((ScenePresence)sp).SetSize(box, off); | ||
161 | } | ||
162 | |||
148 | /// <summary> | 163 | /// <summary> |
149 | /// Set appearance data (texture asset IDs and slider settings) | 164 | /// Set appearance data (texture asset IDs and slider settings) |
150 | /// </summary> | 165 | /// </summary> |
@@ -181,13 +196,13 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
181 | if (sp.Appearance.AvatarHeight != oldHeight && sp.Appearance.AvatarHeight > 0) | 196 | if (sp.Appearance.AvatarHeight != oldHeight && sp.Appearance.AvatarHeight > 0) |
182 | ((ScenePresence)sp).SetHeight(sp.Appearance.AvatarHeight); | 197 | ((ScenePresence)sp).SetHeight(sp.Appearance.AvatarHeight); |
183 | */ | 198 | */ |
184 | float oldoff = sp.Appearance.AvatarFeetOffset; | 199 | // float oldoff = sp.Appearance.AvatarFeetOffset; |
185 | Vector3 oldbox = sp.Appearance.AvatarBoxSize; | 200 | // Vector3 oldbox = sp.Appearance.AvatarBoxSize; |
186 | changed = sp.Appearance.SetVisualParams(visualParams); | 201 | changed = sp.Appearance.SetVisualParams(visualParams); |
187 | float off = sp.Appearance.AvatarFeetOffset; | 202 | // float off = sp.Appearance.AvatarFeetOffset; |
188 | Vector3 box = sp.Appearance.AvatarBoxSize; | 203 | // Vector3 box = sp.Appearance.AvatarBoxSize; |
189 | if(oldoff != off || oldbox != box) | 204 | // if(oldoff != off || oldbox != box) |
190 | ((ScenePresence)sp).SetSize(box,off); | 205 | // ((ScenePresence)sp).SetSize(box,off); |
191 | 206 | ||
192 | } | 207 | } |
193 | 208 | ||
@@ -620,12 +635,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
620 | /// <param name="client"></param> | 635 | /// <param name="client"></param> |
621 | /// <param name="texture"></param> | 636 | /// <param name="texture"></param> |
622 | /// <param name="visualParam"></param> | 637 | /// <param name="visualParam"></param> |
623 | private void Client_OnSetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams) | 638 | private void Client_OnSetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize) |
624 | { | 639 | { |
625 | // m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance called for {0} ({1})", client.Name, client.AgentId); | 640 | // m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance called for {0} ({1})", client.Name, client.AgentId); |
626 | ScenePresence sp = m_scene.GetScenePresence(client.AgentId); | 641 | ScenePresence sp = m_scene.GetScenePresence(client.AgentId); |
627 | if (sp != null) | 642 | if (sp != null) |
628 | SetAppearance(sp, textureEntry, visualParams); | 643 | SetAppearance(sp, textureEntry, visualParams,avSize); |
629 | else | 644 | else |
630 | m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance unable to find presence for {0}", client.AgentId); | 645 | m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance unable to find presence for {0}", client.AgentId); |
631 | } | 646 | } |
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 | |||
3443 | Name, Scene.RegionInfo.RegionName); | 3443 | Name, Scene.RegionInfo.RegionName); |
3444 | } | 3444 | } |
3445 | 3445 | ||
3446 | if (Appearance.AvatarHeight == 0) | 3446 | // if (Appearance.AvatarHeight == 0) |
3447 | Appearance.SetHeight(); | 3447 | // Appearance.SetHeight(); |
3448 | 3448 | ||
3449 | PhysicsScene scene = m_scene.PhysicsScene; | 3449 | PhysicsScene scene = m_scene.PhysicsScene; |
3450 | 3450 | ||
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 | |||
911 | // Mimicking LLClientView which gets always set appearance from client. | 911 | // Mimicking LLClientView which gets always set appearance from client. |
912 | AvatarAppearance appearance; | 912 | AvatarAppearance appearance; |
913 | m_scene.GetAvatarAppearance(this, out appearance); | 913 | m_scene.GetAvatarAppearance(this, out appearance); |
914 | OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone()); | 914 | OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone(),appearance.AvatarSize); |
915 | } | 915 | } |
916 | 916 | ||
917 | public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) | 917 | public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) |