aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--opensim.build2
-rw-r--r--src/OpenSimClient.cs5
-rw-r--r--src/world/Avatar.cs4
-rw-r--r--src/world/TerrainDecoder.cs2
-rw-r--r--src/world/World.cs26
5 files changed, 26 insertions, 13 deletions
diff --git a/opensim.build b/opensim.build
index d91e748..e2bf633 100644
--- a/opensim.build
+++ b/opensim.build
@@ -37,7 +37,7 @@
37 <attribute type="AssemblyCopyrightAttribute" value="Copyright © OGS development team 2007"/> 37 <attribute type="AssemblyCopyrightAttribute" value="Copyright © OGS development team 2007"/>
38 </attributes> 38 </attributes>
39 </asminfo> 39 </asminfo>
40 <csc target="exe" output="bin/OpenSim.exe" debug="${debug}" verbose="true"> 40 <csc target="exe" output="bin/OpenSim.exe" debug="${debug}" verbose="true" warninglevel="4">
41 <references basedir="bin/" failonempty="true"> 41 <references basedir="bin/" failonempty="true">
42 <include name="System" /> 42 <include name="System" />
43 <include name="System.Data" /> 43 <include name="System.Data" />
diff --git a/src/OpenSimClient.cs b/src/OpenSimClient.cs
index d3f90b7..b430c3e 100644
--- a/src/OpenSimClient.cs
+++ b/src/OpenSimClient.cs
@@ -83,6 +83,9 @@ namespace OpenSim
83 case PacketType.CompleteAgentMovement: 83 case PacketType.CompleteAgentMovement:
84 ClientAvatar.CompleteMovement(OpenSim_Main.local_world); 84 ClientAvatar.CompleteMovement(OpenSim_Main.local_world);
85 break; 85 break;
86 case PacketType.RegionHandshakeReply:
87 OpenSim_Main.local_world.SendLayerData(this);
88 break;
86 } 89 }
87 } 90 }
88 91
@@ -285,7 +288,7 @@ namespace OpenSim
285 AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed); 288 AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed);
286 AckTimer.Start(); 289 AckTimer.Start();
287 290
288 Thread ClientThread = new Thread(new ThreadStart(AuthUser)); 291 ClientThread = new Thread(new ThreadStart(AuthUser));
289 ClientThread.IsBackground = true; 292 ClientThread.IsBackground = true;
290 ClientThread.Start(); 293 ClientThread.Start();
291 } 294 }
diff --git a/src/world/Avatar.cs b/src/world/Avatar.cs
index 863ce29..dfb739e 100644
--- a/src/world/Avatar.cs
+++ b/src/world/Avatar.cs
@@ -25,7 +25,7 @@ namespace OpenSim.world
25 mov.Data.RegionHandle = OpenSim_Main.cfg.RegionHandle; 25 mov.Data.RegionHandle = OpenSim_Main.cfg.RegionHandle;
26 // TODO - dynamicalise this stuff 26 // TODO - dynamicalise this stuff
27 mov.Data.Timestamp = 1169838966; 27 mov.Data.Timestamp = 1169838966;
28 mov.Data.Position = new LLVector3(100f, 100f, 22f); 28 mov.Data.Position = new LLVector3(100f, 100f, 35f);
29 mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0); 29 mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0);
30 30
31 Console.WriteLine("Sending AgentMovementComplete packet"); 31 Console.WriteLine("Sending AgentMovementComplete packet");
@@ -49,7 +49,7 @@ namespace OpenSim.world
49 handshake.RegionInfo.TerrainStartHeight10 = 20; 49 handshake.RegionInfo.TerrainStartHeight10 = 20;
50 handshake.RegionInfo.TerrainStartHeight11 = 20; 50 handshake.RegionInfo.TerrainStartHeight11 = 20;
51 handshake.RegionInfo.SimAccess = 13; 51 handshake.RegionInfo.SimAccess = 13;
52 handshake.RegionInfo.WaterHeight = 5; 52 handshake.RegionInfo.WaterHeight = 10;
53 handshake.RegionInfo.RegionFlags = 72458694; 53 handshake.RegionInfo.RegionFlags = 72458694;
54 handshake.RegionInfo.SimName = _enc.GetBytes(OpenSim_Main.cfg.RegionName + "\0"); 54 handshake.RegionInfo.SimName = _enc.GetBytes(OpenSim_Main.cfg.RegionName + "\0");
55 handshake.RegionInfo.SimOwner = new LLUUID("00000000-0000-0000-0000-000000000000"); 55 handshake.RegionInfo.SimOwner = new LLUUID("00000000-0000-0000-0000-000000000000");
diff --git a/src/world/TerrainDecoder.cs b/src/world/TerrainDecoder.cs
index 0f1b733..0c72c92 100644
--- a/src/world/TerrainDecoder.cs
+++ b/src/world/TerrainDecoder.cs
@@ -410,7 +410,7 @@ namespace OpenSim
410 return output; 410 return output;
411 } 411 }
412 412
413 public Packet CreateLayerPacket(float[] heightmap, int minX, int maxX, int minY, int maxY) 413 public Packet CreateLayerPacket(float[] heightmap, int minX, int minY, int maxX, int maxY)
414 { 414 {
415 //int minX = 0, maxX = 2, minY = 0, maxY = 1; //these should be passed to this function 415 //int minX = 0, maxX = 2, minY = 0, maxY = 1; //these should be passed to this function
416 LayerDataPacket layer = new LayerDataPacket(); 416 LayerDataPacket layer = new LayerDataPacket();
diff --git a/src/world/World.cs b/src/world/World.cs
index cf337a8..d7e3370 100644
--- a/src/world/World.cs
+++ b/src/world/World.cs
@@ -1,5 +1,6 @@
1using System; 1using System;
2using libsecondlife; 2using libsecondlife;
3using libsecondlife.Packets;
3using System.Collections.Generic; 4using System.Collections.Generic;
4using System.Text; 5using System.Text;
5 6
@@ -8,8 +9,10 @@ namespace OpenSim.world
8 public class World 9 public class World
9 { 10 {
10 public Dictionary<libsecondlife.LLUUID, Entity> Entities; 11 public Dictionary<libsecondlife.LLUUID, Entity> Entities;
11 public SurfacePatch[] LandMap; 12 public float[] LandMap;
12 public ScriptEngine Scripts; 13 public ScriptEngine Scripts;
14 public TerrainDecode terrainengine = new TerrainDecode();
15
13 16
14 public World() 17 public World()
15 { 18 {
@@ -18,13 +21,13 @@ namespace OpenSim.world
18 21
19 // We need a 16x16 array of 16m2 surface patches for a 256m2 sim 22 // We need a 16x16 array of 16m2 surface patches for a 256m2 sim
20 Console.WriteLine("World.cs - creating LandMap"); 23 Console.WriteLine("World.cs - creating LandMap");
21 LandMap = new SurfacePatch[16*16]; 24 terrainengine = new TerrainDecode();
22 int xinc; 25 LandMap = new float[65536];
23 int yinc; 26 for(int i =0; i < 65536; i++) {
24 for(xinc=0; xinc<16; xinc++) for(yinc=0; yinc<16; yinc++) { 27 LandMap[i] = 30.4989f;
25 LandMap[xinc+(yinc*16)]=new SurfacePatch(); 28 }
26 } 29
27 30
28 Console.WriteLine("World.cs - Creating script engine instance"); 31 Console.WriteLine("World.cs - Creating script engine instance");
29 // Initialise this only after the world has loaded 32 // Initialise this only after the world has loaded
30 Scripts = new ScriptEngine(this); 33 Scripts = new ScriptEngine(this);
@@ -38,6 +41,13 @@ namespace OpenSim.world
38 } 41 }
39 } 42 }
40 43
44 public void SendLayerData(OpenSimClient RemoteClient) {
45 for(int i=1; i<16; i++) {
46 Packet layerpack=this.terrainengine.CreateLayerPacket(LandMap, i,1,1,16);
47 RemoteClient.OutPacket(layerpack);
48 }
49 }
50
41 public void AddViewerAgent(OpenSimClient AgentClient) { 51 public void AddViewerAgent(OpenSimClient AgentClient) {
42 Console.WriteLine("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); 52 Console.WriteLine("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
43 Avatar NewAvatar = new Avatar(AgentClient); 53 Avatar NewAvatar = new Avatar(AgentClient);