still another missing ShowNPCs case, and needed changes for prev commit

0.9.1.0-post-fixes
UbitUmarov 2019-08-15 18:01:51 +01:00
parent 12abb3ffe4
commit 7d0b37faec
1 changed files with 8 additions and 6 deletions

View File

@ -88,14 +88,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
private List<UUID> m_rootAgents = new List<UUID>(); private List<UUID> m_rootAgents = new List<UUID>();
private volatile bool threadrunning = false; private volatile bool threadrunning = false;
// expire time for the blacklists in seconds // expire time for the blacklists in seconds
private double expireBlackListTime = 600.0; // 10 minutes protected double expireBlackListTime = 600.0; // 10 minutes
// expire mapItems responses time in seconds. Throttles requests to regions that do answer // expire mapItems responses time in seconds. Throttles requests to regions that do answer
private const double expireResponsesTime = 120.0; // 2 minutes ? private const double expireResponsesTime = 120.0; // 2 minutes ?
//private int CacheRegionsDistance = 256; //private int CacheRegionsDistance = 256;
private bool m_exportPrintScale = false; // prints the scale of map in meters on exported map protected bool m_exportPrintScale = false; // prints the scale of map in meters on exported map
private bool m_exportPrintRegionName = false; // prints the region name exported map protected bool m_exportPrintRegionName = false; // prints the region name exported map
private bool m_showNPCs = true; protected bool m_showNPCs = true;
#region INonSharedRegionModule Members #region INonSharedRegionModule Members
public virtual void Initialise(IConfigSource config) public virtual void Initialise(IConfigSource config)
@ -490,7 +490,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
// Service 6 right now (MAP_ITEM_AGENTS_LOCATION; green dots) // Service 6 right now (MAP_ITEM_AGENTS_LOCATION; green dots)
int tc = Environment.TickCount; int tc = Environment.TickCount;
if (m_scene.GetRootAgentCount() <= 1) if (m_scene.GetRootAgentCount() <= 1) //own position is not sent
{ {
mapitem = new mapItemReply( mapitem = new mapItemReply(
xstart + 1, xstart + 1,
@ -617,7 +617,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
// Service 6 right now (MAP_ITEM_AGENTS_LOCATION; green dots) // Service 6 right now (MAP_ITEM_AGENTS_LOCATION; green dots)
int tc = Environment.TickCount; int tc = Environment.TickCount;
if (m_scene.GetRootAgentCount() <= 1) if (m_scene.GetRootAgentCount() <= 1) // own is not sent
{ {
mapitem = new mapItemReply( mapitem = new mapItemReply(
xstart + 1, xstart + 1,
@ -1578,6 +1578,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
OSDArray responsearr = new OSDArray(); // Don't preallocate. MT (m_scene.GetRootAgentCount()); OSDArray responsearr = new OSDArray(); // Don't preallocate. MT (m_scene.GetRootAgentCount());
m_scene.ForEachRootScenePresence(delegate (ScenePresence sp) m_scene.ForEachRootScenePresence(delegate (ScenePresence sp)
{ {
if (!m_showNPCs && sp.IsNPC)
return;
OSDMap responsemapdata = new OSDMap(); OSDMap responsemapdata = new OSDMap();
responsemapdata["X"] = OSD.FromInteger((int)(xstart + sp.AbsolutePosition.X)); responsemapdata["X"] = OSD.FromInteger((int)(xstart + sp.AbsolutePosition.X));
responsemapdata["Y"] = OSD.FromInteger((int)(ystart + sp.AbsolutePosition.Y)); responsemapdata["Y"] = OSD.FromInteger((int)(ystart + sp.AbsolutePosition.Y));