From cb33169fe6836bb3d5b300a01d12f78246a45780 Mon Sep 17 00:00:00 2001
From: MW
Date: Tue, 29 May 2007 17:49:39 +0000
Subject:
---
OpenSim/OpenSim.World/Avatar.cs | 4 ++--
OpenSim/OpenSim.World/World.cs | 4 ++--
OpenSim/OpenSim.World/WorldBase.cs | 40 ++------------------------------------
3 files changed, 6 insertions(+), 42 deletions(-)
(limited to 'OpenSim/OpenSim.World')
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