diff options
author | Justin Clark-Casey (justincc) | 2012-07-09 21:43:44 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-09 21:43:44 +0100 |
commit | d6f563794efb857210f4c773ef5218855c9a4ea4 (patch) | |
tree | 3aa8f553ff59c4a13bd7ec748c91c1c682370eb0 /OpenSim/Region | |
parent | Do not allow a script to attach a prim if its being sat upon. (diff) | |
download | opensim-SC-d6f563794efb857210f4c773ef5218855c9a4ea4.zip opensim-SC-d6f563794efb857210f4c773ef5218855c9a4ea4.tar.gz opensim-SC-d6f563794efb857210f4c773ef5218855c9a4ea4.tar.bz2 opensim-SC-d6f563794efb857210f4c773ef5218855c9a4ea4.tar.xz |
Don't allow a prim to be sat upon if its part of an attachment
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c6a2a03..51ca9bd 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2219,6 +2219,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
2219 | 2219 | ||
2220 | if (part != null) | 2220 | if (part != null) |
2221 | { | 2221 | { |
2222 | if (part.ParentGroup.IsAttachment) | ||
2223 | { | ||
2224 | m_log.WarnFormat( | ||
2225 | "[SCENE PRESENCE]: Avatar {0} tried to sit on part {1} from object {2} in {3} but this is an attachment for avatar id {4}", | ||
2226 | Name, part.Name, part.ParentGroup.Name, Scene.Name, part.ParentGroup.AttachedAvatar); | ||
2227 | |||
2228 | return; | ||
2229 | } | ||
2230 | |||
2222 | if (part.SitTargetAvatar == UUID) | 2231 | if (part.SitTargetAvatar == UUID) |
2223 | { | 2232 | { |
2224 | Vector3 sitTargetPos = part.SitTargetPosition; | 2233 | Vector3 sitTargetPos = part.SitTargetPosition; |