From e647d9ec51ebb3008277c5268953b71b079c0a5d Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 21 Jun 2007 13:55:28 +0000 Subject: Fixed problem of not being able to move out of the first 3X3 block of regions. (Code Needs cleaning up). --- Common/OpenSim.Framework/RegionCommsListener.cs | 2 +- .../LocalBackEndServices.cs | 2 +- OpenSim/OpenSim.Region/Scenes/Entity.cs | 9 +++++++-- OpenSim/OpenSim.Region/Scenes/Scene.cs | 2 +- .../OpenSim.Region/Scenes/ScenePresence.Update.cs | 22 +++++----------------- OpenSim/OpenSim.Region/Scenes/ScenePresence.cs | 4 +++- .../ClientView.PacketHandlers.cs | 4 ++-- 7 files changed, 20 insertions(+), 25 deletions(-) diff --git a/Common/OpenSim.Framework/RegionCommsListener.cs b/Common/OpenSim.Framework/RegionCommsListener.cs index 3fec937..bba928f 100644 --- a/Common/OpenSim.Framework/RegionCommsListener.cs +++ b/Common/OpenSim.Framework/RegionCommsListener.cs @@ -56,7 +56,7 @@ namespace OpenSim.Framework return false; } - public virtual bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position) + public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position) { if (OnAvatarCrossingIntoRegion != null) { diff --git a/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs b/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs index 6e963d2..06e09f2 100644 --- a/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs +++ b/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs @@ -168,7 +168,7 @@ namespace OpenSim.LocalCommunications if (this.regionHosts.ContainsKey(regionHandle)) { // Console.WriteLine("CommsManager- Informing a region to expect avatar crossing"); - this.regionHosts[regionHandle].ExpectAvatarCrossing(regionHandle, agentID, position); + this.regionHosts[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position); return true; } return false; diff --git a/OpenSim/OpenSim.Region/Scenes/Entity.cs b/OpenSim/OpenSim.Region/Scenes/Entity.cs index 2376fc4..bd9309b 100644 --- a/OpenSim/OpenSim.Region/Scenes/Entity.cs +++ b/OpenSim/OpenSim.Region/Scenes/Entity.cs @@ -38,10 +38,9 @@ namespace OpenSim.Region.Scenes public abstract class Entity : IScriptReadonlyEntity { public libsecondlife.LLUUID uuid; - public LLVector3 velocity; public Quaternion rotation; protected List children; - protected LLVector3 m_pos; + protected PhysicsActor _physActor; protected Scene m_world; protected string m_name; @@ -54,6 +53,7 @@ namespace OpenSim.Region.Scenes get { return m_name; } } + protected LLVector3 m_pos; /// /// /// @@ -92,6 +92,11 @@ namespace OpenSim.Region.Scenes } } + public LLVector3 velocity; + + /// + /// + /// public virtual LLVector3 Velocity { get diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs index 74b4945..63a6e37 100644 --- a/OpenSim/OpenSim.Region/Scenes/Scene.cs +++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs @@ -739,7 +739,7 @@ namespace OpenSim.Region.Scenes /// /// /// - protected void InformClientOfNeighbours(IClientAPI remoteClient) + public void InformClientOfNeighbours(IClientAPI remoteClient) { // Console.WriteLine("informing client of neighbouring regions"); List neighbours = this.commsManager.GridServer.RequestNeighbours(this.m_regInfo); diff --git a/OpenSim/OpenSim.Region/Scenes/ScenePresence.Update.cs b/OpenSim/OpenSim.Region/Scenes/ScenePresence.Update.cs index 3885c0d..b14db31 100644 --- a/OpenSim/OpenSim.Region/Scenes/ScenePresence.Update.cs +++ b/OpenSim/OpenSim.Region/Scenes/ScenePresence.Update.cs @@ -76,26 +76,14 @@ namespace OpenSim.Region.Scenes /// /// /// - /// - public ObjectUpdatePacket CreateUpdatePacket() - { - return null; - } - - /// - /// - /// public void SendInitialPosition() { this.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos); - } - - /// - /// - /// - public void SendOurAppearance() - { - + if (this.newAvatar) + { + this.m_world.InformClientOfNeighbours(this.ControllingClient); + this.newAvatar = false; + } } /// diff --git a/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs b/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs index 3fbda39..e22528a 100644 --- a/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs +++ b/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs @@ -61,6 +61,7 @@ namespace OpenSim.Region.Scenes private ulong m_regionHandle; private bool childAvatar = false; private bool newForce = false; + private bool newAvatar = false; protected RegionInfo m_regionInfo; /// @@ -145,6 +146,7 @@ namespace OpenSim.Region.Scenes { //this.childAvatar = false; this.Pos = pos; + this.newAvatar = true; } protected void DownGradeAvatar() @@ -179,7 +181,7 @@ namespace OpenSim.Region.Scenes NewForce force = this.forcesList[i]; this.updateflag = true; - this.Velocity = new LLVector3(force.X, force.Y, force.Z); //shouldn't really be doing this + this.Velocity = new LLVector3(force.X, force.Y, force.Z); this.newForce = true; } for (int i = 0; i < this.forcesList.Count; i++) diff --git a/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs b/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs index e8af8c1..32aed02 100644 --- a/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs +++ b/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs @@ -154,8 +154,8 @@ namespace OpenSim mapReply.AgentData.Flags = 0; mapReply.LayerData = new MapLayerReplyPacket.LayerDataBlock[1]; mapReply.LayerData[0] = new MapLayerReplyPacket.LayerDataBlock(); - mapReply.LayerData[0].Bottom = 1; - mapReply.LayerData[0].Left = 1; + mapReply.LayerData[0].Bottom = 0; + mapReply.LayerData[0].Left = 0; mapReply.LayerData[0].Top = 30000; mapReply.LayerData[0].Right = 30000; mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-0000-9999-000000000006"); -- cgit v1.1