*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
afrisby
mingchen 2007-07-13 23:13:25 +00:00
parent 862dc9fe97
commit d879c6e8fc
6 changed files with 20 additions and 31 deletions

View File

@ -77,7 +77,7 @@ namespace OpenSim.Framework.Interfaces
public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape); public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape);
public delegate void SignificantClientMovement(IClientAPI remote_client);
public interface IClientAPI public interface IClientAPI
{ {
@ -128,7 +128,6 @@ namespace OpenSim.Framework.Interfaces
event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
event EstateOwnerMessageRequest OnEstateOwnerMessage; event EstateOwnerMessageRequest OnEstateOwnerMessage;
event SignificantClientMovement OnSignificantClientMovement;
LLVector3 StartPos LLVector3 StartPos
{ {
@ -187,6 +186,6 @@ namespace OpenSim.Framework.Interfaces
void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item); void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item);
void SendNameReply(LLUUID profileId, string firstname, string lastname); void SendNameReply(LLUUID profileId, string firstname, string lastname);
void TriggerSignificantClientMovement(IClientAPI remote_client);
} }
} }

View File

@ -33,7 +33,7 @@ namespace OpenSim.Framework.Types
public class ParcelData public class ParcelData
{ {
public byte[] parcelBitmapByteArray = new byte[512]; public byte[] parcelBitmapByteArray = new byte[512];
public string parcelName = ""; public string parcelName = "Your Parcel";
public string parcelDesc = ""; public string parcelDesc = "";
public LLUUID ownerID = new LLUUID(); public LLUUID ownerID = new LLUUID();
public bool isGroupOwned = false; public bool isGroupOwned = false;
@ -48,7 +48,7 @@ namespace OpenSim.Framework.Types
public LLUUID groupID = new LLUUID(); //Unemplemented public LLUUID groupID = new LLUUID(); //Unemplemented
public int groupPrims = 0; //Unemplemented public int groupPrims = 0; //Unemplemented
public int salePrice = 0; //Unemeplemented. Parcels price. 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 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 landingType = 0;
public byte mediaAutoScale = 0; public byte mediaAutoScale = 0;

View File

@ -87,8 +87,6 @@ namespace OpenSim.Region.ClientStack
public event EstateOwnerMessageRequest OnEstateOwnerMessage; public event EstateOwnerMessageRequest OnEstateOwnerMessage;
public event SignificantClientMovement OnSignificantClientMovement;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@ -1178,13 +1176,5 @@ namespace OpenSim.Region.ClientStack
OutPacket( packet ); OutPacket( packet );
} }
public void TriggerSignificantClientMovement(IClientAPI remote_client)
{
if (OnSignificantClientMovement != null)
{
OnSignificantClientMovement(remote_client);
}
}
} }
} }

View File

@ -481,13 +481,7 @@ namespace OpenSim.Region.Environment
Parcel fullSimParcel = new Parcel(LLUUID.Zero, false, m_world); Parcel fullSimParcel = new Parcel(LLUUID.Zero, false, m_world);
fullSimParcel.setParcelBitmap(Parcel.getSquareParcelBitmap(0, 0, 256, 256)); 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.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); addParcel(fullSimParcel);
@ -611,16 +605,16 @@ namespace OpenSim.Region.Environment
updatePacket.ParcelData.OtherPrims = 0; //unemplented updatePacket.ParcelData.OtherPrims = 0; //unemplented
updatePacket.ParcelData.OwnerID = parcelData.ownerID; updatePacket.ParcelData.OwnerID = parcelData.ownerID;
updatePacket.ParcelData.OwnerPrims = 0; //unemplemented updatePacket.ParcelData.OwnerPrims = 0; //unemplemented
updatePacket.ParcelData.ParcelFlags = parcelData.parcelFlags; //unemplemented updatePacket.ParcelData.ParcelFlags = parcelData.parcelFlags;
updatePacket.ParcelData.ParcelPrimBonus = (float)1.0; //unemplemented updatePacket.ParcelData.ParcelPrimBonus = m_world.RegionInfo.estateSettings.objectBonusFactor;
updatePacket.ParcelData.PassHours = parcelData.passHours; updatePacket.ParcelData.PassHours = parcelData.passHours;
updatePacket.ParcelData.PassPrice = parcelData.passPrice; updatePacket.ParcelData.PassPrice = parcelData.passPrice;
updatePacket.ParcelData.PublicCount = 0; //unemplemented updatePacket.ParcelData.PublicCount = 0; //unemplemented
updatePacket.ParcelData.RegionDenyAnonymous = false; //unemplemented updatePacket.ParcelData.RegionDenyAnonymous = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) > 0);
updatePacket.ParcelData.RegionDenyIdentified = false; //unemplemented updatePacket.ParcelData.RegionDenyIdentified = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyIdentified) > 0);
updatePacket.ParcelData.RegionDenyTransacted = false; //unemplemented updatePacket.ParcelData.RegionDenyTransacted = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyTransacted) > 0);
updatePacket.ParcelData.RegionPushOverride = true; //unemplemented updatePacket.ParcelData.RegionPushOverride = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.RestrictPushObject) > 0);
updatePacket.ParcelData.RentPrice = 0; //?? updatePacket.ParcelData.RentPrice = 0;
updatePacket.ParcelData.RequestResult = request_result; updatePacket.ParcelData.RequestResult = request_result;
updatePacket.ParcelData.SalePrice = parcelData.salePrice; //unemplemented updatePacket.ParcelData.SalePrice = parcelData.salePrice; //unemplemented
updatePacket.ParcelData.SelectedPrims = 0; //unemeplemented updatePacket.ParcelData.SelectedPrims = 0; //unemeplemented

View File

@ -485,7 +485,6 @@ namespace OpenSim.Region.Environment.Scenes
client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(parcelManager.handleParcelPropertiesUpdateRequest); client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(parcelManager.handleParcelPropertiesUpdateRequest);
client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage); client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage);
client.OnSignificantClientMovement += new SignificantClientMovement(parcelManager.handleSignificantClientMovement);
} }
protected void CreateAndAddScenePresence(IClientAPI client) protected void CreateAndAddScenePresence(IClientAPI client)

View File

@ -81,6 +81,10 @@ namespace OpenSim.Region.Environment.Scenes
/// Position at which a significant movement was made /// Position at which a significant movement was made
/// </summary> /// </summary>
private LLVector3 posLastSignificantMove = new LLVector3(); private LLVector3 posLastSignificantMove = new LLVector3();
public delegate void SignificantClientMovement(IClientAPI remote_client);
public event SignificantClientMovement OnSignificantClientMovement;
#region Properties #region Properties
/// <summary> /// <summary>
/// ///
@ -147,7 +151,7 @@ namespace OpenSim.Region.Environment.Scenes
// ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack); // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack);
// ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
//ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
OnSignificantClientMovement += new SignificantClientMovement(m_world.parcelManager.handleSignificantClientMovement);
Dir_Vectors[0] = new Vector3(1, 0, 0); //FOWARD Dir_Vectors[0] = new Vector3(1, 0, 0); //FOWARD
Dir_Vectors[1] = new Vector3(-1, 0, 0); //BACK Dir_Vectors[1] = new Vector3(-1, 0, 0); //BACK
Dir_Vectors[2] = new Vector3(0, 1, 0); //LEFT 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) if (libsecondlife.Helpers.VecDist(this.Pos, this.posLastSignificantMove) > 2.0)
{ {
this.posLastSignificantMove = this.Pos; this.posLastSignificantMove = this.Pos;
this.ControllingClient.TriggerSignificantClientMovement(this.ControllingClient); if (OnSignificantClientMovement != null)
{
OnSignificantClientMovement(this.ControllingClient);
}
} }
} }
#endregion #endregion