aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-06-18 14:41:38 +0000
committerMW2007-06-18 14:41:38 +0000
commit82d309d00765944654db023416a104d96de04328 (patch)
tree51b0f366479231b0061be1dad9df7823cf3e7457
parentFixed inverted map texture problem. (diff)
downloadopensim-SC_OLD-82d309d00765944654db023416a104d96de04328.zip
opensim-SC_OLD-82d309d00765944654db023416a104d96de04328.tar.gz
opensim-SC_OLD-82d309d00765944654db023416a104d96de04328.tar.bz2
opensim-SC_OLD-82d309d00765944654db023416a104d96de04328.tar.xz
Fixed the flashing when crossing a border.
Diffstat (limited to '')
-rw-r--r--Common/OpenSim.Framework/Interfaces/IClientAPI.cs1
-rw-r--r--OpenSim/OpenSim.Caches/AssetCache.cs86
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs2
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Scene.cs29
-rw-r--r--OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs2
-rw-r--r--OpenSim/OpenSim.RegionServer/UDPServer.cs6
6 files changed, 68 insertions, 58 deletions
diff --git a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
index 6e758b2..afeae1f 100644
--- a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
+++ b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
@@ -133,6 +133,7 @@ namespace OpenSim.Framework.Interfaces
133 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 133 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
134 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 134 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
135 void SendLayerData(float[] map); 135 void SendLayerData(float[] map);
136 void SendLayerData(int px, int py, float[] map);
136 void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look); 137 void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
137 void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort); 138 void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort);
138 AgentCircuitData RequestClientInfo(); 139 AgentCircuitData RequestClientInfo();
diff --git a/OpenSim/OpenSim.Caches/AssetCache.cs b/OpenSim/OpenSim.Caches/AssetCache.cs
index 7622b30..eae0f80 100644
--- a/OpenSim/OpenSim.Caches/AssetCache.cs
+++ b/OpenSim/OpenSim.Caches/AssetCache.cs
@@ -556,63 +556,61 @@ namespace OpenSim.Caches
556 return server; 556 return server;
557 } 557 }
558 558
559 } 559 public class AssetRequest
560
561 public class AssetRequest
562 {
563 public IClientAPI RequestUser;
564 public LLUUID RequestAssetID;
565 public AssetInfo AssetInf;
566 public TextureImage ImageInfo;
567 public LLUUID TransferRequestID;
568 public long DataPointer = 0;
569 public int NumPackets = 0;
570 public int PacketCounter = 0;
571 public bool IsTextureRequest;
572 //public bool AssetInCache;
573 //public int TimeRequested;
574
575 public AssetRequest()
576 { 560 {
561 public IClientAPI RequestUser;
562 public LLUUID RequestAssetID;
563 public AssetInfo AssetInf;
564 public TextureImage ImageInfo;
565 public LLUUID TransferRequestID;
566 public long DataPointer = 0;
567 public int NumPackets = 0;
568 public int PacketCounter = 0;
569 public bool IsTextureRequest;
570 //public bool AssetInCache;
571 //public int TimeRequested;
572
573 public AssetRequest()
574 {
577 575
576 }
578 } 577 }
579 }
580 578
581 public class AssetInfo : AssetBase 579 public class AssetInfo : AssetBase
582 {
583 public AssetInfo()
584 { 580 {
581 public AssetInfo()
582 {
585 583
586 } 584 }
587 585
588 public AssetInfo(AssetBase aBase) 586 public AssetInfo(AssetBase aBase)
589 { 587 {
590 Data = aBase.Data; 588 Data = aBase.Data;
591 FullID = aBase.FullID; 589 FullID = aBase.FullID;
592 Type = aBase.Type; 590 Type = aBase.Type;
593 InvType = aBase.InvType; 591 InvType = aBase.InvType;
594 Name = aBase.Name; 592 Name = aBase.Name;
595 Description = aBase.Description; 593 Description = aBase.Description;
594 }
596 } 595 }
597 }
598 596
599 public class TextureImage : AssetBase 597 public class TextureImage : AssetBase
600 {
601 public TextureImage()
602 { 598 {
599 public TextureImage()
600 {
603 601
604 } 602 }
605 603
606 public TextureImage(AssetBase aBase) 604 public TextureImage(AssetBase aBase)
607 { 605 {
608 Data = aBase.Data; 606 Data = aBase.Data;
609 FullID = aBase.FullID; 607 FullID = aBase.FullID;
610 Type = aBase.Type; 608 Type = aBase.Type;
611 InvType = aBase.InvType; 609 InvType = aBase.InvType;
612 Name = aBase.Name; 610 Name = aBase.Name;
613 Description = aBase.Description; 611 Description = aBase.Description;
612 }
614 } 613 }
615 } 614 }
616
617} 615}
618 616
diff --git a/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs b/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs
index 50d5a14..534bda4 100644
--- a/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Scenes
87 /// </summary> 87 /// </summary>
88 public void SendInitialPosition() 88 public void SendInitialPosition()
89 { 89 {
90 this.ControllingClient.SendAvatarData(m_regionInfo, this.firstname, this.lastname, this.uuid, this.localid, new LLVector3(128, 128, 60)); 90 this.ControllingClient.SendAvatarData(m_regionInfo, this.firstname, this.lastname, this.uuid, this.localid, this.Pos);
91 } 91 }
92 92
93 /// <summary> 93 /// <summary>
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs
index 5744f1f..cb3865f 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs
@@ -446,15 +446,7 @@ namespace OpenSim.Region.Scenes
446 this.Terrain.setHeights1D(map); 446 this.Terrain.setHeights1D(map);
447 } 447 }
448 448
449 //create a texture asset of the terrain 449 CreateTerrainTexture();
450 byte[] data =this.Terrain.exportJpegImage("defaultstripe.png");
451 this.m_regInfo.estateSettings.terrainImageID= LLUUID.Random();
452 AssetBase asset = new AssetBase();
453 asset.FullID = this.m_regInfo.estateSettings.terrainImageID;
454 asset.Data = data;
455 asset.Name = "terrainImage";
456 asset.Type = 0;
457 this.assetCache.AddAsset(asset);
458 450
459 } 451 }
460 catch (Exception e) 452 catch (Exception e)
@@ -462,6 +454,23 @@ namespace OpenSim.Region.Scenes
462 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); 454 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadWorldMap() - Failed with exception " + e.ToString());
463 } 455 }
464 } 456 }
457
458
459 /// <summary>
460 ///
461 /// </summary>
462 private void CreateTerrainTexture()
463 {
464 //create a texture asset of the terrain
465 byte[] data = this.Terrain.exportJpegImage("defaultstripe.png");
466 this.m_regInfo.estateSettings.terrainImageID = LLUUID.Random();
467 AssetBase asset = new AssetBase();
468 asset.FullID = this.m_regInfo.estateSettings.terrainImageID;
469 asset.Data = data;
470 asset.Name = "terrainImage";
471 asset.Type = 0;
472 this.assetCache.AddAsset(asset);
473 }
465 #endregion 474 #endregion
466 475
467 #region Primitives Methods 476 #region Primitives Methods
@@ -818,7 +827,7 @@ namespace OpenSim.Region.Scenes
818 /// <param name="RemoteClient"></param> 827 /// <param name="RemoteClient"></param>
819 public override void SendLayerData(int px, int py, IClientAPI RemoteClient) 828 public override void SendLayerData(int px, int py, IClientAPI RemoteClient)
820 { 829 {
821 RemoteClient.SendLayerData( Terrain.getHeights1D() ); 830 RemoteClient.SendLayerData(px, py, Terrain.getHeights1D());
822 } 831 }
823 } 832 }
824} 833}
diff --git a/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs b/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs
index d0cbe2b..635bbdf 100644
--- a/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs
+++ b/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs
@@ -32,6 +32,7 @@ using OpenSim.Framework.Interfaces;
32 32
33namespace OpenSim 33namespace OpenSim
34{ 34{
35
35 public class NetworkServersInfo 36 public class NetworkServersInfo
36 { 37 {
37 public string AssetURL = "http://127.0.0.1:8003/"; 38 public string AssetURL = "http://127.0.0.1:8003/";
@@ -115,4 +116,5 @@ namespace OpenSim
115 } 116 }
116 } 117 }
117 } 118 }
119
118} 120}
diff --git a/OpenSim/OpenSim.RegionServer/UDPServer.cs b/OpenSim/OpenSim.RegionServer/UDPServer.cs
index 315cb2c..54ec480 100644
--- a/OpenSim/OpenSim.RegionServer/UDPServer.cs
+++ b/OpenSim/OpenSim.RegionServer/UDPServer.cs
@@ -151,20 +151,20 @@ namespace OpenSim
151 151
152 public void ServerListener() 152 public void ServerListener()
153 { 153 {
154 m_console.WriteLine("UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort); 154 m_console.WriteLine(LogPriority.LOW, "UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort);
155 155
156 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort); 156 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort);
157 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 157 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
158 Server.Bind(ServerIncoming); 158 Server.Bind(ServerIncoming);
159 159
160 m_console.WriteLine("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen"); 160 m_console.WriteLine(LogPriority.LOW, "UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen");
161 161
162 ipeSender = new IPEndPoint(IPAddress.Any, 0); 162 ipeSender = new IPEndPoint(IPAddress.Any, 0);
163 epSender = (EndPoint)ipeSender; 163 epSender = (EndPoint)ipeSender;
164 ReceivedData = new AsyncCallback(this.OnReceivedData); 164 ReceivedData = new AsyncCallback(this.OnReceivedData);
165 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 165 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
166 166
167 m_console.WriteLine("UDPServer.cs:ServerListener() - Listening..."); 167 m_console.WriteLine(LogPriority.LOW, "UDPServer.cs:ServerListener() - Listening...");
168 168
169 } 169 }
170 170