From a6c93ce875c9e563de791002b309a3285266d597 Mon Sep 17 00:00:00 2001 From: CasperW Date: Sat, 26 Dec 2009 22:55:18 +0100 Subject: [PATCH] Make sure that we're not bounds checking attachments. 'Cos otherwise your hair will end up on your bum. Seen that before? --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 998d598333..34a92fead7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -226,9 +226,9 @@ namespace OpenSim.Region.Framework.Scenes Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X, sceneObject.RootPart.GroupPosition.Y, sceneObject.RootPart.GroupPosition.Z); - if (npos.X < 0.0 || npos.Y < 0.0 || npos.Z < 0.0 || + if (!(((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0))) && (npos.X < 0.0 || npos.Y < 0.0 || npos.Z < 0.0 || npos.X > Constants.RegionSize || - npos.Y > Constants.RegionSize) + npos.Y > Constants.RegionSize)) { if (npos.X < 0.0) npos.X = 1.0f; if (npos.Y < 0.0) npos.Y = 1.0f;