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/OptionalModules/World/NPC/NPCAvatar.cs | |
parent | Increment LPS script stat for OSSL functions that were not already doing this (diff) | |
download | opensim-SC-7837c611fb483dc776b531306d3d791e8f177aab.zip opensim-SC-7837c611fb483dc776b531306d3d791e8f177aab.tar.gz opensim-SC-7837c611fb483dc776b531306d3d791e8f177aab.tar.bz2 opensim-SC-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/OptionalModules/World/NPC/NPCAvatar.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 6a6c4c3..6d40a92 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -31,13 +31,16 @@ using System.Net; | |||
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using OpenMetaverse.Packets; | 32 | using OpenMetaverse.Packets; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Region.Framework.Interfaces; | ||
34 | using OpenSim.Region.Framework.Scenes; | 35 | using OpenSim.Region.Framework.Scenes; |
35 | using OpenSim.Region.CoreModules.World.Estate; | 36 | using OpenSim.Region.CoreModules.World.Estate; |
36 | 37 | ||
37 | namespace OpenSim.Region.OptionalModules.World.NPC | 38 | namespace OpenSim.Region.OptionalModules.World.NPC |
38 | { | 39 | { |
39 | public class NPCAvatar : IClientAPI | 40 | public class NPCAvatar : IClientAPI, INPC |
40 | { | 41 | { |
42 | public bool SenseAsAgent { get; set; } | ||
43 | |||
41 | private readonly string m_firstname; | 44 | private readonly string m_firstname; |
42 | private readonly string m_lastname; | 45 | private readonly string m_lastname; |
43 | private readonly Vector3 m_startPos; | 46 | private readonly Vector3 m_startPos; |
@@ -45,13 +48,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
45 | private readonly Scene m_scene; | 48 | private readonly Scene m_scene; |
46 | private readonly UUID m_ownerID; | 49 | private readonly UUID m_ownerID; |
47 | 50 | ||
48 | public NPCAvatar(string firstname, string lastname, Vector3 position, UUID ownerID, Scene scene) | 51 | public NPCAvatar( |
52 | string firstname, string lastname, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene) | ||
49 | { | 53 | { |
50 | m_firstname = firstname; | 54 | m_firstname = firstname; |
51 | m_lastname = lastname; | 55 | m_lastname = lastname; |
52 | m_startPos = position; | 56 | m_startPos = position; |
53 | m_scene = scene; | 57 | m_scene = scene; |
54 | m_ownerID = ownerID; | 58 | m_ownerID = ownerID; |
59 | SenseAsAgent = senseAsAgent; | ||
55 | } | 60 | } |
56 | 61 | ||
57 | public IScene Scene | 62 | public IScene Scene |