From 2180bdf64afa27ecbccf1eed163eec4b2414f87d Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 17 Apr 2007 12:25:20 +0000 Subject: Hopefully undid the murder I committed in the last commit --- OpenSim.RegionServer/SimClient.cs | 4 +++- OpenSim.RegionServer/world/World.cs | 43 +++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index b729c6c..0c90dcb 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs @@ -144,7 +144,9 @@ namespace OpenSim public void CrossSimBorder(LLVector3 avatarpos) { // VERY VERY BASIC - LLVector3 newpos = this.m_regionData.RegionLocX; + + LLVector3 newpos = avatarpos; + uint neighbourx = this.m_regionData.RegionLocX; uint neighboury = this.m_regionData.RegionLocY; if (avatarpos.X < 0) diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index 749305f..56f5edb 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs @@ -24,7 +24,7 @@ namespace OpenSim.world public Dictionary Entities; public Dictionary Avatars; public Dictionary Prims; -// public float[] LandMap; + // public float[] LandMap; public ScriptEngine Scripts; public TerrainEngine Terrain; //TODO: Replace TerrainManager with this. public uint _localNumber = 0; @@ -88,21 +88,21 @@ namespace OpenSim.world ScriptFactory scriptFactory; //Console.WriteLine("script string is " + substring); - if(substring.StartsWith("'); string sName = substring1.Substring(0, end); //Console.WriteLine(" script info : " + sEngine + " , " + sName); int startscript = substring.IndexOf('>'); script = substring.Remove(0, startscript + 1); - // Console.WriteLine("script data is " + script); + // Console.WriteLine("script data is " + script); if (this.scriptEngines.ContainsKey(sEngine)) { this.scriptEngines[sEngine].LoadScript(script, sName, entity.localid); @@ -281,7 +281,7 @@ namespace OpenSim.world { Console.WriteLine("creating new terrain"); this.Terrain.hills(); - + //this.localStorage.SaveMap(this.Terrain.map); } else @@ -371,21 +371,22 @@ namespace OpenSim.world OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs:AddViewerAgent() - Adding new avatar to world"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs:AddViewerAgent() - Starting RegionHandshake "); newAvatar.SendRegionHandshake(this); - if(!agentClient.m_child) { - PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); - lock (this.LockPhysicsEngine) - { - newAvatar.PhysActor = this.phyScene.AddAvatar(pVec); - } - } - lock (Entities) - { - this.Entities.Add(agentClient.AgentID, newAvatar); - } - lock (Avatars) - { - this.Avatars.Add(agentClient.AgentID, newAvatar); - } + if (!agentClient.m_child) + { + PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); + lock (this.LockPhysicsEngine) + { + newAvatar.PhysActor = this.phyScene.AddAvatar(pVec); + } + } + lock (Entities) + { + this.Entities.Add(agentClient.AgentID, newAvatar); + } + lock (Avatars) + { + this.Avatars.Add(agentClient.AgentID, newAvatar); + } } -- cgit v1.1