mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Make showing NPCs on the world map an option
This commit is contained in:
@@ -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_exportPrintRegionName = false; // prints the region name exported map
|
||||
private bool m_showNPCs = true;
|
||||
|
||||
#region INonSharedRegionModule Members
|
||||
public virtual void Initialise(IConfigSource config)
|
||||
@@ -111,6 +112,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
Util.GetConfigVarFromSections<bool>(config, "ExportMapAddScale", configSections, m_exportPrintScale);
|
||||
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)
|
||||
@@ -501,9 +504,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
{
|
||||
m_scene.ForEachRootScenePresence(delegate (ScenePresence sp)
|
||||
{
|
||||
// Don't send a green dot for yourself
|
||||
if (sp.UUID != remoteClient.AgentId)
|
||||
// Don't send a green dot for yourself
|
||||
if (sp.UUID != remoteClient.AgentId)
|
||||
{
|
||||
if (sp.PresenceType == PresenceType.NPC && !m_showNPCs)
|
||||
return;
|
||||
|
||||
mapitem = new mapItemReply(
|
||||
xstart + (uint)sp.AbsolutePosition.X,
|
||||
ystart + (uint)sp.AbsolutePosition.Y,
|
||||
|
||||
@@ -455,6 +455,9 @@
|
||||
; prims below RenderMinHeight are excluded
|
||||
; valid values: -100 to RenderMaxHeight - 10
|
||||
;RenderMinHeight = -100
|
||||
|
||||
; Show NPCs as green world map dots
|
||||
;ShowNPCs = true
|
||||
|
||||
[Permissions]
|
||||
; ##
|
||||
|
||||
Reference in New Issue
Block a user