aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/world/World.cs
diff options
context:
space:
mode:
authorgareth2007-03-01 15:15:45 +0000
committergareth2007-03-01 15:15:45 +0000
commit417ea24b833f470042c8e767cea7ec028758ab3e (patch)
tree7bf768cc59c8c4774d648382edb678e934e2fd63 /src/world/World.cs
parentFixed small bug in Terrain Encoding (diff)
downloadopensim-SC-417ea24b833f470042c8e767cea7ec028758ab3e.zip
opensim-SC-417ea24b833f470042c8e767cea7ec028758ab3e.tar.gz
opensim-SC-417ea24b833f470042c8e767cea7ec028758ab3e.tar.bz2
opensim-SC-417ea24b833f470042c8e767cea7ec028758ab3e.tar.xz
Lovely lovely flat island :)
Diffstat (limited to '')
-rw-r--r--src/world/World.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/world/World.cs b/src/world/World.cs
index 854e8fe..ebbd61e 100644
--- a/src/world/World.cs
+++ b/src/world/World.cs
@@ -14,19 +14,19 @@ namespace OpenSim.world
14 public TerrainDecode terrainengine = new TerrainDecode(); 14 public TerrainDecode terrainengine = new TerrainDecode();
15 public uint _localNumber=0; 15 public uint _localNumber=0;
16 16
17 private Random Rand = new Random();
18
17 public World() 19 public World()
18 { 20 {
19 Console.WriteLine("World.cs - creating new entitities instance"); 21 Console.WriteLine("World.cs - creating new entitities instance");
20 Entities = new Dictionary<libsecondlife.LLUUID, Entity>(); 22 Entities = new Dictionary<libsecondlife.LLUUID, Entity>();
21 23
22 // We need a 16x16 array of 16m2 surface patches for a 256m2 sim
23 Console.WriteLine("World.cs - creating LandMap"); 24 Console.WriteLine("World.cs - creating LandMap");
24 terrainengine = new TerrainDecode(); 25 terrainengine = new TerrainDecode();
25 LandMap = new float[65536]; 26 LandMap = new float[65536];
26 for(int i =0; i < 65536; i++) { 27 for(int i =0; i < 65536; i++) {
27 LandMap[i] = 40f; 28 LandMap[i] = 21.4989f;
28 } 29 }
29
30 30
31 Console.WriteLine("World.cs - Creating script engine instance"); 31 Console.WriteLine("World.cs - Creating script engine instance");
32 // Initialise this only after the world has loaded 32 // Initialise this only after the world has loaded
@@ -42,8 +42,8 @@ namespace OpenSim.world
42 } 42 }
43 43
44 public void SendLayerData(OpenSimClient RemoteClient) { 44 public void SendLayerData(OpenSimClient RemoteClient) {
45 for(int i=1; i<16; i++) { 45 for(int x=0; x<16; x=x+4) for(int y=0; y<16; y++){
46 Packet layerpack=this.terrainengine.CreateLayerPacket(LandMap, i,1,1,16); 46 Packet layerpack=this.terrainengine.CreateLayerPacket(LandMap, x,y,x+4,y+1);
47 RemoteClient.OutPacket(layerpack); 47 RemoteClient.OutPacket(layerpack);
48 } 48 }
49 } 49 }