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/Framework/General/Interfaces/IClientAPI.cs | 5 ++---
OpenSim/Framework/General/Types/ParcelData.cs | 4 ++--
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 +++++++++--
6 files changed, 20 insertions(+), 31 deletions(-)
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
index 555f46e..fbd239f 100644
--- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs
+++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Framework.Interfaces
public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape);
- public delegate void SignificantClientMovement(IClientAPI remote_client);
+
public interface IClientAPI
{
@@ -128,7 +128,6 @@ namespace OpenSim.Framework.Interfaces
event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
event EstateOwnerMessageRequest OnEstateOwnerMessage;
- event SignificantClientMovement OnSignificantClientMovement;
LLVector3 StartPos
{
@@ -187,6 +186,6 @@ namespace OpenSim.Framework.Interfaces
void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item);
void SendNameReply(LLUUID profileId, string firstname, string lastname);
- void TriggerSignificantClientMovement(IClientAPI remote_client);
+
}
}
diff --git a/OpenSim/Framework/General/Types/ParcelData.cs b/OpenSim/Framework/General/Types/ParcelData.cs
index dbb42a3..ac34a26 100644
--- a/OpenSim/Framework/General/Types/ParcelData.cs
+++ b/OpenSim/Framework/General/Types/ParcelData.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Framework.Types
public class ParcelData
{
public byte[] parcelBitmapByteArray = new byte[512];
- public string parcelName = "";
+ public string parcelName = "Your Parcel";
public string parcelDesc = "";
public LLUUID ownerID = new LLUUID();
public bool isGroupOwned = false;
@@ -48,7 +48,7 @@ namespace OpenSim.Framework.Types
public LLUUID groupID = new LLUUID(); //Unemplemented
public int groupPrims = 0; //Unemplemented
public int salePrice = 0; //Unemeplemented. Parcels price.
- public Parcel.ParcelStatus parcelStatus = Parcel.ParcelStatus.None;
+ public Parcel.ParcelStatus parcelStatus = Parcel.ParcelStatus.Leased;
public uint parcelFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts;
public byte landingType = 0;
public byte mediaAutoScale = 0;
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