Lovely lovely flat island :)

brokenplugins
gareth 2007-03-01 15:15:45 +00:00
parent 5239de16df
commit 417ea24b83
2 changed files with 11 additions and 11 deletions

View File

@ -39,7 +39,7 @@ namespace OpenSim.world
pos.X = 100f; pos.X = 100f;
objdata.ID = 8880000; objdata.ID = 8880000;
objdata.NameValue = enc.GetBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User \0"); objdata.NameValue = enc.GetBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User \0");
libsecondlife.LLVector3 pos2 = new LLVector3(13.981f,100.0f,20.0f); libsecondlife.LLVector3 pos2 = new LLVector3(100f,100f,23f);
//objdata.FullID=user.AgentID; //objdata.FullID=user.AgentID;
byte[] pb = pos.GetBytes(); byte[] pb = pos.GetBytes();
Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length); Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length);
@ -55,8 +55,8 @@ namespace OpenSim.world
mov.AgentData.AgentID = this.ControllingClient.AgentID; mov.AgentData.AgentID = this.ControllingClient.AgentID;
mov.Data.RegionHandle = OpenSim_Main.cfg.RegionHandle; mov.Data.RegionHandle = OpenSim_Main.cfg.RegionHandle;
// TODO - dynamicalise this stuff // TODO - dynamicalise this stuff
mov.Data.Timestamp = 1169838966; mov.Data.Timestamp = 1172750370;
mov.Data.Position = new LLVector3(100f, 100f, 35f); mov.Data.Position = new LLVector3(100f, 100f, 23f);
mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0); mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0);
Console.WriteLine("Sending AgentMovementComplete packet"); Console.WriteLine("Sending AgentMovementComplete packet");
@ -80,7 +80,7 @@ namespace OpenSim.world
objupdate.ObjectData[0].FullID = ControllingClient.AgentID; objupdate.ObjectData[0].FullID = ControllingClient.AgentID;
objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstname + "\nLastName STRING RW SV " + lastname + " \0"); objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstname + "\nLastName STRING RW SV " + lastname + " \0");
libsecondlife.LLVector3 pos2 = new LLVector3(100f, 100.0f, 22.0f); libsecondlife.LLVector3 pos2 = new LLVector3(100f, 100.0f, 23.0f);
byte[] pb = pos2.GetBytes(); byte[] pb = pos2.GetBytes();

View File

@ -14,20 +14,20 @@ namespace OpenSim.world
public TerrainDecode terrainengine = new TerrainDecode(); public TerrainDecode terrainengine = new TerrainDecode();
public uint _localNumber=0; public uint _localNumber=0;
private Random Rand = new Random();
public World() public World()
{ {
Console.WriteLine("World.cs - creating new entitities instance"); Console.WriteLine("World.cs - creating new entitities instance");
Entities = new Dictionary<libsecondlife.LLUUID, Entity>(); Entities = new Dictionary<libsecondlife.LLUUID, Entity>();
// We need a 16x16 array of 16m2 surface patches for a 256m2 sim
Console.WriteLine("World.cs - creating LandMap"); Console.WriteLine("World.cs - creating LandMap");
terrainengine = new TerrainDecode(); terrainengine = new TerrainDecode();
LandMap = new float[65536]; LandMap = new float[65536];
for(int i =0; i < 65536; i++) { for(int i =0; i < 65536; i++) {
LandMap[i] = 40f; LandMap[i] = 21.4989f;
} }
Console.WriteLine("World.cs - Creating script engine instance"); Console.WriteLine("World.cs - Creating script engine instance");
// Initialise this only after the world has loaded // Initialise this only after the world has loaded
Scripts = new ScriptEngine(this); Scripts = new ScriptEngine(this);
@ -42,8 +42,8 @@ namespace OpenSim.world
} }
public void SendLayerData(OpenSimClient RemoteClient) { public void SendLayerData(OpenSimClient RemoteClient) {
for(int i=1; i<16; i++) { for(int x=0; x<16; x=x+4) for(int y=0; y<16; y++){
Packet layerpack=this.terrainengine.CreateLayerPacket(LandMap, i,1,1,16); Packet layerpack=this.terrainengine.CreateLayerPacket(LandMap, x,y,x+4,y+1);
RemoteClient.OutPacket(layerpack); RemoteClient.OutPacket(layerpack);
} }
} }