Fixed the flashing when crossing a border.

Sugilite
MW 2007-06-18 14:41:38 +00:00
parent 99a308007c
commit 82d309d007
6 changed files with 78 additions and 68 deletions

View File

@ -133,6 +133,7 @@ namespace OpenSim.Framework.Interfaces
void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 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 SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
void SendLayerData(float[] map); void SendLayerData(float[] map);
void SendLayerData(int px, int py, float[] map);
void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look); void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort); void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort);
AgentCircuitData RequestClientInfo(); AgentCircuitData RequestClientInfo();

View File

@ -556,63 +556,61 @@ namespace OpenSim.Caches
return server; return server;
} }
} public class 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 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;
}
}
} }

View File

@ -87,7 +87,7 @@ namespace OpenSim.Region.Scenes
/// </summary> /// </summary>
public void SendInitialPosition() 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> /// <summary>

View File

@ -446,15 +446,7 @@ namespace OpenSim.Region.Scenes
this.Terrain.setHeights1D(map); this.Terrain.setHeights1D(map);
} }
//create a texture asset of the terrain CreateTerrainTexture();
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);
} }
catch (Exception e) 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()); 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 #endregion
#region Primitives Methods #region Primitives Methods
@ -818,7 +827,7 @@ namespace OpenSim.Region.Scenes
/// <param name="RemoteClient"></param> /// <param name="RemoteClient"></param>
public override void SendLayerData(int px, int py, IClientAPI RemoteClient) public override void SendLayerData(int px, int py, IClientAPI RemoteClient)
{ {
RemoteClient.SendLayerData( Terrain.getHeights1D() ); RemoteClient.SendLayerData(px, py, Terrain.getHeights1D());
} }
} }
} }

View File

@ -32,6 +32,7 @@ using OpenSim.Framework.Interfaces;
namespace OpenSim namespace OpenSim
{ {
public class NetworkServersInfo public class NetworkServersInfo
{ {
public string AssetURL = "http://127.0.0.1:8003/"; public string AssetURL = "http://127.0.0.1:8003/";
@ -115,4 +116,5 @@ namespace OpenSim
} }
} }
} }
} }

View File

@ -151,20 +151,20 @@ namespace OpenSim
public void ServerListener() 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); ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort);
Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
Server.Bind(ServerIncoming); 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); ipeSender = new IPEndPoint(IPAddress.Any, 0);
epSender = (EndPoint)ipeSender; epSender = (EndPoint)ipeSender;
ReceivedData = new AsyncCallback(this.OnReceivedData); ReceivedData = new AsyncCallback(this.OnReceivedData);
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 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...");
} }