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/ClientStack/ClientView.API.cs | 10 ---------- OpenSim/Region/Environment/ParcelManager.cs | 20 +++++++------------- OpenSim/Region/Environment/Scenes/Scene.cs | 1 - OpenSim/Region/Environment/Scenes/ScenePresence.cs | 11 +++++++++-- 4 files changed, 16 insertions(+), 26 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index df5a853..b368ab7 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs @@ -87,8 +87,6 @@ namespace OpenSim.Region.ClientStack public event EstateOwnerMessageRequest OnEstateOwnerMessage; - public event SignificantClientMovement OnSignificantClientMovement; - /// /// /// @@ -1178,13 +1176,5 @@ namespace OpenSim.Region.ClientStack OutPacket( packet ); } - - public void TriggerSignificantClientMovement(IClientAPI remote_client) - { - if (OnSignificantClientMovement != null) - { - OnSignificantClientMovement(remote_client); - } - } } } diff --git a/OpenSim/Region/Environment/ParcelManager.cs b/OpenSim/Region/Environment/ParcelManager.cs index 125ba19..07f39fd 100644 --- a/OpenSim/Region/Environment/ParcelManager.cs +++ b/OpenSim/Region/Environment/ParcelManager.cs @@ -481,13 +481,7 @@ namespace OpenSim.Region.Environment Parcel fullSimParcel = new Parcel(LLUUID.Zero, false, m_world); fullSimParcel.setParcelBitmap(Parcel.getSquareParcelBitmap(0, 0, 256, 256)); - fullSimParcel.parcelData.parcelName = "Your Sim Parcel"; - fullSimParcel.parcelData.parcelDesc = ""; fullSimParcel.parcelData.ownerID = m_regInfo.MasterAvatarAssignedUUID; - fullSimParcel.parcelData.salePrice = 1; - - fullSimParcel.parcelData.parcelFlags |=(uint)libsecondlife.Parcel.ParcelFlags.ForSale; - fullSimParcel.parcelData.parcelStatus = libsecondlife.Parcel.ParcelStatus.Leased; addParcel(fullSimParcel); @@ -611,16 +605,16 @@ namespace OpenSim.Region.Environment updatePacket.ParcelData.OtherPrims = 0; //unemplented updatePacket.ParcelData.OwnerID = parcelData.ownerID; updatePacket.ParcelData.OwnerPrims = 0; //unemplemented - updatePacket.ParcelData.ParcelFlags = parcelData.parcelFlags; //unemplemented - updatePacket.ParcelData.ParcelPrimBonus = (float)1.0; //unemplemented + updatePacket.ParcelData.ParcelFlags = parcelData.parcelFlags; + updatePacket.ParcelData.ParcelPrimBonus = m_world.RegionInfo.estateSettings.objectBonusFactor; updatePacket.ParcelData.PassHours = parcelData.passHours; updatePacket.ParcelData.PassPrice = parcelData.passPrice; updatePacket.ParcelData.PublicCount = 0; //unemplemented - updatePacket.ParcelData.RegionDenyAnonymous = false; //unemplemented - updatePacket.ParcelData.RegionDenyIdentified = false; //unemplemented - updatePacket.ParcelData.RegionDenyTransacted = false; //unemplemented - updatePacket.ParcelData.RegionPushOverride = true; //unemplemented - updatePacket.ParcelData.RentPrice = 0; //?? + updatePacket.ParcelData.RegionDenyAnonymous = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) > 0); + updatePacket.ParcelData.RegionDenyIdentified = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyIdentified) > 0); + updatePacket.ParcelData.RegionDenyTransacted = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyTransacted) > 0); + updatePacket.ParcelData.RegionPushOverride = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.RestrictPushObject) > 0); + updatePacket.ParcelData.RentPrice = 0; updatePacket.ParcelData.RequestResult = request_result; updatePacket.ParcelData.SalePrice = parcelData.salePrice; //unemplemented updatePacket.ParcelData.SelectedPrims = 0; //unemeplemented diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 7098c38..318b025 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -485,7 +485,6 @@ namespace OpenSim.Region.Environment.Scenes client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(parcelManager.handleParcelPropertiesUpdateRequest); client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage); - client.OnSignificantClientMovement += new SignificantClientMovement(parcelManager.handleSignificantClientMovement); } protected void CreateAndAddScenePresence(IClientAPI client) 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