Stop "sit user name" and "stand user name" console commands from trying to sit/stand avatars already sitting/standing

0.7.6-extended
Justin Clark-Casey (justincc) 2013-08-22 20:05:57 +01:00
parent 689cf2d367
commit 832c35d4d5
1 changed files with 8 additions and 2 deletions

View File

@ -119,6 +119,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
foreach (ScenePresence sp in scenePresences)
{
if (sp.SitGround || sp.IsSatOnObject)
continue;
SceneObjectPart sitPart = null;
List<SceneObjectGroup> sceneObjects = m_scene.GetSceneObjectGroups();
@ -169,8 +172,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
foreach (ScenePresence sp in scenePresences)
{
MainConsole.Instance.OutputFormat("Standing {0} in {1}", sp.Name, m_scene.Name);
sp.StandUp();
if (sp.SitGround || sp.IsSatOnObject)
{
MainConsole.Instance.OutputFormat("Standing {0} in {1}", sp.Name, m_scene.Name);
sp.StandUp();
}
}
}