diff options
author | Justin Clark-Casey (justincc) | 2012-01-28 00:00:12 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-01-28 00:00:12 +0000 |
commit | 7837c611fb483dc776b531306d3d791e8f177aab (patch) | |
tree | 01c728a0f46a209eb0267bc166f70260748f4ca8 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |
parent | Increment LPS script stat for OSSL functions that were not already doing this (diff) | |
download | opensim-SC_OLD-7837c611fb483dc776b531306d3d791e8f177aab.zip opensim-SC_OLD-7837c611fb483dc776b531306d3d791e8f177aab.tar.gz opensim-SC_OLD-7837c611fb483dc776b531306d3d791e8f177aab.tar.bz2 opensim-SC_OLD-7837c611fb483dc776b531306d3d791e8f177aab.tar.xz |
Add OS_NPC_SENSE_AS_AGENT option to osNpcCreate().
This allows NPCs to be sensed as agents by LSL sensors rather than as a specific NPC type (which is currently an OpenSimulator-only extension).
Wiki doc on this and other recent NPC functions will follow soon
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 8356dce..3e0e452 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -447,9 +447,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
447 | 447 | ||
448 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(delegate(ScenePresence presence) | 448 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(delegate(ScenePresence presence) |
449 | { | 449 | { |
450 | if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc) | 450 | if ((ts.type & NPC) == 0 |
451 | && presence.PresenceType == PresenceType.Npc | ||
452 | && !npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent) | ||
451 | return; | 453 | return; |
452 | if ((ts.type & AGENT) == 0 && presence.PresenceType == PresenceType.User) | 454 | |
455 | if ((ts.type & AGENT) == 0 | ||
456 | && (presence.PresenceType == PresenceType.User | ||
457 | || npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent)) | ||
453 | return; | 458 | return; |
454 | 459 | ||
455 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) | 460 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) |