*Parcel and estate support fully restored into Sugilite
*Significant movement (currently set to 2 meters of movement for performance reasons, even though its speedy) and initial login now sends parcel updatesafrisby
parent
b27924d0a5
commit
df24ce6dfd
|
@ -75,6 +75,7 @@ namespace OpenSim.Framework.Interfaces
|
||||||
|
|
||||||
public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
|
public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
|
||||||
|
|
||||||
|
|
||||||
public interface IClientAPI
|
public interface IClientAPI
|
||||||
{
|
{
|
||||||
event ImprovedInstantMessage OnInstantMessage;
|
event ImprovedInstantMessage OnInstantMessage;
|
||||||
|
@ -124,7 +125,6 @@ namespace OpenSim.Framework.Interfaces
|
||||||
event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
|
event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
|
||||||
|
|
||||||
event EstateOwnerMessageRequest OnEstateOwnerMessage;
|
event EstateOwnerMessageRequest OnEstateOwnerMessage;
|
||||||
|
|
||||||
LLVector3 StartPos
|
LLVector3 StartPos
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
|
|
|
@ -86,6 +86,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
|
public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
|
||||||
|
|
||||||
public event EstateOwnerMessageRequest OnEstateOwnerMessage;
|
public event EstateOwnerMessageRequest OnEstateOwnerMessage;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -564,6 +564,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
if (OnParcelPropertiesUpdateRequest != null)
|
if (OnParcelPropertiesUpdateRequest != null)
|
||||||
{
|
{
|
||||||
OnParcelPropertiesUpdateRequest(updatePacket, this);
|
OnParcelPropertiesUpdateRequest(updatePacket, this);
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -356,11 +356,11 @@ namespace OpenSim.Region.Environment
|
||||||
//Sale Flag
|
//Sale Flag
|
||||||
tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_IS_FOR_SALE);
|
tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_IS_FOR_SALE);
|
||||||
}
|
}
|
||||||
/*else if (currentParcelBlock.parcelData.ownerID == LLUUID.Zero)
|
else if (currentParcelBlock.parcelData.ownerID == LLUUID.Zero)
|
||||||
{
|
{
|
||||||
//Public Flag
|
//Public Flag
|
||||||
tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_PUBLIC);
|
tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_PUBLIC);
|
||||||
}*/
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Other Flag
|
//Other Flag
|
||||||
|
@ -395,7 +395,6 @@ namespace OpenSim.Region.Environment
|
||||||
packet = new ParcelOverlayPacket();
|
packet = new ParcelOverlayPacket();
|
||||||
packet.ParcelData.Data = byteArray;
|
packet.ParcelData.Data = byteArray;
|
||||||
packet.ParcelData.SequenceID = sequenceID;
|
packet.ParcelData.SequenceID = sequenceID;
|
||||||
Console.WriteLine("SENT #" + sequenceID);
|
|
||||||
remote_client.OutPacket((Packet)packet);
|
remote_client.OutPacket((Packet)packet);
|
||||||
sequenceID++;
|
sequenceID++;
|
||||||
byteArray = new byte[PARCEL_BLOCKS_PER_PACKET];
|
byteArray = new byte[PARCEL_BLOCKS_PER_PACKET];
|
||||||
|
@ -483,6 +482,20 @@ namespace OpenSim.Region.Environment
|
||||||
addParcel(fullSimParcel);
|
addParcel(fullSimParcel);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void handleSignificantClientMovement(IClientAPI remote_client)
|
||||||
|
{
|
||||||
|
Avatar clientAvatar = m_world.RequestAvatar(remote_client.AgentId);
|
||||||
|
if (clientAvatar != null)
|
||||||
|
{
|
||||||
|
Parcel over = getParcel(Convert.ToInt32(clientAvatar.Pos.X), Convert.ToInt32(clientAvatar.Pos.Y));
|
||||||
|
if (over != null)
|
||||||
|
{
|
||||||
|
over.sendParcelProperties(0, false, 0, remote_client); //TODO: correctly send the sequence ID!!!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -638,7 +651,6 @@ namespace OpenSim.Region.Environment
|
||||||
parcelData.userLookAt = packet.ParcelData.UserLookAt;
|
parcelData.userLookAt = packet.ParcelData.UserLookAt;
|
||||||
|
|
||||||
List<Avatar> avatars = m_world.RequestAvatarList();
|
List<Avatar> avatars = m_world.RequestAvatarList();
|
||||||
|
|
||||||
for (int i = 0; i < avatars.Count; i++)
|
for (int i = 0; i < avatars.Count; i++)
|
||||||
{
|
{
|
||||||
Parcel over = m_world.parcelManager.getParcel((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y));
|
Parcel over = m_world.parcelManager.getParcel((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y));
|
||||||
|
|
|
@ -493,6 +493,7 @@ 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);
|
||||||
|
|
||||||
|
|
||||||
this.estateManager.sendRegionHandshake(client);
|
this.estateManager.sendRegionHandshake(client);
|
||||||
CreateAndAddScenePresence(client);
|
CreateAndAddScenePresence(client);
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
public partial class ScenePresence : Entity
|
public partial class ScenePresence : Entity
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static bool PhysicsEngineFlying = false;
|
public static bool PhysicsEngineFlying = false;
|
||||||
public static AvatarAnimations Animations;
|
public static AvatarAnimations Animations;
|
||||||
public static byte[] DefaultTexture;
|
public static byte[] DefaultTexture;
|
||||||
|
@ -75,7 +78,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
DIR_CONTROL_FLAG_UP = MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS,
|
DIR_CONTROL_FLAG_UP = MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS,
|
||||||
DIR_CONTROL_FLAG_DOWN = MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG
|
DIR_CONTROL_FLAG_DOWN = MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Position at which a significant movement was made
|
||||||
|
/// </summary>
|
||||||
|
private LLVector3 posLastSignificantMove = new LLVector3();
|
||||||
#region Properties
|
#region Properties
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
@ -359,7 +365,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.CheckForSignificantMovement();
|
||||||
this.CheckForBorderCrossing();
|
this.CheckForBorderCrossing();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -465,6 +473,18 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Significant Movement Method
|
||||||
|
|
||||||
|
protected void CheckForSignificantMovement()
|
||||||
|
{
|
||||||
|
if (libsecondlife.Helpers.VecDist(this.Pos, this.posLastSignificantMove) > 2.0)
|
||||||
|
{
|
||||||
|
this.posLastSignificantMove = this.Pos;
|
||||||
|
this.m_world.parcelManager.handleSignificantClientMovement(this.ControllingClient);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
#region Border Crossing Methods
|
#region Border Crossing Methods
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue