merge
parent
36bcda6cfa
commit
cb33169fe6
|
@ -70,5 +70,7 @@ namespace OpenSim.Framework.Interfaces
|
|||
void OutPacket(Packet newPack);
|
||||
void SendWearables(AvatarWearable[] wearables);
|
||||
void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
|
||||
void SendLayerData(float[] map);
|
||||
void SendRegionHandshake(RegionInfo regionInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,9 +130,9 @@ namespace OpenSim.world
|
|||
}
|
||||
|
||||
//really really should be moved somewhere else (RegionInfo.cs ?)
|
||||
public void SendRegionHandshake(World regionInfo)
|
||||
public void SendRegionHandshake(RegionInfo regionInfo)
|
||||
{
|
||||
|
||||
this.ControllingClient.SendRegionHandshake(regionInfo);
|
||||
}
|
||||
|
||||
public static void LoadAnims()
|
||||
|
|
|
@ -504,7 +504,7 @@ namespace OpenSim.world
|
|||
public override void AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child)
|
||||
{
|
||||
remoteClient.OnRegionHandShakeReply += new GenericCall(this.SendLayerData);
|
||||
remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
|
||||
//remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
|
||||
|
||||
Avatar newAvatar = null;
|
||||
try
|
||||
|
@ -513,7 +513,7 @@ namespace OpenSim.world
|
|||
newAvatar = new Avatar(remoteClient, this, m_clientThreads, this.m_regInfo);
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world");
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake ");
|
||||
newAvatar.SendRegionHandshake(this);
|
||||
newAvatar.SendRegionHandshake(this.m_regInfo);
|
||||
|
||||
PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
|
||||
lock (this.LockPhysicsEngine)
|
||||
|
|
|
@ -85,28 +85,7 @@ namespace OpenSim.world
|
|||
/// <param name="RemoteClient">Client to send to</param>
|
||||
public virtual void SendLayerData(IClientAPI RemoteClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
int[] patches = new int[4];
|
||||
|
||||
for (int y = 0; y < 16; y++)
|
||||
{
|
||||
for (int x = 0; x < 16; x = x + 4)
|
||||
{
|
||||
patches[0] = x + 0 + y * 16;
|
||||
patches[1] = x + 1 + y * 16;
|
||||
patches[2] = x + 2 + y * 16;
|
||||
patches[3] = x + 3 + y * 16;
|
||||
|
||||
Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches);
|
||||
RemoteClient.OutPacket(layerpack);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: SendLayerData() - Failed with exception " + e.ToString());
|
||||
}
|
||||
RemoteClient.SendLayerData(Terrain.getHeights1D());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -117,22 +96,7 @@ namespace OpenSim.world
|
|||
/// <param name="RemoteClient">The client to send to</param>
|
||||
public void SendLayerData(int px, int py, IClientAPI RemoteClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
int[] patches = new int[1];
|
||||
int patchx, patchy;
|
||||
patchx = px / 16;
|
||||
patchy = py / 16;
|
||||
|
||||
patches[0] = patchx + 0 + patchy * 16;
|
||||
|
||||
Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches);
|
||||
RemoteClient.OutPacket(layerpack);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: SendLayerData() - Failed with exception " + e.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
Loading…
Reference in New Issue