Merge branch 'master' into careminster-presence-refactor
commit
1bd949614a
|
@ -77,7 +77,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag);
|
public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag);
|
||||||
|
|
||||||
public delegate void RequestMapName(IClientAPI remoteClient, string mapName);
|
public delegate void RequestMapName(IClientAPI remoteClient, string mapName, uint flags);
|
||||||
|
|
||||||
public delegate void TeleportLocationRequest(
|
public delegate void TeleportLocationRequest(
|
||||||
IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags);
|
IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags);
|
||||||
|
|
|
@ -1370,7 +1370,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag)
|
public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag)
|
||||||
{
|
{
|
||||||
|
|
||||||
MapBlockData[] mapBlocks2 = mapBlocks.ToArray();
|
MapBlockData[] mapBlocks2 = mapBlocks.ToArray();
|
||||||
|
|
||||||
int maxsend = 10;
|
int maxsend = 10;
|
||||||
|
@ -8320,13 +8319,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
string mapName = Util.UTF8.GetString(map.NameData.Name, 0,
|
string mapName = Util.UTF8.GetString(map.NameData.Name, 0,
|
||||||
map.NameData.Name.Length - 1);
|
map.NameData.Name.Length - 1);
|
||||||
RequestMapName handlerMapNameRequest = OnMapNameRequest;
|
RequestMapName handlerMapNameRequest = OnMapNameRequest;
|
||||||
if (handlerMapNameRequest != null)
|
if (handlerMapNameRequest != null)
|
||||||
{
|
{
|
||||||
handlerMapNameRequest(this, mapName);
|
handlerMapNameRequest(this, mapName, map.AgentData.Flags);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
client.OnMapNameRequest += OnMapNameRequest;
|
client.OnMapNameRequest += OnMapNameRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnMapNameRequest(IClientAPI remoteClient, string mapName)
|
private void OnMapNameRequest(IClientAPI remoteClient, string mapName, uint flags)
|
||||||
{
|
{
|
||||||
if (mapName.Length < 2)
|
if (mapName.Length < 2)
|
||||||
{
|
{
|
||||||
|
@ -117,7 +117,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
data = new MapBlockData();
|
data = new MapBlockData();
|
||||||
data.Agents = 0;
|
data.Agents = 0;
|
||||||
data.Access = info.Access;
|
data.Access = info.Access;
|
||||||
data.MapImageId = UUID.Zero; // could use info.TerrainImage but it seems to break viewer2
|
if (flags == 2) // V2 sends this
|
||||||
|
data.MapImageId = UUID.Zero;
|
||||||
|
else
|
||||||
|
data.MapImageId = info.TerrainImage;
|
||||||
data.Name = info.RegionName;
|
data.Name = info.RegionName;
|
||||||
data.RegionFlags = 0; // TODO not used?
|
data.RegionFlags = 0; // TODO not used?
|
||||||
data.WaterHeight = 0; // not used
|
data.WaterHeight = 0; // not used
|
||||||
|
@ -139,7 +142,9 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
data.Y = 0;
|
data.Y = 0;
|
||||||
blocks.Add(data);
|
blocks.Add(data);
|
||||||
|
|
||||||
remoteClient.SendMapBlock(blocks, 2);
|
// flags are agent flags sent from the viewer.
|
||||||
|
// they have different values depending on different viewers, apparently
|
||||||
|
remoteClient.SendMapBlock(blocks, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
// private Scene GetClientScene(IClientAPI client)
|
// private Scene GetClientScene(IClientAPI client)
|
||||||
|
|
|
@ -205,8 +205,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
{
|
{
|
||||||
//try
|
//try
|
||||||
//{
|
//{
|
||||||
//m_log.DebugFormat("[MAPLAYER]: request: {0}, path: {1}, param: {2}, agent:{3}",
|
//m_log.DebugFormat("[MAPLAYER]: path: {0}, param: {1}, agent:{2}",
|
||||||
//request, path, param,agentID.ToString());
|
// path, param, agentID.ToString());
|
||||||
|
|
||||||
// this is here because CAPS map requests work even beyond the 10,000 limit.
|
// this is here because CAPS map requests work even beyond the 10,000 limit.
|
||||||
ScenePresence avatarPresence = null;
|
ScenePresence avatarPresence = null;
|
||||||
|
@ -784,7 +784,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
/// <param name="maxY"></param>
|
/// <param name="maxY"></param>
|
||||||
public virtual void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
|
public virtual void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
|
||||||
{
|
{
|
||||||
if ((flag & 0x10000) != 0) // user clicked on the map a tile that isn't visible
|
//m_log.ErrorFormat("[YYY] RequestMapBlocks {0}={1}={2}={3} {4}", minX, minY, maxX, maxY, flag);
|
||||||
|
if ((flag & 0x10000) != 0) // user clicked on qthe map a tile that isn't visible
|
||||||
{
|
{
|
||||||
List<MapBlockData> response = new List<MapBlockData>();
|
List<MapBlockData> response = new List<MapBlockData>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue