The map is seriously broken. This doesn't fix it, but at least provides one more piece of data that seems to be required -- agent flags, which seem to be different in Viewer 2. WARNING: changes IClientAPI.
parent
fd66903f74
commit
c0a69bfaab
|
@ -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);
|
||||||
|
|
|
@ -8264,13 +8264,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 < 3)
|
if (mapName.Length < 3)
|
||||||
{
|
{
|
||||||
|
@ -139,9 +139,9 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
data.Y = 0;
|
data.Y = 0;
|
||||||
blocks.Add(data);
|
blocks.Add(data);
|
||||||
|
|
||||||
// not sure what the flags do here, but seems to be necessary
|
// flags are agent flags sent from the viewer.
|
||||||
// to set to "2" for viewer 2
|
// they have different values depending on different viewers, apparently
|
||||||
remoteClient.SendMapBlock(blocks, 2);
|
remoteClient.SendMapBlock(blocks, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
// private Scene GetClientScene(IClientAPI client)
|
// private Scene GetClientScene(IClientAPI client)
|
||||||
|
|
Loading…
Reference in New Issue