From 38a800400ae8c61eef0770b8c49aa6e637478e58 Mon Sep 17 00:00:00 2001
From: MW
Date: Sun, 24 Jun 2007 15:24:02 +0000
Subject: Disabled the CheckSum Server as it seems that isn't used by viewer
1.18. Started to add support for asset uploads over CAPS (the asset is
uploaded but seems to come out corrupt). Started to cleanup/rewrite the
AssetCache. Fixed bug in MapBlock requests, where data for some regions
wasn't being sent. Renamed PrimData's Texture to TextureEntry. most likely a
few other small changes.
---
OpenSim/OpenSim.Region/Scenes/Primitive.cs | 4 ++--
OpenSim/OpenSim.Region/Scenes/Scene.cs | 8 ++++----
OpenSim/OpenSim.Region/Scenes/ScenePresence.cs | 27 ++++++++++++++++++++------
3 files changed, 27 insertions(+), 12 deletions(-)
(limited to 'OpenSim/OpenSim.Region/Scenes')
diff --git a/OpenSim/OpenSim.Region/Scenes/Primitive.cs b/OpenSim/OpenSim.Region/Scenes/Primitive.cs
index 8192bf0..62f401c 100644
--- a/OpenSim/OpenSim.Region/Scenes/Primitive.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Primitive.cs
@@ -273,7 +273,7 @@ namespace OpenSim.Region.Scenes
///
public void UpdateTexture(byte[] tex)
{
- this.primData.Texture = tex;
+ this.primData.TextureEntry = tex;
}
///
@@ -411,7 +411,7 @@ namespace OpenSim.Region.Scenes
lPos = this.Pos;
}
- remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.primData, lPos, new LLUUID("00000000-0000-1000-5005-000000000018"));
+ remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.primData, lPos, new LLUUID("00000000-0000-0000-9999-000000000005"));
}
///
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs
index 07f1d70..07b1ee4 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs
@@ -730,7 +730,7 @@ namespace OpenSim.Region.Scenes
if (agent.CapsPath != "")
{
//Console.WriteLine("new user, so creating caps handler for it");
- Caps cap = new Caps(httpListener, this.m_regInfo.IPListenAddr, 9000, agent.CapsPath, agent.AgentID);
+ Caps cap = new Caps(this.assetCache, httpListener, this.m_regInfo.IPListenAddr, 9000, agent.CapsPath, agent.AgentID);
cap.RegisterHandlers();
this.capsHandlers.Add(cap);
}
@@ -795,7 +795,7 @@ namespace OpenSim.Region.Scenes
{
List mapBlocks;
mapBlocks = this.commsManager.GridServer.RequestNeighbourMapBlocks(minX, minY, maxX, maxY);
-
+ Console.WriteLine("number of mapblocks " + mapBlocks.Count +" in "+ minX +" , " + minY + " , "+ maxX + " , "+ maxY);
remoteClient.SendMapBlock(mapBlocks);
}
@@ -843,9 +843,9 @@ namespace OpenSim.Region.Scenes
///
///
///
- public void InformNeighbourOfCrossing(ulong regionhandle, LLUUID agentID, LLVector3 position)
+ public bool InformNeighbourOfCrossing(ulong regionhandle, LLUUID agentID, LLVector3 position)
{
- this.commsManager.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position);
+ return this.commsManager.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position);
}
#endregion
diff --git a/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs b/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs
index 1255606..fe82130 100644
--- a/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs
+++ b/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs
@@ -43,6 +43,7 @@ namespace OpenSim.Region.Scenes
{
public static bool PhysicsEngineFlying = false;
public static AvatarAnimations Animations;
+ public static byte[] DefaultTexture;
public string firstname;
public string lastname;
public IClientAPI ControllingClient;
@@ -324,7 +325,7 @@ namespace OpenSim.Region.Scenes
///
public void SendFullUpdateToOtherClient(ScenePresence remoteAvatar)
{
- remoteAvatar.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos);
+ remoteAvatar.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos, DefaultTexture);
}
///
@@ -332,7 +333,7 @@ namespace OpenSim.Region.Scenes
///
public void SendInitialData()
{
- 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, DefaultTexture);
if (this.newAvatar)
{
this.m_world.InformClientOfNeighbours(this.ControllingClient);
@@ -439,10 +440,12 @@ namespace OpenSim.Region.Scenes
RegionInfo neighbourRegion = this.m_world.RequestNeighbouringRegionInfo(neighbourHandle);
if (neighbourRegion != null)
{
- this.m_world.InformNeighbourOfCrossing(neighbourHandle, this.ControllingClient.AgentId, newpos);
- this.MakeChildAgent();
- this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, System.Net.IPAddress.Parse(neighbourRegion.IPListenAddr), (ushort)neighbourRegion.IPListenPort);
-
+ bool res = this.m_world.InformNeighbourOfCrossing(neighbourHandle, this.ControllingClient.AgentId, newpos);
+ if (res)
+ {
+ this.MakeChildAgent();
+ this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, System.Net.IPAddress.Parse(neighbourRegion.IPListenAddr), (ushort)neighbourRegion.IPListenPort);
+ }
}
}
#endregion
@@ -481,6 +484,18 @@ namespace OpenSim.Region.Scenes
}
}
+ public static void LoadTextureFile(string name)
+ {
+ FileInfo fInfo = new FileInfo(name);
+ long numBytes = fInfo.Length;
+ FileStream fStream = new FileStream(name, FileMode.Open, FileAccess.Read);
+ BinaryReader br = new BinaryReader(fStream);
+ byte[] data1 = br.ReadBytes((int)numBytes);
+ br.Close();
+ fStream.Close();
+ DefaultTexture = data1;
+ }
+
public class NewForce
{
public float X;
--
cgit v1.1