Fixed problem of not being able to move out of the first 3X3 block of regions. (Code Needs cleaning up).
parent
cc75a6c83e
commit
e647d9ec51
|
@ -56,7 +56,7 @@ namespace OpenSim.Framework
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
|
public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
|
||||||
{
|
{
|
||||||
if (OnAvatarCrossingIntoRegion != null)
|
if (OnAvatarCrossingIntoRegion != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -168,7 +168,7 @@ namespace OpenSim.LocalCommunications
|
||||||
if (this.regionHosts.ContainsKey(regionHandle))
|
if (this.regionHosts.ContainsKey(regionHandle))
|
||||||
{
|
{
|
||||||
// Console.WriteLine("CommsManager- Informing a region to expect avatar crossing");
|
// Console.WriteLine("CommsManager- Informing a region to expect avatar crossing");
|
||||||
this.regionHosts[regionHandle].ExpectAvatarCrossing(regionHandle, agentID, position);
|
this.regionHosts[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -38,10 +38,9 @@ namespace OpenSim.Region.Scenes
|
||||||
public abstract class Entity : IScriptReadonlyEntity
|
public abstract class Entity : IScriptReadonlyEntity
|
||||||
{
|
{
|
||||||
public libsecondlife.LLUUID uuid;
|
public libsecondlife.LLUUID uuid;
|
||||||
public LLVector3 velocity;
|
|
||||||
public Quaternion rotation;
|
public Quaternion rotation;
|
||||||
protected List<Entity> children;
|
protected List<Entity> children;
|
||||||
protected LLVector3 m_pos;
|
|
||||||
protected PhysicsActor _physActor;
|
protected PhysicsActor _physActor;
|
||||||
protected Scene m_world;
|
protected Scene m_world;
|
||||||
protected string m_name;
|
protected string m_name;
|
||||||
|
@ -54,6 +53,7 @@ namespace OpenSim.Region.Scenes
|
||||||
get { return m_name; }
|
get { return m_name; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected LLVector3 m_pos;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -92,6 +92,11 @@ namespace OpenSim.Region.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LLVector3 velocity;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public virtual LLVector3 Velocity
|
public virtual LLVector3 Velocity
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
@ -739,7 +739,7 @@ namespace OpenSim.Region.Scenes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected void InformClientOfNeighbours(IClientAPI remoteClient)
|
public void InformClientOfNeighbours(IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
// Console.WriteLine("informing client of neighbouring regions");
|
// Console.WriteLine("informing client of neighbouring regions");
|
||||||
List<RegionInfo> neighbours = this.commsManager.GridServer.RequestNeighbours(this.m_regInfo);
|
List<RegionInfo> neighbours = this.commsManager.GridServer.RequestNeighbours(this.m_regInfo);
|
||||||
|
|
|
@ -73,29 +73,17 @@ namespace OpenSim.Region.Scenes
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public ObjectUpdatePacket CreateUpdatePacket()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendInitialPosition()
|
public void SendInitialPosition()
|
||||||
{
|
{
|
||||||
this.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos);
|
this.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos);
|
||||||
}
|
if (this.newAvatar)
|
||||||
|
{
|
||||||
/// <summary>
|
this.m_world.InformClientOfNeighbours(this.ControllingClient);
|
||||||
///
|
this.newAvatar = false;
|
||||||
/// </summary>
|
}
|
||||||
public void SendOurAppearance()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -61,6 +61,7 @@ namespace OpenSim.Region.Scenes
|
||||||
private ulong m_regionHandle;
|
private ulong m_regionHandle;
|
||||||
private bool childAvatar = false;
|
private bool childAvatar = false;
|
||||||
private bool newForce = false;
|
private bool newForce = false;
|
||||||
|
private bool newAvatar = false;
|
||||||
|
|
||||||
protected RegionInfo m_regionInfo;
|
protected RegionInfo m_regionInfo;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -145,6 +146,7 @@ namespace OpenSim.Region.Scenes
|
||||||
{
|
{
|
||||||
//this.childAvatar = false;
|
//this.childAvatar = false;
|
||||||
this.Pos = pos;
|
this.Pos = pos;
|
||||||
|
this.newAvatar = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void DownGradeAvatar()
|
protected void DownGradeAvatar()
|
||||||
|
@ -179,7 +181,7 @@ namespace OpenSim.Region.Scenes
|
||||||
NewForce force = this.forcesList[i];
|
NewForce force = this.forcesList[i];
|
||||||
|
|
||||||
this.updateflag = true;
|
this.updateflag = true;
|
||||||
this.Velocity = new LLVector3(force.X, force.Y, force.Z); //shouldn't really be doing this
|
this.Velocity = new LLVector3(force.X, force.Y, force.Z);
|
||||||
this.newForce = true;
|
this.newForce = true;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < this.forcesList.Count; i++)
|
for (int i = 0; i < this.forcesList.Count; i++)
|
||||||
|
|
|
@ -154,8 +154,8 @@ namespace OpenSim
|
||||||
mapReply.AgentData.Flags = 0;
|
mapReply.AgentData.Flags = 0;
|
||||||
mapReply.LayerData = new MapLayerReplyPacket.LayerDataBlock[1];
|
mapReply.LayerData = new MapLayerReplyPacket.LayerDataBlock[1];
|
||||||
mapReply.LayerData[0] = new MapLayerReplyPacket.LayerDataBlock();
|
mapReply.LayerData[0] = new MapLayerReplyPacket.LayerDataBlock();
|
||||||
mapReply.LayerData[0].Bottom = 1;
|
mapReply.LayerData[0].Bottom = 0;
|
||||||
mapReply.LayerData[0].Left = 1;
|
mapReply.LayerData[0].Left = 0;
|
||||||
mapReply.LayerData[0].Top = 30000;
|
mapReply.LayerData[0].Top = 30000;
|
||||||
mapReply.LayerData[0].Right = 30000;
|
mapReply.LayerData[0].Right = 30000;
|
||||||
mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-0000-9999-000000000006");
|
mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-0000-9999-000000000006");
|
||||||
|
|
Loading…
Reference in New Issue