From cb33169fe6836bb3d5b300a01d12f78246a45780 Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 29 May 2007 17:49:39 +0000 Subject: --- Common/OpenSim.Framework/Interfaces/IClientAPI.cs | 2 ++ OpenSim/OpenSim.World/Avatar.cs | 4 +-- OpenSim/OpenSim.World/World.cs | 4 +-- OpenSim/OpenSim.World/WorldBase.cs | 40 ++--------------------- 4 files changed, 8 insertions(+), 42 deletions(-) diff --git a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs index 8ba1571..e557b6e 100644 --- a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs +++ b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs @@ -70,5 +70,7 @@ namespace OpenSim.Framework.Interfaces void OutPacket(Packet newPack); void SendWearables(AvatarWearable[] wearables); void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); + void SendLayerData(float[] map); + void SendRegionHandshake(RegionInfo regionInfo); } } diff --git a/OpenSim/OpenSim.World/Avatar.cs b/OpenSim/OpenSim.World/Avatar.cs index 2469860..3c22db2 100644 --- a/OpenSim/OpenSim.World/Avatar.cs +++ b/OpenSim/OpenSim.World/Avatar.cs @@ -130,9 +130,9 @@ namespace OpenSim.world } //really really should be moved somewhere else (RegionInfo.cs ?) - public void SendRegionHandshake(World regionInfo) + public void SendRegionHandshake(RegionInfo regionInfo) { - + this.ControllingClient.SendRegionHandshake(regionInfo); } public static void LoadAnims() diff --git a/OpenSim/OpenSim.World/World.cs b/OpenSim/OpenSim.World/World.cs index c67366a..8e8ab3e 100644 --- a/OpenSim/OpenSim.World/World.cs +++ b/OpenSim/OpenSim.World/World.cs @@ -504,7 +504,7 @@ namespace OpenSim.world public override void AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child) { remoteClient.OnRegionHandShakeReply += new GenericCall(this.SendLayerData); - remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims); + //remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims); Avatar newAvatar = null; try @@ -513,7 +513,7 @@ namespace OpenSim.world newAvatar = new Avatar(remoteClient, this, m_clientThreads, this.m_regInfo); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake "); - newAvatar.SendRegionHandshake(this); + newAvatar.SendRegionHandshake(this.m_regInfo); PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); lock (this.LockPhysicsEngine) diff --git a/OpenSim/OpenSim.World/WorldBase.cs b/OpenSim/OpenSim.World/WorldBase.cs index f8a4eda..4371b6d 100644 --- a/OpenSim/OpenSim.World/WorldBase.cs +++ b/OpenSim/OpenSim.World/WorldBase.cs @@ -85,28 +85,7 @@ namespace OpenSim.world /// Client to send to public virtual void SendLayerData(IClientAPI RemoteClient) { - try - { - int[] patches = new int[4]; - - for (int y = 0; y < 16; y++) - { - for (int x = 0; x < 16; x = x + 4) - { - patches[0] = x + 0 + y * 16; - patches[1] = x + 1 + y * 16; - patches[2] = x + 2 + y * 16; - patches[3] = x + 3 + y * 16; - - Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches); - RemoteClient.OutPacket(layerpack); - } - } - } - catch (Exception e) - { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: SendLayerData() - Failed with exception " + e.ToString()); - } + RemoteClient.SendLayerData(Terrain.getHeights1D()); } /// @@ -117,22 +96,7 @@ namespace OpenSim.world /// The client to send to public void SendLayerData(int px, int py, IClientAPI RemoteClient) { - try - { - int[] patches = new int[1]; - int patchx, patchy; - patchx = px / 16; - patchy = py / 16; - - patches[0] = patchx + 0 + patchy * 16; - - Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches); - RemoteClient.OutPacket(layerpack); - } - catch (Exception e) - { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: SendLayerData() - Failed with exception " + e.ToString()); - } + } #endregion -- cgit v1.1