From 0c041ce12f393367e2754e88d9b8dad5e45f88c4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 17 Oct 2011 01:42:31 +0100 Subject: Implement osNpcSit(). This is still in development so don't trust it Format is osNpcSit(, , OS_NPC_SIT_IMMEDIATE) e.g. osNpcSit(npc, llGetKey(), OS_NPC_SIT_IMMEDIATE); At the moment, sit only succeeds if the part has a sit target set. NPC immediately sits on the target even if miles away - they do not walk up to it. This method is in development - it may change so please don't trust it yet. Standing will follow shortly since that's kind of important once you're sitting :) --- OpenSim/Region/Framework/Interfaces/INPCModule.cs | 9 +++++++++ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 -- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 7 ++++--- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs index 5e5c4a1..9dd8c79 100644 --- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs +++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs @@ -95,6 +95,15 @@ namespace OpenSim.Region.Framework.Interfaces bool Say(UUID agentID, Scene scene, string text); /// + /// Sit the NPC. + /// + /// + /// + /// + /// true if the sit succeeded, false if not + bool Sit(UUID agentID, UUID partID, Scene scene); + + /// /// Delete an NPC. /// /// The UUID of the NPC diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 42cc1ce..703b986 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1220,14 +1220,12 @@ namespace OpenSim.Region.Framework.Scenes } } - public UUID SitTargetAvatar { get { return m_sitTargetAvatar; } set { m_sitTargetAvatar = value; } } - public virtual UUID RegionID { get diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 972e7fc..dd1a29d 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -615,13 +615,13 @@ namespace OpenSim.Region.Framework.Scenes set { m_isChildAgent = value; } } - private uint m_parentID; - public uint ParentID { get { return m_parentID; } set { m_parentID = value; } } + private uint m_parentID; + public float Health { get { return m_health; } @@ -1962,6 +1962,8 @@ namespace OpenSim.Region.Framework.Scenes ) )); +// m_log.DebugFormat("[SCENE PRESENCE]: {0} {1}", SitTargetisSet, SitTargetUnOccupied); + if (SitTargetisSet && SitTargetUnOccupied) { part.SitTargetAvatar = UUID; @@ -2256,7 +2258,6 @@ namespace OpenSim.Region.Framework.Scenes } */ - public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) { if (!String.IsNullOrEmpty(m_nextSitAnimation)) -- cgit v1.1