diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index fa32986..d36d9a0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6639,11 +6639,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6639 | /// AGENT_LIST_PARCEL - all in the same parcel as the scripted object | 6639 | /// AGENT_LIST_PARCEL - all in the same parcel as the scripted object |
6640 | /// AGENT_LIST_PARCEL_OWNER - all in any parcel owned by the owner of the | 6640 | /// AGENT_LIST_PARCEL_OWNER - all in any parcel owned by the owner of the |
6641 | /// current parcel. | 6641 | /// current parcel. |
6642 | /// AGENT_LIST_EXCLUDENPC ignore NPCs (bit mask) | ||
6642 | /// </summary> | 6643 | /// </summary> |
6643 | public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options) | 6644 | public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options) |
6644 | { | 6645 | { |
6645 | m_host.AddScriptLPS(1); | 6646 | m_host.AddScriptLPS(1); |
6646 | 6647 | ||
6648 | // do our bit masks part | ||
6649 | bool noNPC = (scope & ScriptBaseClass.AGENT_LIST_EXCLUDENPC) !=0; | ||
6650 | |||
6651 | // remove bit masks part | ||
6652 | scope &= ~ ScriptBaseClass.AGENT_LIST_EXCLUDENPC; | ||
6653 | |||
6647 | // the constants are 1, 2 and 4 so bits are being set, but you | 6654 | // the constants are 1, 2 and 4 so bits are being set, but you |
6648 | // get an error "INVALID_SCOPE" if it is anything but 1, 2 and 4 | 6655 | // get an error "INVALID_SCOPE" if it is anything but 1, 2 and 4 |
6649 | bool regionWide = scope == ScriptBaseClass.AGENT_LIST_REGION; | 6656 | bool regionWide = scope == ScriptBaseClass.AGENT_LIST_REGION; |
@@ -6684,6 +6691,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6684 | World.ForEachRootScenePresence( | 6691 | World.ForEachRootScenePresence( |
6685 | delegate (ScenePresence ssp) | 6692 | delegate (ScenePresence ssp) |
6686 | { | 6693 | { |
6694 | if(noNPC && ssp.IsNPC) | ||
6695 | return; | ||
6696 | |||
6687 | // Gods are not listed in SL | 6697 | // Gods are not listed in SL |
6688 | if (!ssp.IsDeleted && !ssp.IsViewerUIGod && !ssp.IsChildAgent) | 6698 | if (!ssp.IsDeleted && !ssp.IsViewerUIGod && !ssp.IsChildAgent) |
6689 | { | 6699 | { |