* Small bugfix: Avatar rezzing from grid mode should no longer place you underground if you have terrain of reasonable height.

zircon^2
Adam Frisby 2007-06-05 11:59:38 +00:00
parent 3c261876a1
commit 7347f146c6
2 changed files with 7 additions and 0 deletions

View File

@ -118,6 +118,12 @@ namespace OpenSim
{ {
this.m_child = m_authenticateSessionsHandler.GetAgentChildStatus(initialcirpack.CircuitCode.Code); this.m_child = m_authenticateSessionsHandler.GetAgentChildStatus(initialcirpack.CircuitCode.Code);
this.startpos = m_authenticateSessionsHandler.GetPosition(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); //Console.WriteLine("start pos is " + this.startpos.X + " , " + this.startpos.Y + " , " + this.startpos.Z);
} }
else else

View File

@ -378,6 +378,7 @@ namespace OpenSim.world
PData.PathTaperY = objupdate.ObjectData[0].PathTaperY = addPacket.ObjectData.PathTaperY; PData.PathTaperY = objupdate.ObjectData[0].PathTaperY = addPacket.ObjectData.PathTaperY;
PData.PathTwist = objupdate.ObjectData[0].PathTwist = addPacket.ObjectData.PathTwist; PData.PathTwist = objupdate.ObjectData[0].PathTwist = addPacket.ObjectData.PathTwist;
PData.PathTwistBegin = objupdate.ObjectData[0].PathTwistBegin = addPacket.ObjectData.PathTwistBegin; PData.PathTwistBegin = objupdate.ObjectData[0].PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
objupdate.ObjectData[0].ID = (uint)(localID); objupdate.ObjectData[0].ID = (uint)(localID);
objupdate.ObjectData[0].FullID = new LLUUID("edba7151-5857-acc5-b30b-f01efef" + (localID - 702000).ToString("00000")); objupdate.ObjectData[0].FullID = new LLUUID("edba7151-5857-acc5-b30b-f01efef" + (localID - 702000).ToString("00000"));
objupdate.ObjectData[0].ObjectData = new byte[60]; objupdate.ObjectData[0].ObjectData = new byte[60];