aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/world
diff options
context:
space:
mode:
Diffstat (limited to 'src/world')
-rw-r--r--src/world/Avatar.cs8
-rw-r--r--src/world/World.cs14
2 files changed, 11 insertions, 11 deletions
diff --git a/src/world/Avatar.cs b/src/world/Avatar.cs
index b81fd0b..bcf79a8 100644
--- a/src/world/Avatar.cs
+++ b/src/world/Avatar.cs
@@ -39,7 +39,7 @@ namespace OpenSim.world
39 pos.X = 100f; 39 pos.X = 100f;
40 objdata.ID = 8880000; 40 objdata.ID = 8880000;
41 objdata.NameValue = enc.GetBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User \0"); 41 objdata.NameValue = enc.GetBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User \0");
42 libsecondlife.LLVector3 pos2 = new LLVector3(13.981f,100.0f,20.0f); 42 libsecondlife.LLVector3 pos2 = new LLVector3(100f,100f,23f);
43 //objdata.FullID=user.AgentID; 43 //objdata.FullID=user.AgentID;
44 byte[] pb = pos.GetBytes(); 44 byte[] pb = pos.GetBytes();
45 Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length); 45 Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length);
@@ -55,8 +55,8 @@ namespace OpenSim.world
55 mov.AgentData.AgentID = this.ControllingClient.AgentID; 55 mov.AgentData.AgentID = this.ControllingClient.AgentID;
56 mov.Data.RegionHandle = OpenSim_Main.cfg.RegionHandle; 56 mov.Data.RegionHandle = OpenSim_Main.cfg.RegionHandle;
57 // TODO - dynamicalise this stuff 57 // TODO - dynamicalise this stuff
58 mov.Data.Timestamp = 1169838966; 58 mov.Data.Timestamp = 1172750370;
59 mov.Data.Position = new LLVector3(100f, 100f, 35f); 59 mov.Data.Position = new LLVector3(100f, 100f, 23f);
60 mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0); 60 mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0);
61 61
62 Console.WriteLine("Sending AgentMovementComplete packet"); 62 Console.WriteLine("Sending AgentMovementComplete packet");
@@ -80,7 +80,7 @@ namespace OpenSim.world
80 objupdate.ObjectData[0].FullID = ControllingClient.AgentID; 80 objupdate.ObjectData[0].FullID = ControllingClient.AgentID;
81 objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstname + "\nLastName STRING RW SV " + lastname + " \0"); 81 objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstname + "\nLastName STRING RW SV " + lastname + " \0");
82 82
83 libsecondlife.LLVector3 pos2 = new LLVector3(100f, 100.0f, 22.0f); 83 libsecondlife.LLVector3 pos2 = new LLVector3(100f, 100.0f, 23.0f);
84 84
85 byte[] pb = pos2.GetBytes(); 85 byte[] pb = pos2.GetBytes();
86 86
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 }