From d879c6e8fc613b75220b224b3bdf07da653c9d2c Mon Sep 17 00:00:00 2001 From: mingchen Date: Fri, 13 Jul 2007 23:13:25 +0000 Subject: *Moved the OnSignificantClientMovement event to ScenePresence. *ParcelManager's resetSimParcels does not set any default values. *Updated ParcelData with correct defaults previously set in resetSimParcels *Region overrides are now sent to viewer instead of dummy'd --- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 613ad52..8559caf 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -81,6 +81,10 @@ namespace OpenSim.Region.Environment.Scenes /// Position at which a significant movement was made /// private LLVector3 posLastSignificantMove = new LLVector3(); + + public delegate void SignificantClientMovement(IClientAPI remote_client); + public event SignificantClientMovement OnSignificantClientMovement; + #region Properties /// /// @@ -147,7 +151,7 @@ namespace OpenSim.Region.Environment.Scenes // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack); // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); - + OnSignificantClientMovement += new SignificantClientMovement(m_world.parcelManager.handleSignificantClientMovement); Dir_Vectors[0] = new Vector3(1, 0, 0); //FOWARD Dir_Vectors[1] = new Vector3(-1, 0, 0); //BACK Dir_Vectors[2] = new Vector3(0, 1, 0); //LEFT @@ -479,7 +483,10 @@ namespace OpenSim.Region.Environment.Scenes if (libsecondlife.Helpers.VecDist(this.Pos, this.posLastSignificantMove) > 2.0) { this.posLastSignificantMove = this.Pos; - this.ControllingClient.TriggerSignificantClientMovement(this.ControllingClient); + if (OnSignificantClientMovement != null) + { + OnSignificantClientMovement(this.ControllingClient); + } } } #endregion -- cgit v1.1