Make showing NPCs on the world map an option

0.9.1.0-post-fixes
Melanie 2019-08-07 18:45:04 +01:00
parent 1a8c235d58
commit c80926192a
2 changed files with 11 additions and 2 deletions

View File

@ -95,6 +95,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
private bool m_exportPrintScale = false; // prints the scale of map in meters on exported map private 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 private bool m_exportPrintRegionName = false; // prints the region name exported map
private bool m_showNPCs = true;
#region INonSharedRegionModule Members #region INonSharedRegionModule Members
public virtual void Initialise(IConfigSource config) public virtual void Initialise(IConfigSource config)
@ -111,6 +112,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
Util.GetConfigVarFromSections<bool>(config, "ExportMapAddScale", configSections, m_exportPrintScale); Util.GetConfigVarFromSections<bool>(config, "ExportMapAddScale", configSections, m_exportPrintScale);
m_exportPrintRegionName = m_exportPrintRegionName =
Util.GetConfigVarFromSections<bool>(config, "ExportMapAddRegionName", configSections, m_exportPrintRegionName); Util.GetConfigVarFromSections<bool>(config, "ExportMapAddRegionName", configSections, m_exportPrintRegionName);
m_showNPCs =
Util.GetConfigVarFromSections<bool>(config, "ShowNPCs", configSections, m_showNPCs);
} }
public virtual void AddRegion(Scene scene) public virtual void AddRegion(Scene scene)
@ -504,6 +507,9 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
// Don't send a green dot for yourself // Don't send a green dot for yourself
if (sp.UUID != remoteClient.AgentId) if (sp.UUID != remoteClient.AgentId)
{ {
if (sp.PresenceType == PresenceType.NPC && !m_showNPCs)
return;
mapitem = new mapItemReply( mapitem = new mapItemReply(
xstart + (uint)sp.AbsolutePosition.X, xstart + (uint)sp.AbsolutePosition.X,
ystart + (uint)sp.AbsolutePosition.Y, ystart + (uint)sp.AbsolutePosition.Y,

View File

@ -456,6 +456,9 @@
; valid values: -100 to RenderMaxHeight - 10 ; valid values: -100 to RenderMaxHeight - 10
;RenderMinHeight = -100 ;RenderMinHeight = -100
; Show NPCs as green world map dots
;ShowNPCs = true
[Permissions] [Permissions]
; ## ; ##
; ## PERMISSIONS ; ## PERMISSIONS