From 9d1eacad7a03c437dad647e0ff134f2318dbdc45 Mon Sep 17 00:00:00 2001 From: mingchen Date: Fri, 8 Jun 2007 19:51:12 +0000 Subject: [PATCH] *Moved SendRegionHandshake back to IClientAPI and modded sendRegionHandshakeToAll to support the old method. (Again, my bad) --- OpenSim/OpenSim.World/Avatar.cs | 33 ++++++++++++++++- OpenSim/OpenSim.World/Estate/EstateManager.cs | 37 +------------------ 2 files changed, 33 insertions(+), 37 deletions(-) diff --git a/OpenSim/OpenSim.World/Avatar.cs b/OpenSim/OpenSim.World/Avatar.cs index 4c3bc348de..d597ca71a5 100644 --- a/OpenSim/OpenSim.World/Avatar.cs +++ b/OpenSim/OpenSim.World/Avatar.cs @@ -168,7 +168,38 @@ namespace OpenSim.world /// public void SendRegionHandshake() { - this.m_world.estateManager.sendRegionHandshake(this.ControllingClient); + System.Text.Encoding _enc = System.Text.Encoding.ASCII; + RegionHandshakePacket handshake = new RegionHandshakePacket(); + + handshake.RegionInfo.BillableFactor = m_regInfo.estateSettings.billableFactor; + handshake.RegionInfo.IsEstateManager = false; + handshake.RegionInfo.TerrainHeightRange00 = m_regInfo.estateSettings.terrainHeightRange0; + handshake.RegionInfo.TerrainHeightRange01 = m_regInfo.estateSettings.terrainHeightRange1; + handshake.RegionInfo.TerrainHeightRange10 = m_regInfo.estateSettings.terrainHeightRange2; + handshake.RegionInfo.TerrainHeightRange11 = m_regInfo.estateSettings.terrainHeightRange3; + handshake.RegionInfo.TerrainStartHeight00 = m_regInfo.estateSettings.terrainStartHeight0; + handshake.RegionInfo.TerrainStartHeight01 = m_regInfo.estateSettings.terrainStartHeight1; + handshake.RegionInfo.TerrainStartHeight10 = m_regInfo.estateSettings.terrainStartHeight2; + handshake.RegionInfo.TerrainStartHeight11 = m_regInfo.estateSettings.terrainStartHeight3; + handshake.RegionInfo.SimAccess = (byte)m_regInfo.estateSettings.simAccess; + handshake.RegionInfo.WaterHeight = m_regInfo.estateSettings.waterHeight; + + + handshake.RegionInfo.RegionFlags = (uint)m_regInfo.estateSettings.regionFlags; + + handshake.RegionInfo.SimName = _enc.GetBytes(m_regInfo.estateSettings.waterHeight + "\0"); + handshake.RegionInfo.SimOwner = m_regInfo.MasterAvatarAssignedUUID; + handshake.RegionInfo.TerrainBase0 = m_regInfo.estateSettings.terrainBase0; + handshake.RegionInfo.TerrainBase1 = m_regInfo.estateSettings.terrainBase1; + handshake.RegionInfo.TerrainBase2 = m_regInfo.estateSettings.terrainBase2; + handshake.RegionInfo.TerrainBase3 = m_regInfo.estateSettings.terrainBase3; + handshake.RegionInfo.TerrainDetail0 = m_regInfo.estateSettings.terrainDetail0; + handshake.RegionInfo.TerrainDetail1 = m_regInfo.estateSettings.terrainDetail1; + handshake.RegionInfo.TerrainDetail2 = m_regInfo.estateSettings.terrainDetail2; + handshake.RegionInfo.TerrainDetail3 = m_regInfo.estateSettings.terrainDetail3; + handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting? + + this.ControllingClient.OutPacket(handshake); } /// diff --git a/OpenSim/OpenSim.World/Estate/EstateManager.cs b/OpenSim/OpenSim.World/Estate/EstateManager.cs index cbcc702439..85d9b0c3db 100644 --- a/OpenSim/OpenSim.World/Estate/EstateManager.cs +++ b/OpenSim/OpenSim.World/Estate/EstateManager.cs @@ -227,7 +227,7 @@ namespace OpenSim.world.Estate { foreach (OpenSim.world.Avatar av in m_world.Avatars.Values) { - this.sendRegionHandshake(av.ControllingClient); + av.SendRegionHandshake(); } } @@ -259,40 +259,5 @@ namespace OpenSim.world.Estate remote_client.OutPacket(regionInfoPacket); } - public void sendRegionHandshake(IClientAPI remote_client) - { - System.Text.Encoding _enc = System.Text.Encoding.ASCII; - RegionHandshakePacket handshake = new RegionHandshakePacket(); - - handshake.RegionInfo.BillableFactor = m_regInfo.estateSettings.billableFactor; - handshake.RegionInfo.IsEstateManager = false; - handshake.RegionInfo.TerrainHeightRange00 = m_regInfo.estateSettings.terrainHeightRange0; - handshake.RegionInfo.TerrainHeightRange01 = m_regInfo.estateSettings.terrainHeightRange1; - handshake.RegionInfo.TerrainHeightRange10 = m_regInfo.estateSettings.terrainHeightRange2; - handshake.RegionInfo.TerrainHeightRange11 = m_regInfo.estateSettings.terrainHeightRange3; - handshake.RegionInfo.TerrainStartHeight00 = m_regInfo.estateSettings.terrainStartHeight0; - handshake.RegionInfo.TerrainStartHeight01 = m_regInfo.estateSettings.terrainStartHeight1; - handshake.RegionInfo.TerrainStartHeight10 = m_regInfo.estateSettings.terrainStartHeight2; - handshake.RegionInfo.TerrainStartHeight11 = m_regInfo.estateSettings.terrainStartHeight3; - handshake.RegionInfo.SimAccess = (byte)m_regInfo.estateSettings.simAccess; - handshake.RegionInfo.WaterHeight = m_regInfo.estateSettings.waterHeight; - - - handshake.RegionInfo.RegionFlags = (uint)m_regInfo.estateSettings.regionFlags; - - handshake.RegionInfo.SimName = _enc.GetBytes(m_regInfo.estateSettings.waterHeight + "\0"); - handshake.RegionInfo.SimOwner = m_regInfo.MasterAvatarAssignedUUID; - handshake.RegionInfo.TerrainBase0 = m_regInfo.estateSettings.terrainBase0; - handshake.RegionInfo.TerrainBase1 = m_regInfo.estateSettings.terrainBase1; - handshake.RegionInfo.TerrainBase2 = m_regInfo.estateSettings.terrainBase2; - handshake.RegionInfo.TerrainBase3 = m_regInfo.estateSettings.terrainBase3; - handshake.RegionInfo.TerrainDetail0 = m_regInfo.estateSettings.terrainDetail0; - handshake.RegionInfo.TerrainDetail1 = m_regInfo.estateSettings.terrainDetail1; - handshake.RegionInfo.TerrainDetail2 = m_regInfo.estateSettings.terrainDetail2; - handshake.RegionInfo.TerrainDetail3 = m_regInfo.estateSettings.terrainDetail3; - handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting? - - remote_client.OutPacket(handshake); - } } }