aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/AvatarFactory
diff options
context:
space:
mode:
authorUbitUmarov2012-12-07 21:26:58 +0000
committerUbitUmarov2012-12-07 21:26:58 +0000
commit93bede4e6aa0838e14f39f5e641b028267d2683c (patch)
tree2b19bb7e14edb0529ad0a038db819690b1397a25 /OpenSim/Region/CoreModules/Avatar/AvatarFactory
parent create a new ode character also with the new information (diff)
downloadopensim-SC_OLD-93bede4e6aa0838e14f39f5e641b028267d2683c.zip
opensim-SC_OLD-93bede4e6aa0838e14f39f5e641b028267d2683c.tar.gz
opensim-SC_OLD-93bede4e6aa0838e14f39f5e641b028267d2683c.tar.bz2
opensim-SC_OLD-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/CoreModules/Avatar/AvatarFactory')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs31
1 files changed, 23 insertions, 8 deletions
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 }