Fixed the flashing when crossing a border.
parent
99a308007c
commit
82d309d007
|
@ -133,6 +133,7 @@ namespace OpenSim.Framework.Interfaces
|
|||
void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
|
||||
void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
|
||||
void SendLayerData(float[] map);
|
||||
void SendLayerData(int px, int py, float[] map);
|
||||
void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
|
||||
void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort);
|
||||
AgentCircuitData RequestClientInfo();
|
||||
|
|
|
@ -556,63 +556,61 @@ namespace OpenSim.Caches
|
|||
return server;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class AssetRequest
|
||||
{
|
||||
public IClientAPI RequestUser;
|
||||
public LLUUID RequestAssetID;
|
||||
public AssetInfo AssetInf;
|
||||
public TextureImage ImageInfo;
|
||||
public LLUUID TransferRequestID;
|
||||
public long DataPointer = 0;
|
||||
public int NumPackets = 0;
|
||||
public int PacketCounter = 0;
|
||||
public bool IsTextureRequest;
|
||||
//public bool AssetInCache;
|
||||
//public int TimeRequested;
|
||||
|
||||
public AssetRequest()
|
||||
public class AssetRequest
|
||||
{
|
||||
public IClientAPI RequestUser;
|
||||
public LLUUID RequestAssetID;
|
||||
public AssetInfo AssetInf;
|
||||
public TextureImage ImageInfo;
|
||||
public LLUUID TransferRequestID;
|
||||
public long DataPointer = 0;
|
||||
public int NumPackets = 0;
|
||||
public int PacketCounter = 0;
|
||||
public bool IsTextureRequest;
|
||||
//public bool AssetInCache;
|
||||
//public int TimeRequested;
|
||||
|
||||
public AssetRequest()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AssetInfo : AssetBase
|
||||
{
|
||||
public AssetInfo()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public AssetInfo(AssetBase aBase)
|
||||
{
|
||||
Data = aBase.Data;
|
||||
FullID = aBase.FullID;
|
||||
Type = aBase.Type;
|
||||
InvType = aBase.InvType;
|
||||
Name = aBase.Name;
|
||||
Description = aBase.Description;
|
||||
}
|
||||
}
|
||||
|
||||
public class TextureImage : AssetBase
|
||||
{
|
||||
public TextureImage()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TextureImage(AssetBase aBase)
|
||||
{
|
||||
Data = aBase.Data;
|
||||
FullID = aBase.FullID;
|
||||
Type = aBase.Type;
|
||||
InvType = aBase.InvType;
|
||||
Name = aBase.Name;
|
||||
Description = aBase.Description;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class AssetInfo : AssetBase
|
||||
{
|
||||
public AssetInfo()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public AssetInfo(AssetBase aBase)
|
||||
{
|
||||
Data = aBase.Data;
|
||||
FullID = aBase.FullID;
|
||||
Type = aBase.Type;
|
||||
InvType = aBase.InvType;
|
||||
Name = aBase.Name;
|
||||
Description = aBase.Description;
|
||||
}
|
||||
}
|
||||
|
||||
public class TextureImage : AssetBase
|
||||
{
|
||||
public TextureImage()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TextureImage(AssetBase aBase)
|
||||
{
|
||||
Data = aBase.Data;
|
||||
FullID = aBase.FullID;
|
||||
Type = aBase.Type;
|
||||
InvType = aBase.InvType;
|
||||
Name = aBase.Name;
|
||||
Description = aBase.Description;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace OpenSim.Region.Scenes
|
|||
/// </summary>
|
||||
public void SendInitialPosition()
|
||||
{
|
||||
this.ControllingClient.SendAvatarData(m_regionInfo, this.firstname, this.lastname, this.uuid, this.localid, new LLVector3(128, 128, 60));
|
||||
this.ControllingClient.SendAvatarData(m_regionInfo, this.firstname, this.lastname, this.uuid, this.localid, this.Pos);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -446,15 +446,7 @@ namespace OpenSim.Region.Scenes
|
|||
this.Terrain.setHeights1D(map);
|
||||
}
|
||||
|
||||
//create a texture asset of the terrain
|
||||
byte[] data =this.Terrain.exportJpegImage("defaultstripe.png");
|
||||
this.m_regInfo.estateSettings.terrainImageID= LLUUID.Random();
|
||||
AssetBase asset = new AssetBase();
|
||||
asset.FullID = this.m_regInfo.estateSettings.terrainImageID;
|
||||
asset.Data = data;
|
||||
asset.Name = "terrainImage";
|
||||
asset.Type = 0;
|
||||
this.assetCache.AddAsset(asset);
|
||||
CreateTerrainTexture();
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -462,6 +454,23 @@ namespace OpenSim.Region.Scenes
|
|||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadWorldMap() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private void CreateTerrainTexture()
|
||||
{
|
||||
//create a texture asset of the terrain
|
||||
byte[] data = this.Terrain.exportJpegImage("defaultstripe.png");
|
||||
this.m_regInfo.estateSettings.terrainImageID = LLUUID.Random();
|
||||
AssetBase asset = new AssetBase();
|
||||
asset.FullID = this.m_regInfo.estateSettings.terrainImageID;
|
||||
asset.Data = data;
|
||||
asset.Name = "terrainImage";
|
||||
asset.Type = 0;
|
||||
this.assetCache.AddAsset(asset);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Primitives Methods
|
||||
|
@ -818,7 +827,7 @@ namespace OpenSim.Region.Scenes
|
|||
/// <param name="RemoteClient"></param>
|
||||
public override void SendLayerData(int px, int py, IClientAPI RemoteClient)
|
||||
{
|
||||
RemoteClient.SendLayerData( Terrain.getHeights1D() );
|
||||
RemoteClient.SendLayerData(px, py, Terrain.getHeights1D());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ using OpenSim.Framework.Interfaces;
|
|||
|
||||
namespace OpenSim
|
||||
{
|
||||
|
||||
public class NetworkServersInfo
|
||||
{
|
||||
public string AssetURL = "http://127.0.0.1:8003/";
|
||||
|
@ -115,4 +116,5 @@ namespace OpenSim
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -151,20 +151,20 @@ namespace OpenSim
|
|||
|
||||
public void ServerListener()
|
||||
{
|
||||
m_console.WriteLine("UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort);
|
||||
m_console.WriteLine(LogPriority.LOW, "UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort);
|
||||
|
||||
ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort);
|
||||
Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
||||
Server.Bind(ServerIncoming);
|
||||
|
||||
m_console.WriteLine("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen");
|
||||
m_console.WriteLine(LogPriority.LOW, "UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen");
|
||||
|
||||
ipeSender = new IPEndPoint(IPAddress.Any, 0);
|
||||
epSender = (EndPoint)ipeSender;
|
||||
ReceivedData = new AsyncCallback(this.OnReceivedData);
|
||||
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
||||
|
||||
m_console.WriteLine("UDPServer.cs:ServerListener() - Listening...");
|
||||
m_console.WriteLine(LogPriority.LOW, "UDPServer.cs:ServerListener() - Listening...");
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue