From b3844c1f7348b4296b5ab1df258935d7f971e412 Mon Sep 17 00:00:00 2001 From: gareth Date: Wed, 7 Mar 2007 18:48:38 +0000 Subject: Deleted old trunk code --- src/world/Avatar.cs | 256 ----------------------------------------- src/world/Entity.cs | 65 ----------- src/world/HeightmapGenHills.cs | 122 -------------------- src/world/PhysicsEngine.cs | 32 ------ src/world/Primitive.cs | 33 ------ src/world/ScriptEngine.cs | 18 --- src/world/SurfacePatch.cs | 22 ---- src/world/World.cs | 112 ------------------ src/world/scripting/IScript.cs | 16 --- 9 files changed, 676 deletions(-) delete mode 100644 src/world/Avatar.cs delete mode 100644 src/world/Entity.cs delete mode 100644 src/world/HeightmapGenHills.cs delete mode 100644 src/world/PhysicsEngine.cs delete mode 100644 src/world/Primitive.cs delete mode 100644 src/world/ScriptEngine.cs delete mode 100644 src/world/SurfacePatch.cs delete mode 100644 src/world/World.cs delete mode 100644 src/world/scripting/IScript.cs (limited to 'src/world') diff --git a/src/world/Avatar.cs b/src/world/Avatar.cs deleted file mode 100644 index 9d8d7d2..0000000 --- a/src/world/Avatar.cs +++ /dev/null @@ -1,256 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using libsecondlife; -using libsecondlife.Packets; -using Axiom.MathLib; - -namespace OpenSim.world -{ - public class Avatar : Entity - { - public string firstname; - public string lastname; - public OpenSimClient ControllingClient; - public LLVector3 oldvel; - public LLVector3 oldpos; - public uint CurrentKeyMask; - public bool walking; - - private libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock AvatarTemplate; - - public Avatar(OpenSimClient TheClient) { - OpenSim_Main.localcons.WriteLine("Avatar.cs - Loading details from grid (DUMMY)"); - ControllingClient=TheClient; - SetupTemplate("avatar-template.dat"); - - position = new LLVector3(100.0f,100.0f,60.0f); - } - - public override void update() { - lock(this) { - base.update(); - - oldvel=this.velocity; - oldpos=this.position; - if((this.CurrentKeyMask & (uint)MainAvatar.AgentUpdateFlags.AGENT_CONTROL_AT_POS) != 0) { - Vector3 tmpVelocity = this.rotation * new Vector3(1.0f,0.0f,0.0f); - tmpVelocity.Normalize(); tmpVelocity = tmpVelocity * 0.5f; - this.velocity.X = tmpVelocity.x; - this.velocity.Y = tmpVelocity.y; - this.velocity.Z = tmpVelocity.z; - this.walking=true; - } else { - this.velocity.X=0; - this.velocity.Y=0; - this.velocity.Z=0; - this.walking=false; - } - } - } - - private void SetupTemplate(string name) - { - - int i = 0; - FileInfo fInfo = new FileInfo(name); - long numBytes = fInfo.Length; - FileStream fStream = new FileStream(name, FileMode.Open, FileAccess.Read); - BinaryReader br = new BinaryReader(fStream); - byte [] data1 = br.ReadBytes((int)numBytes); - br.Close(); - fStream.Close(); - - libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock objdata = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i); - - System.Text.Encoding enc = System.Text.Encoding.ASCII; - libsecondlife.LLVector3 pos = new LLVector3(objdata.ObjectData, 16); - pos.X = 100f; - objdata.ID = this.localid; - objdata.NameValue = enc.GetBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User \0"); - libsecondlife.LLVector3 pos2 = new LLVector3(100f,100f,23f); - //objdata.FullID=user.AgentID; - byte[] pb = pos.GetBytes(); - Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length); - - AvatarTemplate = objdata; - - } - - public void CompleteMovement(World RegionInfo) { - 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; - mov.Data.RegionHandle = OpenSim_Main.cfg.RegionHandle; - // TODO - dynamicalise this stuff - mov.Data.Timestamp = 1172750370; - 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); - - OpenSim_Main.localcons.WriteLine("Sending AgentMovementComplete packet"); - ControllingClient.OutPacket(mov); - } - - public void SendInitialPosition() { - System.Text.Encoding _enc = System.Text.Encoding.ASCII; - - - //send a objectupdate packet with information about the clients avatar - ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); - objupdate.RegionData.RegionHandle = OpenSim_Main.cfg.RegionHandle; - objupdate.RegionData.TimeDilation = 64096; - objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; - - objupdate.ObjectData[0] = AvatarTemplate; - //give this avatar object a local id and assign the user a name - objupdate.ObjectData[0].ID = this.localid; - //User_info.name="Test"+this.local_numer+" User"; - objupdate.ObjectData[0].FullID = ControllingClient.AgentID; - objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstname + "\nLastName STRING RW SV " + lastname + " \0"); - - libsecondlife.LLVector3 pos2 = new LLVector3((float)this.position.X, (float)this.position.Y, (float)this.position.Z); - - byte[] pb = pos2.GetBytes(); - - Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length); - OpenSim_Main.local_world._localNumber++; - this.ControllingClient.OutPacket(objupdate); - } - - public override ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateTerseBlock() { - byte[] bytes = new byte[60]; - int i=0; - ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock(); - - dat.TextureEntry = AvatarTemplate.TextureEntry; - libsecondlife.LLVector3 pos2 = new LLVector3(this.position.X, this.position.Y, this.position.Z); - - uint ID = this.localid; - bytes[i++] = (byte)(ID % 256); - bytes[i++] = (byte)((ID >> 8) % 256); - bytes[i++] = (byte)((ID >> 16) % 256); - bytes[i++] = (byte)((ID >> 24) % 256); - bytes[i++] = 0; - bytes[i++] = 1; - i += 14; - bytes[i++] = 128; - bytes[i++] = 63; - - byte[] pb = pos2.GetBytes(); - Array.Copy(pb, 0, bytes, i, pb.Length); - i += 12; - - - ushort ac = 32767; - bytes[i++] = (byte)((ushort)(((this.velocity.X/128f)+1)*32767) % 256 ); - bytes[i++] = (byte)(((ushort)(((this.velocity.X/128f)+1)*32767) >> 8) % 256); - bytes[i++] = (byte)((ushort)(((this.velocity.Y/128f)+1)*32767) % 256); - bytes[i++] = (byte)(((ushort)(((this.velocity.Y/128f)+1)*32767) >> 8) % 256); - bytes[i++] = (byte)((ushort)(((this.velocity.Z/128f)+1)*32767) % 256); - bytes[i++] = (byte)(((ushort)(((this.velocity.Z/128f)+1)*32767) >> 8) % 256); - - - - - //accel - bytes[i++] = (byte)(ac % 256); - bytes[i++] = (byte)((ac >> 8) % 256); - bytes[i++] = (byte)(ac % 256); - bytes[i++] = (byte)((ac >> 8) % 256); - bytes[i++] = (byte)(ac % 256); - bytes[i++] = (byte)((ac >> 8) % 256); - - //rot - bytes[i++] = (byte)(ac % 256); - bytes[i++] = (byte)((ac >> 8) % 256); - bytes[i++] = (byte)(ac % 256); - bytes[i++] = (byte)((ac >> 8) % 256); - bytes[i++] = (byte)(ac % 256); - bytes[i++] = (byte)((ac >> 8) % 256); - bytes[i++] = (byte)(ac % 256); - bytes[i++] = (byte)((ac >> 8) % 256); - - //rotation vel - bytes[i++] = (byte)(ac % 256); - bytes[i++] = (byte)((ac >> 8) % 256); - bytes[i++] = (byte)(ac % 256); - bytes[i++] = (byte)((ac >> 8) % 256); - bytes[i++] = (byte)(ac % 256); - bytes[i++] = (byte)((ac >> 8) % 256); - - dat.Data=bytes; - return(dat); - - } - - public void SendInitialAppearance() { - AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket(); - aw.AgentData.AgentID = this.ControllingClient.AgentID; - aw.AgentData.SerialNum = 0; - aw.AgentData.SessionID = ControllingClient.SessionID; - - aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; - AgentWearablesUpdatePacket.WearableDataBlock awb = new AgentWearablesUpdatePacket.WearableDataBlock(); - awb.WearableType = (byte)0; - awb.AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); - awb.ItemID = LLUUID.Random(); - aw.WearableData[0] = awb; - - for(int i=1; i<13; i++) { - awb = new AgentWearablesUpdatePacket.WearableDataBlock(); - awb.WearableType = (byte)i; - awb.AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); - awb.ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); - aw.WearableData[i] = awb; - } - - ControllingClient.OutPacket(aw); - } - - public void SendRegionHandshake(World RegionInfo) { - OpenSim_Main.localcons.WriteLine("Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet"); - System.Text.Encoding _enc = System.Text.Encoding.ASCII; - RegionHandshakePacket handshake = new RegionHandshakePacket(); - - OpenSim_Main.localcons.WriteLine("Avatar.cs:SendRegionhandshake() - Filling in RegionHandshake details"); - handshake.RegionInfo.BillableFactor = 0; - handshake.RegionInfo.IsEstateManager = false; - handshake.RegionInfo.TerrainHeightRange00 = 60; - handshake.RegionInfo.TerrainHeightRange01 = 60; - handshake.RegionInfo.TerrainHeightRange10 = 60; - handshake.RegionInfo.TerrainHeightRange11 = 60; - handshake.RegionInfo.TerrainStartHeight00 = 10; - handshake.RegionInfo.TerrainStartHeight01 = 10; - handshake.RegionInfo.TerrainStartHeight10 = 10; - handshake.RegionInfo.TerrainStartHeight11 = 10; - handshake.RegionInfo.SimAccess = 13; - handshake.RegionInfo.WaterHeight = 20.0f; - handshake.RegionInfo.RegionFlags = 72458694; // TODO: WTF sirs? Use an enum! - handshake.RegionInfo.SimName = _enc.GetBytes(OpenSim_Main.cfg.RegionName + "\0"); - handshake.RegionInfo.SimOwner = new LLUUID("00000000-0000-0000-0000-000000000000"); - handshake.RegionInfo.TerrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); - handshake.RegionInfo.TerrainBase1 = new LLUUID("abb783e6-3e93-26c0-248a-247666855da3"); - handshake.RegionInfo.TerrainBase2 = new LLUUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); - handshake.RegionInfo.TerrainBase3 = new LLUUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); - handshake.RegionInfo.TerrainDetail0 = new LLUUID("00000000-0000-0000-0000-000000000000"); - handshake.RegionInfo.TerrainDetail1 = new LLUUID("00000000-0000-0000-0000-000000000000"); - handshake.RegionInfo.TerrainDetail2 = new LLUUID("00000000-0000-0000-0000-000000000000"); - handshake.RegionInfo.TerrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000"); - handshake.RegionInfo.CacheID = new LLUUID("545ec0a5-5751-1026-8a0b-216e38a7ab37"); - - OpenSim_Main.localcons.WriteLine("Avatar.cs:SendRegionHandshake() - Sending RegionHandshake packet"); - this.ControllingClient.OutPacket(handshake); - } - - public void HandleAgentUpdate(AgentUpdatePacket update) { - lock(this) { - this.CurrentKeyMask = update.AgentData.ControlFlags; - this.rotation = new Quaternion(update.AgentData.BodyRotation.W, update.AgentData.BodyRotation.X, update.AgentData.BodyRotation.Y, update.AgentData.BodyRotation.Z); - this.needupdate = true; - } - } - - } -} diff --git a/src/world/Entity.cs b/src/world/Entity.cs deleted file mode 100644 index 7880a46..0000000 --- a/src/world/Entity.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Axiom.MathLib; -using libsecondlife; -using OpenSim.types; -using libsecondlife.Packets; - -namespace OpenSim.world -{ - public class Entity - { - protected libsecondlife.LLUUID uuid; - protected uint localid; - public LLVector3 position; - public LLVector3 velocity; - protected Quaternion rotation; - protected string name; - protected List children; - public bool needupdate; - - public Entity() - { - uuid = new libsecondlife.LLUUID(); - localid = 8880000 + (OpenSim_Main.local_world._localNumber++); // FIXME - race condition! - position = new LLVector3(); - velocity = new LLVector3(); - rotation = new Quaternion(); - name = "(basic entity)"; - children = new List(); - } - - public virtual void update() { - // Do any per-frame updates needed that are applicable to every type of entity - foreach (Entity child in children) - { - if(child.needupdate) - child.update(); - } - this.needupdate=false; - } - - public virtual ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateTerseBlock() { - return null; - } - - - public virtual string getName() - { - return name; - } - - public virtual Mesh getMesh() - { - Mesh mesh = new Mesh(); - - foreach (Entity child in children) - { - mesh += child.getMesh(); - } - - return mesh; - } - } -} diff --git a/src/world/HeightmapGenHills.cs b/src/world/HeightmapGenHills.cs deleted file mode 100644 index 12af005..0000000 --- a/src/world/HeightmapGenHills.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System; - -namespace libsecondlife -{ - public class HeightmapGenHills - { - private Random Rand = new Random(); - private int NumHills; - private float HillMin; - private float HillMax; - private bool Island; - private float[] heightmap; - - public float[] GenerateHeightmap(int numHills, float hillMin, float hillMax, bool island) - { - NumHills = numHills; - HillMin = hillMin; - HillMax = hillMax; - Island = island; - - heightmap = new float[256 * 256]; - - for (int i = 0; i < numHills; i++) - { - AddHill(); - } - - Normalize(); - - return heightmap; - } - - private void AddHill() - { - float x, y; - float radius = RandomRange(HillMin, HillMax); - - if (Island) - { - // Which direction from the center of the map the hill is placed - float theta = RandomRange(0, 6.28f); - - // How far from the center of the map to place the hill. The radius - // is subtracted from the range to prevent any part of the hill from - // reaching the edge of the map - float distance = RandomRange(radius / 2.0f, 128.0f - radius); - - x = 128.0f + (float)Math.Cos(theta) * distance; - y = 128.0f + (float)Math.Sin(theta) * distance; - } - else - { - x = RandomRange(-radius, 256.0f + radius); - y = RandomRange(-radius, 256.0f + radius); - } - - float radiusSq = radius * radius; - float distSq; - float height; - - int xMin = (int)(x - radius) - 1; - int xMax = (int)(x + radius) + 1; - if (xMin < 0) xMin = 0; - if (xMax > 255) xMax = 255; - - int yMin = (int)(y - radius) - 1; - int yMax = (int)(y + radius) + 1; - if (yMin < 0) yMin = 0; - if (yMax > 255) yMax = 255; - - // Loop through each affected cell and determine the height at that point - for (int v = yMin; v <= yMax; ++v) - { - float fv = (float)v; - - for (int h = xMin; h <= xMax; ++h) - { - float fh = (float)h; - - // Determine how far from the center of this hill this point is - distSq = (x - fh) * (x - fh) + (y - fv) * (y - fv); - height = radiusSq - distSq; - - // Don't add negative hill values - if (height > 0.0f) heightmap[h + v * 256] += height; - } - } - } - - private void Normalize() - { - float min = heightmap[0]; - float max = heightmap[0]; - - for (int x = 0; x < 256; x++) - { - for (int y = 0; y < 256; y++) - { - if (heightmap[x + y * 256] < min) min = heightmap[x + y * 256]; - if (heightmap[x + y * 256] > max) max = heightmap[x + y * 256]; - } - } - - // Avoid a rare divide by zero - if (min != max) - { - for (int x = 0; x < 256; x++) - { - for (int y = 0; y < 256; y++) - { - heightmap[x + y * 256] = ((heightmap[x + y * 256] - min) / (max - min)) * (HillMax - HillMin); - } - } - } - } - - private float RandomRange(float min, float max) - { - return (float)Rand.NextDouble() * (max - min) + min; - } - } -} diff --git a/src/world/PhysicsEngine.cs b/src/world/PhysicsEngine.cs deleted file mode 100644 index b237f5e..0000000 --- a/src/world/PhysicsEngine.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Threading; -using libsecondlife; -using libsecondlife.Packets; -using System.Collections.Generic; -using System.Text; - -namespace OpenSim.world -{ - public class PhysicsEngine - { - - public PhysicsEngine() { - } - - public void Startup() { - OpenSim_Main.localcons.WriteLine("PhysicsEngine.cs:Startup() - DOING NOTHING, DUMMY FUNCTION!"); - } - - public void DoStuff(World simworld) { - foreach (libsecondlife.LLUUID UUID in simworld.Entities.Keys) - { - simworld.Entities[UUID].position += simworld.Entities[UUID].velocity; - simworld.Entities[UUID].position.Z = simworld.LandMap[(int)simworld.Entities[UUID].position.Y * 256 + (int)simworld.Entities[UUID].position.X]+1; - if(simworld.Entities[UUID].position.X<0) simworld.Entities[UUID].position.X=0; - if(simworld.Entities[UUID].position.Y<0) simworld.Entities[UUID].position.Y=0; - if(simworld.Entities[UUID].position.X>255) simworld.Entities[UUID].position.X=255; - if(simworld.Entities[UUID].position.Y>255) simworld.Entities[UUID].position.Y=255; - } - } - } -} diff --git a/src/world/Primitive.cs b/src/world/Primitive.cs deleted file mode 100644 index 143fa55..0000000 --- a/src/world/Primitive.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using OpenSim.types; - -namespace OpenSim.world -{ - public class Primitive : Entity - { - protected float mesh_cutbegin; - protected float mesh_cutend; - - public Primitive() - { - mesh_cutbegin = 0.0f; - mesh_cutend = 1.0f; - } - - public override Mesh getMesh() - { - Mesh mesh = new Mesh(); - Triangle tri = new Triangle( - new Axiom.MathLib.Vector3(0.0f, 1.0f, 1.0f), - new Axiom.MathLib.Vector3(1.0f, 0.0f, 1.0f), - new Axiom.MathLib.Vector3(1.0f, 1.0f, 0.0f)); - - mesh.AddTri(tri); - mesh += base.getMesh(); - - return mesh; - } - } -} diff --git a/src/world/ScriptEngine.cs b/src/world/ScriptEngine.cs deleted file mode 100644 index f20a08e..0000000 --- a/src/world/ScriptEngine.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenSim.world -{ - public class ScriptEngine - { - public ScriptEngine(World env) - { - } - - public void LoadScript() - { - - } - } -} diff --git a/src/world/SurfacePatch.cs b/src/world/SurfacePatch.cs deleted file mode 100644 index 71e4116..0000000 --- a/src/world/SurfacePatch.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenSim.world -{ - public class SurfacePatch - { - public float[] HeightMap; - - public SurfacePatch() { - HeightMap = new float[16*16]; - - int xinc; - int yinc; - for(xinc=0; xinc<16; xinc++) for(yinc=0; yinc<16; yinc++) { - HeightMap[xinc+(yinc*16)]=100.0f; - } - - } - } -} diff --git a/src/world/World.cs b/src/world/World.cs deleted file mode 100644 index 158ddc2..0000000 --- a/src/world/World.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using System.Threading; -using System.Collections.Generic; -using System.Text; -using libsecondlife; -using libsecondlife.Packets; - -namespace OpenSim.world -{ - public class World - { - public Dictionary Entities; - public float[] LandMap; - public ScriptEngine Scripts; - public uint _localNumber = 0; - public PhysicsEngine physics; - - private libsecondlife.TerrainManager TerrainManager; - private Random Rand = new Random(); - - public World() - { - OpenSim_Main.localcons.WriteLine("World.cs - creating new entitities instance"); - Entities = new Dictionary(); - - OpenSim_Main.localcons.WriteLine("World.cs - creating LandMap"); - TerrainManager = new TerrainManager(new SecondLife()); - } - - public void InitLoop() - { - OpenSim_Main.localcons.WriteLine("World.cs:StartLoop() - Initialising physics"); - this.physics = new PhysicsEngine(); - physics.Startup(); - } - - public void DoStuff() - { - lock (this) - { - physics.DoStuff(this); - this.Update(); - } - } - - public void Update() - { - foreach (libsecondlife.LLUUID UUID in Entities.Keys) - { - if (Entities[UUID].needupdate) - { - Entities[UUID].update(); - - if (Entities[UUID] is Avatar) - { - Avatar avatar = (Avatar)Entities[UUID]; - if ((avatar.oldpos != avatar.position) || (avatar.oldvel != avatar.velocity) || avatar.walking) - { - ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = Entities[UUID].CreateTerseBlock(); - foreach (OpenSimClient client in OpenSim_Main.sim.ClientThreads.Values) - { - ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); - terse.RegionData.RegionHandle = OpenSim_Main.cfg.RegionHandle; // FIXME - terse.RegionData.TimeDilation = 0; - terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; - terse.ObjectData[0] = terseBlock; - client.OutPacket(terse); - } - } - } - } - } - } - - public void SendLayerData(OpenSimClient RemoteClient) - { - int[] patches = new int[4]; - - for (int y = 0; y < 16; y++) - { - for (int x = 0; x < 16; x = x + 4) - { - patches[0] = x + 0 + y * 16; - patches[1] = x + 1 + y * 16; - patches[2] = x + 2 + y * 16; - patches[3] = x + 3 + y * 16; - - Packet layerpack = TerrainManager.CreateLandPacket(LandMap, patches); - RemoteClient.OutPacket(layerpack); - } - } - } - - public void AddViewerAgent(OpenSimClient AgentClient) - { - OpenSim_Main.localcons.WriteLine("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); - Avatar NewAvatar = new Avatar(AgentClient); - OpenSim_Main.localcons.WriteLine("World.cs:AddViewerAgent() - Adding new avatar to world"); - this.Entities.Add(AgentClient.AgentID, NewAvatar); - 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 - } - - public bool Backup() - { - /* TODO: Save the current world entities state. */ - - return false; - } - } -} diff --git a/src/world/scripting/IScript.cs b/src/world/scripting/IScript.cs deleted file mode 100644 index 550594d..0000000 --- a/src/world/scripting/IScript.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenSim.world.scripting -{ - public interface IScriptHost { - bool Register(IScript iscript); - } - public interface IScript - { - string Name{get;set;} - IScriptHost Host{get;set;} - void Show(); - } -} -- cgit v1.1