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). --- 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 +++- 4 files changed, 16 insertions(+), 21 deletions(-) (limited to 'OpenSim/OpenSim.Region') 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++) -- cgit v1.1