diff options
author | MW | 2007-05-29 17:49:39 +0000 |
---|---|---|
committer | MW | 2007-05-29 17:49:39 +0000 |
commit | cb33169fe6836bb3d5b300a01d12f78246a45780 (patch) | |
tree | 4b45e8f5da2c777846aa3b2e47d04d5a8b6cd605 /OpenSim/OpenSim.World/WorldBase.cs | |
parent | (no commit message) (diff) | |
download | opensim-SC_OLD-cb33169fe6836bb3d5b300a01d12f78246a45780.zip opensim-SC_OLD-cb33169fe6836bb3d5b300a01d12f78246a45780.tar.gz opensim-SC_OLD-cb33169fe6836bb3d5b300a01d12f78246a45780.tar.bz2 opensim-SC_OLD-cb33169fe6836bb3d5b300a01d12f78246a45780.tar.xz |
Diffstat (limited to 'OpenSim/OpenSim.World/WorldBase.cs')
-rw-r--r-- | OpenSim/OpenSim.World/WorldBase.cs | 40 |
1 files changed, 2 insertions, 38 deletions
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 | ||