aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-10 23:55:22 +0100
committerJustin Clark-Casey (justincc)2012-07-10 23:55:22 +0100
commit337ea019bd0fa617df00d7bee10b869e73a50075 (patch)
tree16adf25dde95a22169165ff4166304e5814154c6 /OpenSim/Region
parentrefactor: move management of SOP.SitTargetAvatar into SOP.AddSittingAvatar() ... (diff)
downloadopensim-SC_OLD-337ea019bd0fa617df00d7bee10b869e73a50075.zip
opensim-SC_OLD-337ea019bd0fa617df00d7bee10b869e73a50075.tar.gz
opensim-SC_OLD-337ea019bd0fa617df00d7bee10b869e73a50075.tar.bz2
opensim-SC_OLD-337ea019bd0fa617df00d7bee10b869e73a50075.tar.xz
If a part has a sit target and an avatar is already sitting, allow another avatar to sit in the position given if no sit target was set.
Previous behave was that the second avatar could not sit. This matches behaviour observed on the LL grid.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs11
1 files changed, 4 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 514c314..0e7f2e5 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1872,18 +1872,15 @@ namespace OpenSim.Region.Framework.Scenes
1872 bool canSit = false; 1872 bool canSit = false;
1873 Vector3 pos = part.AbsolutePosition + offset; 1873 Vector3 pos = part.AbsolutePosition + offset;
1874 1874
1875 if (part.IsSitTargetSet) 1875 if (part.IsSitTargetSet && part.SitTargetAvatar == UUID.Zero)
1876 { 1876 {
1877 if (part.SitTargetAvatar == UUID.Zero)
1878 {
1879// m_log.DebugFormat( 1877// m_log.DebugFormat(
1880// "[SCENE PRESENCE]: Sitting {0} on {1} {2} because sit target is set and unoccupied", 1878// "[SCENE PRESENCE]: Sitting {0} on {1} {2} because sit target is set and unoccupied",
1881// Name, part.Name, part.LocalId); 1879// Name, part.Name, part.LocalId);
1882 1880
1883 offset = part.SitTargetPosition; 1881 offset = part.SitTargetPosition;
1884 sitOrientation = part.SitTargetOrientation; 1882 sitOrientation = part.SitTargetOrientation;
1885 canSit = true; 1883 canSit = true;
1886 }
1887 } 1884 }
1888 else 1885 else
1889 { 1886 {