From d828af7036fd11a4a1f678b2b7e51bdb6380087a Mon Sep 17 00:00:00 2001 From: gareth Date: Tue, 6 Mar 2007 15:57:36 +0000 Subject: Implemented local console and VERY rough skeleton for TCP/Worldchat console Implemented seperate logging (but no packetlog or chat yet) --- src/world/Avatar.cs | 15 ++++++--------- src/world/PhysicsEngine.cs | 2 +- src/world/World.cs | 12 ++++++------ 3 files changed, 13 insertions(+), 16 deletions(-) (limited to 'src/world') 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 private libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock AvatarTemplate; public Avatar(OpenSimClient TheClient) { - Console.WriteLine("Avatar.cs - Loading details from grid (DUMMY)"); + OpenSim_Main.localcons.WriteLine("Avatar.cs - Loading details from grid (DUMMY)"); ControllingClient=TheClient; SetupTemplate("avatar-template.dat"); @@ -32,8 +32,6 @@ namespace OpenSim.world lock(this) { base.update(); - Console.WriteLine("KeyMask: " + this.CurrentKeyMask); - oldvel=this.velocity; oldpos=this.position; if((this.CurrentKeyMask & (uint)MainAvatar.AgentUpdateFlags.AGENT_CONTROL_AT_POS) != 0) { @@ -42,7 +40,6 @@ namespace OpenSim.world this.velocity.X = tmpVelocity.x; this.velocity.Y = tmpVelocity.y; this.velocity.Z = tmpVelocity.z; - Console.WriteLine("Walking at "+ this.velocity.ToString()); this.walking=true; } else { this.velocity.X=0; @@ -82,7 +79,7 @@ namespace OpenSim.world } public void CompleteMovement(World RegionInfo) { - Console.WriteLine("Avatar.cs:CompleteMovement() - Constructing AgentMovementComplete packet"); + OpenSim_Main.localcons.WriteLine("Avatar.cs:CompleteMovement() - Constructing AgentMovementComplete packet"); AgentMovementCompletePacket mov = new AgentMovementCompletePacket(); mov.AgentData.SessionID = this.ControllingClient.SessionID; mov.AgentData.AgentID = this.ControllingClient.AgentID; @@ -92,7 +89,7 @@ namespace OpenSim.world mov.Data.Position = new LLVector3((float)this.position.X, (float)this.position.Y, (float)this.position.Z); mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0); - Console.WriteLine("Sending AgentMovementComplete packet"); + OpenSim_Main.localcons.WriteLine("Sending AgentMovementComplete packet"); ControllingClient.OutPacket(mov); } @@ -213,11 +210,11 @@ namespace OpenSim.world } public void SendRegionHandshake(World RegionInfo) { - Console.WriteLine("Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet"); + OpenSim_Main.localcons.WriteLine("Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet"); System.Text.Encoding _enc = System.Text.Encoding.ASCII; RegionHandshakePacket handshake = new RegionHandshakePacket(); - Console.WriteLine("Avatar.cs:SendRegionhandshake() - Filling in RegionHandshake details"); + OpenSim_Main.localcons.WriteLine("Avatar.cs:SendRegionhandshake() - Filling in RegionHandshake details"); handshake.RegionInfo.BillableFactor = 0; handshake.RegionInfo.IsEstateManager = false; handshake.RegionInfo.TerrainHeightRange00 = 60; @@ -243,7 +240,7 @@ namespace OpenSim.world handshake.RegionInfo.TerrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000"); handshake.RegionInfo.CacheID = new LLUUID("545ec0a5-5751-1026-8a0b-216e38a7ab37"); - Console.WriteLine("Avatar.cs:SendRegionHandshake() - Sending RegionHandshake packet"); + OpenSim_Main.localcons.WriteLine("Avatar.cs:SendRegionHandshake() - Sending RegionHandshake packet"); this.ControllingClient.OutPacket(handshake); } 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 } public void Startup() { - Console.WriteLine("PhysicsEngine.cs:Startup() - DOING NOTHING, DUMMY FUNCTION!"); + OpenSim_Main.localcons.WriteLine("PhysicsEngine.cs:Startup() - DOING NOTHING, DUMMY FUNCTION!"); } 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 public World() { - Console.WriteLine("World.cs - creating new entitities instance"); + OpenSim_Main.localcons.WriteLine("World.cs - creating new entitities instance"); Entities = new Dictionary(); - Console.WriteLine("World.cs - creating LandMap"); + OpenSim_Main.localcons.WriteLine("World.cs - creating LandMap"); terrainengine = new TerrainDecode(); LandMap = new float[65536]; for(int i =0; i < 65536; i++) { @@ -33,7 +33,7 @@ namespace OpenSim.world } public void InitLoop() { - Console.WriteLine("World.cs:StartLoop() - Initialising physics"); + OpenSim_Main.localcons.WriteLine("World.cs:StartLoop() - Initialising physics"); this.physics = new PhysicsEngine(); physics.Startup(); } @@ -76,11 +76,11 @@ namespace OpenSim.world } public void AddViewerAgent(OpenSimClient AgentClient) { - Console.WriteLine("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); + OpenSim_Main.localcons.WriteLine("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); Avatar NewAvatar = new Avatar(AgentClient); - Console.WriteLine("World.cs:AddViewerAgent() - Adding new avatar to world"); + OpenSim_Main.localcons.WriteLine("World.cs:AddViewerAgent() - Adding new avatar to world"); this.Entities.Add(AgentClient.AgentID, NewAvatar); - Console.WriteLine("World.cs:AddViewerAgent() - Starting RegionHandshake "); + OpenSim_Main.localcons.WriteLine("World.cs:AddViewerAgent() - Starting RegionHandshake "); NewAvatar.SendRegionHandshake(this); this.Update(); // will work for now, but needs to be optimised so we don't update everything in the sim for each new user } -- cgit v1.1