aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs17
2 files changed, 6 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index d1a6692..abac3c0 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -5555,7 +5555,8 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5555 5555
5556 if (m_sittingAvatars.Add(sp)) 5556 if (m_sittingAvatars.Add(sp))
5557 { 5557 {
5558 ParentGroup.m_sittingAvatars.Add(sp); 5558 if(!ParentGroup.m_sittingAvatars.Contains(sp))
5559 ParentGroup.m_sittingAvatars.Add(sp);
5559 5560
5560 return true; 5561 return true;
5561 } 5562 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 974dd62..df1352d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1138,7 +1138,7 @@ namespace OpenSim.Region.Framework.Scenes
1138 } 1138 }
1139 else 1139 else
1140 { 1140 {
1141 part.ParentGroup.AddAvatar(UUID); 1141 part.AddSittingAvatar(this);
1142 if (part.SitTargetPosition != Vector3.Zero) 1142 if (part.SitTargetPosition != Vector3.Zero)
1143 part.SitTargetAvatar = UUID; 1143 part.SitTargetAvatar = UUID;
1144 ParentID = part.LocalId; 1144 ParentID = part.LocalId;
@@ -2838,7 +2838,7 @@ namespace OpenSim.Region.Framework.Scenes
2838 } 2838 }
2839 } 2839 }
2840 2840
2841 part.ParentGroup.DeleteAvatar(UUID); 2841// part.ParentGroup.DeleteAvatar(UUID);
2842 2842
2843 Quaternion standRotation = part.ParentGroup.RootPart.RotationOffset; 2843 Quaternion standRotation = part.ParentGroup.RootPart.RotationOffset;
2844 Vector3 sitPartWorldPosition = part.ParentGroup.AbsolutePosition + m_pos * standRotation; 2844 Vector3 sitPartWorldPosition = part.ParentGroup.AbsolutePosition + m_pos * standRotation;
@@ -3132,8 +3132,6 @@ namespace OpenSim.Region.Framework.Scenes
3132 Velocity = Vector3.Zero; 3132 Velocity = Vector3.Zero;
3133 m_AngularVelocity = Vector3.Zero; 3133 m_AngularVelocity = Vector3.Zero;
3134 3134
3135 part.AddSittingAvatar(this);
3136
3137 Vector3 cameraAtOffset = part.GetCameraAtOffset(); 3135 Vector3 cameraAtOffset = part.GetCameraAtOffset();
3138 Vector3 cameraEyeOffset = part.GetCameraEyeOffset(); 3136 Vector3 cameraEyeOffset = part.GetCameraEyeOffset();
3139 bool forceMouselook = part.GetForceMouselook(); 3137 bool forceMouselook = part.GetForceMouselook();
@@ -3158,7 +3156,6 @@ namespace OpenSim.Region.Framework.Scenes
3158 cameraEyeOffset = cameraEyeOffset * part.RotationOffset; 3156 cameraEyeOffset = cameraEyeOffset * part.RotationOffset;
3159 cameraEyeOffset += part.OffsetPosition; 3157 cameraEyeOffset += part.OffsetPosition;
3160 } 3158 }
3161
3162 } 3159 }
3163 3160
3164 m_pos = offset; 3161 m_pos = offset;
@@ -3168,19 +3165,13 @@ namespace OpenSim.Region.Framework.Scenes
3168 3165
3169 3166
3170 m_requestedSitTargetID = 0; 3167 m_requestedSitTargetID = 0;
3171 part.ParentGroup.AddAvatar(UUID); 3168 part.AddSittingAvatar(this);
3172 3169
3173 ParentPart = part; 3170 ParentPart = part;
3174 ParentID = part.LocalId; 3171 ParentID = part.LocalId;
3175 3172
3176 SendAvatarDataToAllAgents(); 3173 SendAvatarDataToAllAgents();
3177 3174
3178/*
3179 if(status == 3)
3180 Animator.TrySetMovementAnimation("SIT_GROUND");
3181 else
3182 Animator.TrySetMovementAnimation("SIT");
3183*/
3184 if (status == 3) 3175 if (status == 3)
3185 sitAnimation = "SIT_GROUND"; 3176 sitAnimation = "SIT_GROUND";
3186 else 3177 else
@@ -3275,7 +3266,7 @@ namespace OpenSim.Region.Framework.Scenes
3275// Name, part.AbsolutePosition, m_pos, ParentPosition, part.Name, part.LocalId); 3266// Name, part.AbsolutePosition, m_pos, ParentPosition, part.Name, part.LocalId);
3276 } 3267 }
3277 3268
3278 part.ParentGroup.AddAvatar(UUID); 3269 part.AddSittingAvatar(this);
3279 ParentPart = m_scene.GetSceneObjectPart(m_requestedSitTargetID); 3270 ParentPart = m_scene.GetSceneObjectPart(m_requestedSitTargetID);
3280 ParentID = m_requestedSitTargetID; 3271 ParentID = m_requestedSitTargetID;
3281 m_AngularVelocity = Vector3.Zero; 3272 m_AngularVelocity = Vector3.Zero;