From 7347f146c6f402351917a04e76abc353c03503b6 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Tue, 5 Jun 2007 11:59:38 +0000 Subject: [PATCH] * Small bugfix: Avatar rezzing from grid mode should no longer place you underground if you have terrain of reasonable height. --- OpenSim/OpenSim.RegionServer/ClientView.cs | 6 ++++++ OpenSim/OpenSim.RegionServer/world/Primitive.cs | 1 + 2 files changed, 7 insertions(+) diff --git a/OpenSim/OpenSim.RegionServer/ClientView.cs b/OpenSim/OpenSim.RegionServer/ClientView.cs index 51e5fd6c29..586c9dfc4f 100644 --- a/OpenSim/OpenSim.RegionServer/ClientView.cs +++ b/OpenSim/OpenSim.RegionServer/ClientView.cs @@ -118,6 +118,12 @@ namespace OpenSim { this.m_child = m_authenticateSessionsHandler.GetAgentChildStatus(initialcirpack.CircuitCode.Code); this.startpos = m_authenticateSessionsHandler.GetPosition(initialcirpack.CircuitCode.Code); + + // Dont rez new users underground + float aboveGround = 3.0f; // rez at least 3 meters above ground + if (this.startpos.Z < (m_world.Terrain[(int)this.startpos.X, (int)this.startpos.Y] + aboveGround)) + this.startpos.Z = m_world.Terrain[(int)this.startpos.X, (int)this.startpos.Y] + aboveGround; + //Console.WriteLine("start pos is " + this.startpos.X + " , " + this.startpos.Y + " , " + this.startpos.Z); } else diff --git a/OpenSim/OpenSim.RegionServer/world/Primitive.cs b/OpenSim/OpenSim.RegionServer/world/Primitive.cs index e048a9ecc6..ed24504cad 100644 --- a/OpenSim/OpenSim.RegionServer/world/Primitive.cs +++ b/OpenSim/OpenSim.RegionServer/world/Primitive.cs @@ -378,6 +378,7 @@ namespace OpenSim.world PData.PathTaperY = objupdate.ObjectData[0].PathTaperY = addPacket.ObjectData.PathTaperY; PData.PathTwist = objupdate.ObjectData[0].PathTwist = addPacket.ObjectData.PathTwist; PData.PathTwistBegin = objupdate.ObjectData[0].PathTwistBegin = addPacket.ObjectData.PathTwistBegin; + objupdate.ObjectData[0].ID = (uint)(localID); objupdate.ObjectData[0].FullID = new LLUUID("edba7151-5857-acc5-b30b-f01efef" + (localID - 702000).ToString("00000")); objupdate.ObjectData[0].ObjectData = new byte[60];