aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-05-29 17:49:39 +0000
committerMW2007-05-29 17:49:39 +0000
commitcb33169fe6836bb3d5b300a01d12f78246a45780 (patch)
tree4b45e8f5da2c777846aa3b2e47d04d5a8b6cd605
parent(no commit message) (diff)
downloadopensim-SC_OLD-cb33169fe6836bb3d5b300a01d12f78246a45780.zip
opensim-SC_OLD-cb33169fe6836bb3d5b300a01d12f78246a45780.tar.gz
opensim-SC_OLD-cb33169fe6836bb3d5b300a01d12f78246a45780.tar.bz2
opensim-SC_OLD-cb33169fe6836bb3d5b300a01d12f78246a45780.tar.xz
-rw-r--r--Common/OpenSim.Framework/Interfaces/IClientAPI.cs2
-rw-r--r--OpenSim/OpenSim.World/Avatar.cs4
-rw-r--r--OpenSim/OpenSim.World/World.cs4
-rw-r--r--OpenSim/OpenSim.World/WorldBase.cs40
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
70 void OutPacket(Packet newPack); 70 void OutPacket(Packet newPack);
71 void SendWearables(AvatarWearable[] wearables); 71 void SendWearables(AvatarWearable[] wearables);
72 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 72 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
73 void SendLayerData(float[] map);
74 void SendRegionHandshake(RegionInfo regionInfo);
73 } 75 }
74} 76}
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
130 } 130 }
131 131
132 //really really should be moved somewhere else (RegionInfo.cs ?) 132 //really really should be moved somewhere else (RegionInfo.cs ?)
133 public void SendRegionHandshake(World regionInfo) 133 public void SendRegionHandshake(RegionInfo regionInfo)
134 { 134 {
135 135 this.ControllingClient.SendRegionHandshake(regionInfo);
136 } 136 }
137 137
138 public static void LoadAnims() 138 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
504 public override void AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child) 504 public override void AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child)
505 { 505 {
506 remoteClient.OnRegionHandShakeReply += new GenericCall(this.SendLayerData); 506 remoteClient.OnRegionHandShakeReply += new GenericCall(this.SendLayerData);
507 remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims); 507 //remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
508 508
509 Avatar newAvatar = null; 509 Avatar newAvatar = null;
510 try 510 try
@@ -513,7 +513,7 @@ namespace OpenSim.world
513 newAvatar = new Avatar(remoteClient, this, m_clientThreads, this.m_regInfo); 513 newAvatar = new Avatar(remoteClient, this, m_clientThreads, this.m_regInfo);
514 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world"); 514 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world");
515 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake "); 515 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake ");
516 newAvatar.SendRegionHandshake(this); 516 newAvatar.SendRegionHandshake(this.m_regInfo);
517 517
518 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); 518 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
519 lock (this.LockPhysicsEngine) 519 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
85 /// <param name="RemoteClient">Client to send to</param> 85 /// <param name="RemoteClient">Client to send to</param>
86 public virtual void SendLayerData(IClientAPI RemoteClient) 86 public virtual void SendLayerData(IClientAPI RemoteClient)
87 { 87 {
88 try 88 RemoteClient.SendLayerData(Terrain.getHeights1D());
89 {
90 int[] patches = new int[4];
91
92 for (int y = 0; y < 16; y++)
93 {
94 for (int x = 0; x < 16; x = x + 4)
95 {
96 patches[0] = x + 0 + y * 16;
97 patches[1] = x + 1 + y * 16;
98 patches[2] = x + 2 + y * 16;
99 patches[3] = x + 3 + y * 16;
100
101 Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches);
102 RemoteClient.OutPacket(layerpack);
103 }
104 }
105 }
106 catch (Exception e)
107 {
108 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: SendLayerData() - Failed with exception " + e.ToString());
109 }
110 } 89 }
111 90
112 /// <summary> 91 /// <summary>
@@ -117,22 +96,7 @@ namespace OpenSim.world
117 /// <param name="RemoteClient">The client to send to</param> 96 /// <param name="RemoteClient">The client to send to</param>
118 public void SendLayerData(int px, int py, IClientAPI RemoteClient) 97 public void SendLayerData(int px, int py, IClientAPI RemoteClient)
119 { 98 {
120 try 99
121 {
122 int[] patches = new int[1];
123 int patchx, patchy;
124 patchx = px / 16;
125 patchy = py / 16;
126
127 patches[0] = patchx + 0 + patchy * 16;
128
129 Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches);
130 RemoteClient.OutPacket(layerpack);
131 }
132 catch (Exception e)
133 {
134 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: SendLayerData() - Failed with exception " + e.ToString());
135 }
136 } 100 }
137 #endregion 101 #endregion
138 102