aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/world
diff options
context:
space:
mode:
Diffstat (limited to 'src/world')
-rw-r--r--src/world/Avatar.cs15
-rw-r--r--src/world/PhysicsEngine.cs2
-rw-r--r--src/world/World.cs12
3 files changed, 13 insertions, 16 deletions
diff --git a/src/world/Avatar.cs b/src/world/Avatar.cs
index 6dcc1dd..26b2002 100644
--- a/src/world/Avatar.cs
+++ b/src/world/Avatar.cs
@@ -21,7 +21,7 @@ namespace OpenSim.world
21 private libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock AvatarTemplate; 21 private libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock AvatarTemplate;
22 22
23 public Avatar(OpenSimClient TheClient) { 23 public Avatar(OpenSimClient TheClient) {
24 Console.WriteLine("Avatar.cs - Loading details from grid (DUMMY)"); 24 OpenSim_Main.localcons.WriteLine("Avatar.cs - Loading details from grid (DUMMY)");
25 ControllingClient=TheClient; 25 ControllingClient=TheClient;
26 SetupTemplate("avatar-template.dat"); 26 SetupTemplate("avatar-template.dat");
27 27
@@ -32,8 +32,6 @@ namespace OpenSim.world
32 lock(this) { 32 lock(this) {
33 base.update(); 33 base.update();
34 34
35 Console.WriteLine("KeyMask: " + this.CurrentKeyMask);
36
37 oldvel=this.velocity; 35 oldvel=this.velocity;
38 oldpos=this.position; 36 oldpos=this.position;
39 if((this.CurrentKeyMask & (uint)MainAvatar.AgentUpdateFlags.AGENT_CONTROL_AT_POS) != 0) { 37 if((this.CurrentKeyMask & (uint)MainAvatar.AgentUpdateFlags.AGENT_CONTROL_AT_POS) != 0) {
@@ -42,7 +40,6 @@ namespace OpenSim.world
42 this.velocity.X = tmpVelocity.x; 40 this.velocity.X = tmpVelocity.x;
43 this.velocity.Y = tmpVelocity.y; 41 this.velocity.Y = tmpVelocity.y;
44 this.velocity.Z = tmpVelocity.z; 42 this.velocity.Z = tmpVelocity.z;
45 Console.WriteLine("Walking at "+ this.velocity.ToString());
46 this.walking=true; 43 this.walking=true;
47 } else { 44 } else {
48 this.velocity.X=0; 45 this.velocity.X=0;
@@ -82,7 +79,7 @@ namespace OpenSim.world
82 } 79 }
83 80
84 public void CompleteMovement(World RegionInfo) { 81 public void CompleteMovement(World RegionInfo) {
85 Console.WriteLine("Avatar.cs:CompleteMovement() - Constructing AgentMovementComplete packet"); 82 OpenSim_Main.localcons.WriteLine("Avatar.cs:CompleteMovement() - Constructing AgentMovementComplete packet");
86 AgentMovementCompletePacket mov = new AgentMovementCompletePacket(); 83 AgentMovementCompletePacket mov = new AgentMovementCompletePacket();
87 mov.AgentData.SessionID = this.ControllingClient.SessionID; 84 mov.AgentData.SessionID = this.ControllingClient.SessionID;
88 mov.AgentData.AgentID = this.ControllingClient.AgentID; 85 mov.AgentData.AgentID = this.ControllingClient.AgentID;
@@ -92,7 +89,7 @@ namespace OpenSim.world
92 mov.Data.Position = new LLVector3((float)this.position.X, (float)this.position.Y, (float)this.position.Z); 89 mov.Data.Position = new LLVector3((float)this.position.X, (float)this.position.Y, (float)this.position.Z);
93 mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0); 90 mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0);
94 91
95 Console.WriteLine("Sending AgentMovementComplete packet"); 92 OpenSim_Main.localcons.WriteLine("Sending AgentMovementComplete packet");
96 ControllingClient.OutPacket(mov); 93 ControllingClient.OutPacket(mov);
97 } 94 }
98 95
@@ -213,11 +210,11 @@ namespace OpenSim.world
213 } 210 }
214 211
215 public void SendRegionHandshake(World RegionInfo) { 212 public void SendRegionHandshake(World RegionInfo) {
216 Console.WriteLine("Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet"); 213 OpenSim_Main.localcons.WriteLine("Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet");
217 System.Text.Encoding _enc = System.Text.Encoding.ASCII; 214 System.Text.Encoding _enc = System.Text.Encoding.ASCII;
218 RegionHandshakePacket handshake = new RegionHandshakePacket(); 215 RegionHandshakePacket handshake = new RegionHandshakePacket();
219 216
220 Console.WriteLine("Avatar.cs:SendRegionhandshake() - Filling in RegionHandshake details"); 217 OpenSim_Main.localcons.WriteLine("Avatar.cs:SendRegionhandshake() - Filling in RegionHandshake details");
221 handshake.RegionInfo.BillableFactor = 0; 218 handshake.RegionInfo.BillableFactor = 0;
222 handshake.RegionInfo.IsEstateManager = false; 219 handshake.RegionInfo.IsEstateManager = false;
223 handshake.RegionInfo.TerrainHeightRange00 = 60; 220 handshake.RegionInfo.TerrainHeightRange00 = 60;
@@ -243,7 +240,7 @@ namespace OpenSim.world
243 handshake.RegionInfo.TerrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000"); 240 handshake.RegionInfo.TerrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000");
244 handshake.RegionInfo.CacheID = new LLUUID("545ec0a5-5751-1026-8a0b-216e38a7ab37"); 241 handshake.RegionInfo.CacheID = new LLUUID("545ec0a5-5751-1026-8a0b-216e38a7ab37");
245 242
246 Console.WriteLine("Avatar.cs:SendRegionHandshake() - Sending RegionHandshake packet"); 243 OpenSim_Main.localcons.WriteLine("Avatar.cs:SendRegionHandshake() - Sending RegionHandshake packet");
247 this.ControllingClient.OutPacket(handshake); 244 this.ControllingClient.OutPacket(handshake);
248 } 245 }
249 246
diff --git a/src/world/PhysicsEngine.cs b/src/world/PhysicsEngine.cs
index 4abf1f2..b237f5e 100644
--- a/src/world/PhysicsEngine.cs
+++ b/src/world/PhysicsEngine.cs
@@ -14,7 +14,7 @@ namespace OpenSim.world
14 } 14 }
15 15
16 public void Startup() { 16 public void Startup() {
17 Console.WriteLine("PhysicsEngine.cs:Startup() - DOING NOTHING, DUMMY FUNCTION!"); 17 OpenSim_Main.localcons.WriteLine("PhysicsEngine.cs:Startup() - DOING NOTHING, DUMMY FUNCTION!");
18 } 18 }
19 19
20 public void DoStuff(World simworld) { 20 public void DoStuff(World simworld) {
diff --git a/src/world/World.cs b/src/world/World.cs
index f32f9ef..2f73bd5 100644
--- a/src/world/World.cs
+++ b/src/world/World.cs
@@ -20,10 +20,10 @@ namespace OpenSim.world
20 20
21 public World() 21 public World()
22 { 22 {
23 Console.WriteLine("World.cs - creating new entitities instance"); 23 OpenSim_Main.localcons.WriteLine("World.cs - creating new entitities instance");
24 Entities = new Dictionary<libsecondlife.LLUUID, Entity>(); 24 Entities = new Dictionary<libsecondlife.LLUUID, Entity>();
25 25
26 Console.WriteLine("World.cs - creating LandMap"); 26 OpenSim_Main.localcons.WriteLine("World.cs - creating LandMap");
27 terrainengine = new TerrainDecode(); 27 terrainengine = new TerrainDecode();
28 LandMap = new float[65536]; 28 LandMap = new float[65536];
29 for(int i =0; i < 65536; i++) { 29 for(int i =0; i < 65536; i++) {
@@ -33,7 +33,7 @@ namespace OpenSim.world
33 } 33 }
34 34
35 public void InitLoop() { 35 public void InitLoop() {
36 Console.WriteLine("World.cs:StartLoop() - Initialising physics"); 36 OpenSim_Main.localcons.WriteLine("World.cs:StartLoop() - Initialising physics");
37 this.physics = new PhysicsEngine(); 37 this.physics = new PhysicsEngine();
38 physics.Startup(); 38 physics.Startup();
39 } 39 }
@@ -76,11 +76,11 @@ namespace OpenSim.world
76 } 76 }
77 77
78 public void AddViewerAgent(OpenSimClient AgentClient) { 78 public void AddViewerAgent(OpenSimClient AgentClient) {
79 Console.WriteLine("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); 79 OpenSim_Main.localcons.WriteLine("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
80 Avatar NewAvatar = new Avatar(AgentClient); 80 Avatar NewAvatar = new Avatar(AgentClient);
81 Console.WriteLine("World.cs:AddViewerAgent() - Adding new avatar to world"); 81 OpenSim_Main.localcons.WriteLine("World.cs:AddViewerAgent() - Adding new avatar to world");
82 this.Entities.Add(AgentClient.AgentID, NewAvatar); 82 this.Entities.Add(AgentClient.AgentID, NewAvatar);
83 Console.WriteLine("World.cs:AddViewerAgent() - Starting RegionHandshake "); 83 OpenSim_Main.localcons.WriteLine("World.cs:AddViewerAgent() - Starting RegionHandshake ");
84 NewAvatar.SendRegionHandshake(this); 84 NewAvatar.SendRegionHandshake(this);
85 this.Update(); // will work for now, but needs to be optimised so we don't update everything in the sim for each new user 85 this.Update(); // will work for now, but needs to be optimised so we don't update everything in the sim for each new user
86 } 86 }