aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorBrian McBee2007-11-25 17:53:16 +0000
committerBrian McBee2007-11-25 17:53:16 +0000
commit7720be5a396c58e2d018c1eb9651d9e619e6a8d9 (patch)
tree75f10963e09f2ad87462019516e950aa131f8d38 /OpenSim/Region
parent* Added the ability to restart your individual sims from within them using th... (diff)
downloadopensim-SC-7720be5a396c58e2d018c1eb9651d9e619e6a8d9.zip
opensim-SC-7720be5a396c58e2d018c1eb9651d9e619e6a8d9.tar.gz
opensim-SC-7720be5a396c58e2d018c1eb9651d9e619e6a8d9.tar.bz2
opensim-SC-7720be5a396c58e2d018c1eb9651d9e619e6a8d9.tar.xz
Rez new prims ON the ground, not halfway buried. Mantis 33.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 9cdb49b..caff3bb 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -754,22 +754,28 @@ namespace OpenSim.Region.Environment.Scenes
754 // We will rez the object somewhere close to the prim. Better math needed. This is a Stub 754 // We will rez the object somewhere close to the prim. Better math needed. This is a Stub
755 //Vector3 Newpos = new Vector3(rayTracing.obj.AbsolutePosition.X,rayTracing.obj.AbsolutePosition.Y,rayTracing.obj.AbsolutePosition.Z); 755 //Vector3 Newpos = new Vector3(rayTracing.obj.AbsolutePosition.X,rayTracing.obj.AbsolutePosition.Y,rayTracing.obj.AbsolutePosition.Z);
756 Vector3 Newpos = rayTracing.ipoint; 756 Vector3 Newpos = rayTracing.ipoint;
757 Vector3 NewScale = new Vector3(rayTracing.obj.Scale.X,rayTracing.obj.Scale.Y,rayTracing.obj.Scale.Z); 757 Vector3 NewScale = new Vector3(rayTracing.obj.Scale.X, rayTracing.obj.Scale.Y, rayTracing.obj.Scale.Z);
758 758
759 Quaternion ParentRot = rayTracing.obj.ParentGroup.Rotation; 759 Quaternion ParentRot = rayTracing.obj.ParentGroup.Rotation;
760 //Quaternion ParentRot = new Quaternion(primParentRot.W,primParentRot.X,primParentRot.Y,primParentRot.Z); 760 //Quaternion ParentRot = new Quaternion(primParentRot.W,primParentRot.X,primParentRot.Y,primParentRot.Z);
761 761
762 LLQuaternion primLocalRot = rayTracing.obj.RotationOffset; 762 LLQuaternion primLocalRot = rayTracing.obj.RotationOffset;
763 Quaternion LocalRot = new Quaternion(primLocalRot.W,primLocalRot.X,primLocalRot.Y,primLocalRot.Z); 763 Quaternion LocalRot = new Quaternion(primLocalRot.W, primLocalRot.X, primLocalRot.Y, primLocalRot.Z);
764 764
765 Quaternion NewRot = LocalRot * ParentRot; 765 Quaternion NewRot = LocalRot * ParentRot;
766 766
767 Vector3 RezPoint = Newpos; 767 Vector3 RezPoint = Newpos;
768 768
769 MainLog.Instance.Verbose("REZINFO","Possible Rez Point:" + RezPoint.ToString()); 769 MainLog.Instance.Verbose("REZINFO", "Possible Rez Point:" + RezPoint.ToString());
770 //pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z); 770 //pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z);
771 771
772 } 772 }
773 else
774 {
775 // rez ON the ground, not IN the ground
776 pos.Z += 0.25F;
777 }
778
773 779
774 SceneObjectGroup sceneOb = 780 SceneObjectGroup sceneOb =
775 new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape); 781 new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape);