aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorUbitUmarov2014-09-10 19:30:57 +0100
committerUbitUmarov2014-09-10 19:30:57 +0100
commitf66b58cf00d4dcbd9d11030809bf9766330966f2 (patch)
tree40cf47bda3160e03d1d94918a795179b01ca2778 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentFix a nullref that can hit Vivox voice (diff)
downloadopensim-SC_OLD-f66b58cf00d4dcbd9d11030809bf9766330966f2.zip
opensim-SC_OLD-f66b58cf00d4dcbd9d11030809bf9766330966f2.tar.gz
opensim-SC_OLD-f66b58cf00d4dcbd9d11030809bf9766330966f2.tar.bz2
opensim-SC_OLD-f66b58cf00d4dcbd9d11030809bf9766330966f2.tar.xz
*TEST* add movement states SIT and SITGROUND. ScenePresence on SIT,
SITGROUND or STAND, sets directly the state, and desired sitAnimation for default sits
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs28
1 files changed, 22 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 5da92f9..fd1bab6 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -243,7 +243,7 @@ namespace OpenSim.Region.Framework.Scenes
243 /// Server Side Animation Override 243 /// Server Side Animation Override
244 /// </value> 244 /// </value>
245 public MovementAnimationOverrides Overrides { get; private set; } 245 public MovementAnimationOverrides Overrides { get; private set; }
246 246 public String sitAnimation = "SIT";
247 /// <summary> 247 /// <summary>
248 /// Attachments recorded on this avatar. 248 /// Attachments recorded on this avatar.
249 /// </summary> 249 /// </summary>
@@ -2779,7 +2779,11 @@ namespace OpenSim.Region.Framework.Scenes
2779 SendAvatarDataToAllAgents(); 2779 SendAvatarDataToAllAgents();
2780 } 2780 }
2781 2781
2782 Animator.TrySetMovementAnimation("STAND"); 2782 // reset to default sitAnimation
2783 sitAnimation = "SIT";
2784
2785// Animator.TrySetMovementAnimation("STAND");
2786 Animator.SetMovementAnimations("STAND");
2783 2787
2784 TriggerScenePresenceUpdated(); 2788 TriggerScenePresenceUpdated();
2785 } 2789 }
@@ -3058,11 +3062,18 @@ namespace OpenSim.Region.Framework.Scenes
3058 3062
3059 SendAvatarDataToAllAgents(); 3063 SendAvatarDataToAllAgents();
3060 3064
3065/*
3061 if(status == 3) 3066 if(status == 3)
3062 Animator.TrySetMovementAnimation("SIT_GROUND"); 3067 Animator.TrySetMovementAnimation("SIT_GROUND");
3063 else 3068 else
3064 Animator.TrySetMovementAnimation("SIT"); 3069 Animator.TrySetMovementAnimation("SIT");
3070*/
3071 if (status == 3)
3072 sitAnimation = "SIT_GROUND";
3073 else
3074 sitAnimation = "SIT";
3065 3075
3076 Animator.SetMovementAnimations("SIT");
3066 3077
3067 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); 3078 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
3068 } 3079 }
@@ -3164,12 +3175,13 @@ namespace OpenSim.Region.Framework.Scenes
3164 3175
3165 SendAvatarDataToAllAgents(); 3176 SendAvatarDataToAllAgents();
3166 3177
3167 String sitAnimation = "SIT"; 3178 sitAnimation = "SIT";
3168 if (!String.IsNullOrEmpty(part.SitAnimation)) 3179 if (!String.IsNullOrEmpty(part.SitAnimation))
3169 { 3180 {
3170 sitAnimation = part.SitAnimation; 3181 sitAnimation = part.SitAnimation;
3171 } 3182 }
3172 Animator.TrySetMovementAnimation(sitAnimation); 3183// Animator.TrySetMovementAnimation(sitAnimation);
3184 Animator.SetMovementAnimations("SIT");
3173 TriggerScenePresenceUpdated(); 3185 TriggerScenePresenceUpdated();
3174 } 3186 }
3175 } 3187 }
@@ -3181,10 +3193,14 @@ namespace OpenSim.Region.Framework.Scenes
3181 3193
3182// m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick.. 3194// m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick..
3183 m_AngularVelocity = Vector3.Zero; 3195 m_AngularVelocity = Vector3.Zero;
3184 Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); 3196 sitAnimation = "SIT_GROUND_CONSTRAINED";
3185 TriggerScenePresenceUpdated(); 3197// Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
3198// TriggerScenePresenceUpdated();
3186 SitGround = true; 3199 SitGround = true;
3187 RemoveFromPhysicalScene(); 3200 RemoveFromPhysicalScene();
3201
3202 Animator.SetMovementAnimations("SITGROUND");
3203 TriggerScenePresenceUpdated();
3188 } 3204 }
3189 3205
3190 /// <summary> 3206 /// <summary>